Member since
07-30-2019
3406
Posts
1622
Kudos Received
1008
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 148 | 12-17-2025 05:55 AM | |
| 209 | 12-15-2025 01:29 PM | |
| 143 | 12-15-2025 06:50 AM | |
| 261 | 12-05-2025 08:25 AM | |
| 423 | 12-03-2025 10:21 AM |
12-10-2019
11:21 AM
@fowler7878 Writing to the content will overwrite all the other content which is not what I think you want to be doing. Plus the updateAttribute processor can only manipulate FlowFile attributes via the NiFi Expression Language (EL). So you need to extract the json value to a FlowFile attribute in the EvaluateJsonPath processor. Then manipulate that attributes value and then use UpdateRecord to update the actual content of your FlowFile using that FlowFile's attribute. Matt
... View more
12-10-2019
09:52 AM
@xpelive There are two state directories. The one you shared is used by the state-management.xml local state provider. The state directory I am talking about should have been created inside the NiFi conf directory. If it does not exist, try creating it manually and make sure your NiFi service user can navigate to it and has proper permission to read and write and delete files within the directory. Thanks, Matt
... View more
12-10-2019
09:46 AM
1 Kudo
@Biswa Your "Replacement Value" is set to "$1". This means that the replacement value is the value associated to the first java regex capture group found in your configured "Search Value". The issue is your "Search value" contains no capture groups. Perhaps providing a sample input content and desired output content would help here. Hope this helps you, Matt
... View more
12-10-2019
09:38 AM
@fowler7878 Out of your EvaluateJsonPath processor your FlowFile now has an attribute with the name "COUNTFILES" and a numeric value? You can confirm this by stopping the UpdateAttribute processor and allowing a test FlowFile to queue on the connection between EvaluateJsonPath and UpdateAttribute processors. Then right click on connection and select "list queue" from the displayed context menu. Then click on the "view details" icon to the far left of row for your listed FlowFile. Within the FlowFile details UI you can inspect the attributes set on this FlowFile. Then start only the UpdateAttribute processor while UpdateRecord is still stopped and repeat above to verify that updateAttribute processor modified the attribute value. Matt
... View more
12-09-2019
02:00 PM
@dk123 You may want to use the replaceText processor to update your FlowFile's json content. My suggestion would be to replace all occurrences of $ with either \$ or \\$ Hope this helps, Matt
... View more
12-09-2019
01:44 PM
1 Kudo
@wann_douglas You can download and view the data from any connection to inspect your data as it passed through your dataflow. You can also do the same by looking at each reported provenance event; however, access to view or download the content of a FlowFile via a Provenance event is only possible if that cntent still exists in the NiFi content_repository. Here is my suggestion: 1. Stop all the processors in your dataflow 2. Start only the first processor and you will see data queue on the connection leading to the next processor. 3. Right click on the connection with the queued data and select "List Queue" form the context menu that is displayed. 4. You can click on the "view details' icon to far left side of any listed FlowFile from the table displayed 5. From the "FlowFile" UI that is displayed you can select the "Download" or "View" buttons to get access to the content as it exists at this point in your dataflow. When you are done examining the content, repeat steps 3-5 after starting the next processor in your dataflow. This allows you to see how your content is changing s it progresses through your dataflow one processor at a time. Hope this helps you, Matt
... View more
12-09-2019
01:26 PM
@xpelive For site-to-site, NiFi attempts to create peers files inside a "state" directory within the NiFi conf directory. These peers files allow a NiFi instance to share peer information across multiple identical S2S connections (like having multiple Remote Process Groups (RPGs) all configured with same target URL(s)). This helps reduce overhead associated with every identical instance of S2S retrieving the same details form the same target. It sounds like your S2S connection is working and the peers info is being returned, but it is unable to store that peer information locally. This is why your S2S connection still works even though this peers bulletin is being thrown. I would suggest you make sure a "state" directory exists within NiFi's conf directory and the NiFi service user (user that owns the NiFi java process) has proper ownership and permissions to navigate that full directory path and read/write to that directory. Hope this helps you, Matt
... View more
12-09-2019
12:58 PM
@Aaki_08 You may want to try executing following commands: 1. On the Ambari server host: ambari-server stop 2. On all hosts ambari-agent stop 3. On Ambari server host: ambari-server uninstall-mpack --mpack-name=hdf-ambari-mpack --verbose Hope this helps you, Matt
... View more
12-09-2019
12:42 PM
@fowler7878 my initial thought here for you would be to chain the following three NiFi processor components together: --> EvaluateJsonPath ---> UpdateAttribute ---> UpdateRecord --> 1. The EvaluateJsonPath processor should be configured to write the desired Json field value out to a NiFi FlowFileAttribute. 2. The UpdateAttribute processor would be used to manipulate that extracted value by subtracting 30 from it using the NiFi Expression Language (EL) 3. The UpdateRecord processor would be used to update your original FlowFile JSON content with the new Json field value. Hope this helps you, Matt
... View more
12-05-2019
10:35 AM
@rki Your NiFi Expression Language (EL) statement shared expects that the inbound FlowFile already has FlowFile attribute named "end_time" with some value assigned to it. What does that value look like? How was it created? ${end_time:lt(${now():toNumber():minus(86400000)})} Let's break down the embedded NiFi EL statement first: ${now():toNumber():minus(86400000)} The now() function returns the current timestamp. The toNumber() function converts that timestamp in to milliseconds since midnight GMT Jan 1, 1970. The minus() function subtracts the number passed to the function (86400000) from the above calculated milliseconds. Assuming that the "end_time" attribute returns some number that represents the number of milliseconds since midnight GMT Jan 1, 1970 also and that number is less than the value calculated by the embedded NiFi EL, the NiFi EL will return "true". Essential all files were the end_time is older then 24 hours from the current timestamp. The FlowFile would then get routed to the relationship named by your RouteOnAttribute custom property. If false is returned and no other custom properties match, the FlowFile would be routed to unmatched. If you are really trying to only route FlowFiles were the "end_time" milliseconds falls within the last 24 hours only, then you would want to use the ge() function instead of the lt() function. Hope this helps, Matt
... View more