Member since
05-20-2024
3
Posts
0
Kudos Received
0
Solutions
05-21-2024
06:26 AM
Hi @brandonsherrick, Thanks for the reply. Like you mentioned I want to process not specific files but all the files that belong to the date folder while maintaining their directory structure as it is necessary for the python script to process properly. Is there a way to use mergeContent processor to achieve the above? And also what will be configuration for the processor would be like exactly? Below is the current setup of my apache Nifi:
... View more
05-21-2024
06:22 AM
Hi @MattWho, Thanks for the reply. Apologies for not including the current setup of the workflow: From what you mentioned, i understand that flowfiles contain both the attributes and the content of the file itself. My use case is that my python script needs all the files under date folder to be processed and i do need the contents of the files as well not just the attributes. Currently the flow shown above is passing individual log.txt files one by one inside the date folder from fetchfile processor to ExecuteStreamCommand processor. What I actually want is to fetch all the files and folders inside the parent folder i.e.("Date folder") to be passed to ExecuteStreamCommand processor at once while maintaining its directory structure. And this is to be repeated for other date folders too. Currently the python script is breaking as it is not expecting a single log file but rather a date folder which contains folders of multiple zones containing the actual logs file. So my idea is to reconstruct the directory structure after fetching the files from local storage and then merging all the flowfiles that belong to the same date, but i am unsure if this is possible and would like to know if there are other methods to perform this.
... View more
05-20-2024
11:27 AM
Hi fellas, I have a folder structure where the parent folder is the date which contains multiple locations folder which contains the actual txt files. So the structure is such Logfolder/20240515/Location/logs.txt My nifi setup is to retrieve the date folders inside the parent directory of Logfolder and pass it to executestreamcommand processor which contains my python script which requires the date folders to be sent in as argument along with all the contents inside the datefolder with original directory structure. But currently the flowfile is sending logs.txt to my executestreamcommand instead of the 20240515 as the flowfile. How do I structure such that the date folders as a whole is passed to the python script and not file by file? I have tried chatgpt but it isn't quite helpful. I appreciate any help on this as it is quite urgent.
... View more
Labels:
- Labels:
-
Apache NiFi