- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Defining Custom Attributes in GenerateFlowFile
- Labels:
-
Apache NiFi
Created ‎11-27-2020 06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have case and I'm working on it.
I'm using generateflowfile to run a python file, and then I'm using executestreamcommand processors.
But in my python code there a Postgresql connection. I want to make this connection information and remove from the code.
I have tried to create new properties in the generateflowfile and I have defined the postgre connection information as property and value. After I have gave into the code these property names for the connection part.
But I couldn't run the flow. I'm getting various errors.
Does my logic in the flow right?
Thanks.
Created ‎11-30-2020 09:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Nifi can easily get data from a database, do you really need a Python script for that? If you really want to do what you describe here, I think you should use updateAttribute to set your set your database information in the flowfile attributes and then from your script use the getAttribute function to get it.
