DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Low-Code Development: Learn the concepts of low code, features + use cases for professional devs, and the low-code implementation process.

E-Commerce Development Essentials: Considering starting or working on an e-commerce business? Learn how to create a backend that scales.

Getting Started With Jenkins: Learn fundamentals that underpin CI/CD, how to create a pipeline, and when and where to use Jenkins.

Related

  • Setting Apache Nifi on Docker Containers
  • Real-Time Analytics
  • Develop XR With Oracle Cloud, Database on HoloLens, Ep 2: Property Graphs, Data Visualization, and Metaverse
  • How to Use IBM App Connect's ‘Mapping Assist’ to Automatically Map Your Integration Flows

Trending

  • Configuring Spark-Submit
  • Building a Real-Time Slackbot With Generative AI
  • Unblock Your Software Engineers With Unblocked
  • How To Set up a Push Notification Service in 30 Minutes or Less
  1. DZone
  2. Data Engineering
  3. Data
  4. Properties File Lookup Augmentation of Data Flow in Apache NiFi 1.7.x

Properties File Lookup Augmentation of Data Flow in Apache NiFi 1.7.x

In this article, a big data expert goes over reading from properties files to use with Apache NiFi flows. Read on to get started!

Tim Spann user avatar by
Tim Spann
DZone Core CORE ·
Oct. 09, 18 · Tutorial
Like (2)
Save
Tweet
Share
6.2K Views

Join the DZone community and get the full member experience.

Join For Free

Properties File Lookup Augmentation of Data Flow in Apache NiFi 1.7.x

A really cool technologist contacted me on LinkedIn and asked an interesting question:

"Tim,

"How do I read values from a properties file and use them in my flow. I want to update/inject an attribute with this value.

"If you don't want to use the Variable Registry, but want to inject a value from a properties file how to do it. You could run some REST server and read it or does some file reading hack. But we have a great service to do this very easily!"

In my UpdateAttribute (or in your regular attributes already), I have an attribute named, keytofind. This contains a lookup key such as an integer or a string key. We will find that value in the properties value and give you that in an attribute of your choosing.

We have a Controller Service to handle this for you. It reads from your specified properties file. Make sure Apache NiFi has permissions to that path and can read the file.

We look up the key specified in the “keytofind.” It returns a value that you specify as an extra attribute, mine is “updatedvalue.”

This is my properties file:

-rwxrwxrwx  1 tspann  staff  67 Oct  4 09:15 lookup.properties

stuff1=value1
stuff2=value2
stuff3=value other
tim=spann
nifi=cool

In this example, we are using the LookupAttribute processor. You can also use the LookupRecord processor depending on your needs.

Apache NiFi Property (programming) Flow (web browser) Data (computing)

Opinions expressed by DZone contributors are their own.

Related

  • Setting Apache Nifi on Docker Containers
  • Real-Time Analytics
  • Develop XR With Oracle Cloud, Database on HoloLens, Ep 2: Property Graphs, Data Visualization, and Metaverse
  • How to Use IBM App Connect's ‘Mapping Assist’ to Automatically Map Your Integration Flows

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: