Member since
07-30-2019
3472
Posts
1642
Kudos Received
1020
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 205 | 06-03-2026 06:06 PM | |
| 497 | 05-06-2026 09:16 AM | |
| 950 | 05-04-2026 05:20 AM | |
| 561 | 05-01-2026 10:15 AM | |
| 672 | 03-23-2026 05:44 AM |
05-07-2021
06:03 AM
1 Kudo
@leandrolinof The "EvaluateJsonPath" processor you shared has the configured destination as a FlowFile-Attribute and thus leaves the content of the FlowFile unchanged. So if FlowFile Attribute is where you want this parsed output to reside, you could use "ExtractText" [1] as an alternative solution. The used value here would be: .*Erros":\[(.*)\].* This has only 1 capture group which is for the content you are trying to extract. That content is then added to the FlowFile in a new FlowFile attribute based on the property name. If you instead want to replace the content of your FlowFile with only the portion of the original content you are trying to extract, you could use the "ReplaceText" [2] processor. The used Java regex "Search value" here would be: (.*Erros":\[)(.*)(\].*$) Which breaks source content into 3 capture groups so regex matches entire content and capture group 2 matches on the string output you are looking for. So "Replacement Value" is simply set to "$2" so that entire content is replaced with just contents of capture group 2. [1] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.ExtractText/index.html [2] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.ReplaceText/index.html If you found this help you with your question, please take a moment to login and click accept on this solution. Thanks, Matt
... View more
05-07-2021
05:31 AM
@Justee You definitely can't use "/Home/Data/" in the "Remote File" property of the FetchSFTP processor. This must be a the full path to a specific file being fetched, which means it should be getting that path and filename values from the inbound FlowFile's attributes. Your ListSFTP (which you said is working) would be producing a FlowFile for each File found at target directory non your SFTP server. Those FlowFiles will get queued on the outbound connection containing the ListSFTP's "success" relationship. That connection is the inbound connection to the FetchSFTP processor that will connect to same SFTP server and retrieve the content for each of those FlowFiles that were produced by the ListSFTP processor. The "Remote File" property on the FetchSFTP processor should be using NiFi Expression Language (EL) to dynamically set the path and filename being fetched uniquely for each inbound FlowFile. ${path}/${filename} NiFi is case sensitive, so make sure you are using all lowercase so it matches the attribute names created on the Source FlowFiles by the ListSFTP processor. When you say the FetchSFTP processor is "not working", what does that mean? To which relationship are the inbound FlowFiles getting routed when it does not work? What exception (ERROR) is logged in the nifi-app.log when it fails to fetch the content for an inbound FlowFile? Make sure when you configured the username and password on the FetchSFTP you did not accidentally add a leading or trailing whitespace. Hope this helps, Matt
... View more
05-06-2021
02:15 PM
@techNerd Details around your use case would be helpful here. The putSFTP processor is designed to write FlowFile content to a target SFTP server location. If you have no content to write, there is nothing for it to do. Thanks, Matt
... View more
05-06-2021
02:10 PM
2 Kudos
@sangee Details around your use case may be helpful. The SplitText processor will output all FlowFiles produced at the exact same time to the "splits" relationship. So if you intent is to wait until all splits from a single source FlowFile are produced before processing those splits, this flow is not needed. Pierre has written an excellent blog around using wait and notify processors in a dataflow that does merge and split. Check it out here: https://pierrevillard.com/2018/06/27/nifi-workflow-monitoring-wait-notify-pattern-with-split-and-merge/ If you found this helpful with your query, please take a moment to login and click accept on this solution. Thanks, Matt
... View more
05-06-2021
02:01 PM
@syntax_ NiFi does not provide a method for uploading templates in bulk. But anything you can do via the UI, you can also do via rest-api calls [1] through curl. So you could script the bulk upload through rest-api external to NiFi's UI. I would strongly discourage bulk uploading templates to NiFi. Templates should be uploaded as needed, instantiate to the canvas and then template deleted from NiFi. All uploaded templates even if not instantiated to the canvas become part of the flow.xml loaded in to heap memory. So keeping a large number of templates uploaded to your NiFi can have a considerable impact on JVM heap memory usage because now you have not only your active flow on the canvas in memory, but also these templates. Additionally, In a NiFi cluster on startup the flow.xml.gz is uncompressed, loaded in to heap memory, and a flow fingerprint created on every node. These flow fingerprints are then compared to make sure all nodes joining the cluster are running with the same flow.xml. Since these templates can just add unnecessary size to the flow.xml.gz, this can impact startup times and flow fingerprint comparison time. A better approach is to get your reusable flow migrated into NiFi-Registry [2]. You can have 1 to many NiFi's all connect to a single NiFi-Registry where all your flows exist. Then all you need to do is drag a process group to the canvas and select "import" which will allow you to select one of these flows from NiFi-Registry and add it to your canvas. Now you have your flow without the additional impact on heap from having it in NiFi both as a template and as a dataflow on your canvas with easy access to load same flow over and over. I encourage you to explore NiFi-Registry. [1] http://nifi.apache.org/docs/nifi-docs/rest-api/index.html [2] https://nifi.apache.org/registry.html If you found this response helped with your query, please take a moment to login in and click accept on this solution. Thanks, Matt
... View more
05-06-2021
01:37 PM
1 Kudo
@robnew The "CompressContent" [1] processor can be used to decompress gz files. My suggestion here since only some log files are compressed is to set up a flow that passes these FlowFiles through an "IdentifyMimeType" [2] processor. This will write out a new mime.type attribute on the FlowFiles. Then use a "RouteOnAttribute" [3] processor to route FlowFiles with mime.type = application/gzip (each new dynamic property becomes a new outbound relationship) to that "CompressContent" processor and the "unmatched" relationship (which will have every other non gz file) on through your flow without passing through "CompressContent" processor. [1] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.CompressContent/index.html [2] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.IdentifyMimeType/index.html [3] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.RouteOnAttribute/index.html If you found this helpful with your question, please take a moment to login and click accept on this solution. Thanks, Matt
... View more
05-06-2021
01:21 PM
@Dmitry Trying to fully understand your use case here... You have 1 to many FlowFile where you want to merge the content of each of those FlowFiles in to a single FlowFile if all those FlowFile have an attribute "manager_name" with the same value? If so, the MergeContent [1] or MergeRecord [2] processors could do that for you. You would set the "Correlation Attribute Name" property in those processors the place incoming FlowFiles in to bins based on unique values set for "manager_name" on each incoming FlowFile. Those bins are then merged based on criteria set in other properties on the processor. The merged output FlowFile will have several new attribute written to it. One of those new attributes is "merge.count" which will contain the count of the number fo input FlowFiles that were merged. You could use an UpdateAttribute processor to read the value from "merge.count" and "manager_name", then assign those to other attribute named "total" and "general key" is those attribute names are specifically needed. [1] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.MergeContent/index.html [2] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.MergeRecord/index.html If you found this information helped with you question, please take a moment to login and click accept on this solution. Matt
... View more
05-06-2021
11:23 AM
@Justee Sharing the configuration of both your listSFTP and FetchSFTP processor, as well as a listing of the target SFTP directory would be helpful to those who could assist you here. The listSFTP processor should be configured with only the base path where all the files you want to list exist in the "Remote Path" property. If the files you want to list reside within sub-directories of that base directory, make sure you also se "Search Recursively" to true. The ListSFTP processor will output a NiFi FlowFile for each file that is listed. Also those produced FlowFiles will have FlowFile attributes set on them with: So you might want to list those FlowFiles in the NiFi connection queue an inspect what values were set on these properties. Are they correct? These attributes can then be used in the FetchSFTP processor to facilitate the fetching of the content for each FlowFile listed. Hope this helps, Matt
... View more
05-06-2021
11:11 AM
@leandrolinof The shared bulletin is being produced by the EvaluateJsonPath processor. It may be helpful if you share your current ReplaceText processor configuration, sample input file (prior to ReplaceText), desired output file (post ReplaceText), and the configuration of your EvaluateJsonPath processor. Use case details are also very helpful to understand what your end-to-end goal is here. Thanks, Matt
... View more
05-06-2021
10:56 AM
@hkh Did you happen to restart your NiFi instance at any time? Can you share a versbose (ls -latrh) listing of your log directory? I do recommend you compress on rollover. nifi-app.logs can get very large especially if you are only creating one log file per day. To compress on rollover, you would add a ".gz" to the end of your <fileNamePattern>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app_%d.log.gz</fileNamePattern> Thanks, Matt
... View more