Member since
07-30-2019
3391
Posts
1618
Kudos Received
999
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 245 | 11-05-2025 11:01 AM | |
| 477 | 10-20-2025 06:29 AM | |
| 617 | 10-10-2025 08:03 AM | |
| 400 | 10-08-2025 10:52 AM | |
| 456 | 10-08-2025 10:36 AM |
05-11-2017
08:28 PM
@Anil Reddy Since you don't know where in the content these four fields will fall, I would suggest using the following: The other regex rules I provided expect address as the last field. these will work no matter where in the content these patterns are found. The .*&firstname=(.*?)&.* will not work in all cases since it expect you to have 1 or more characters followed by "&filename=" followed by a many characters up to the last found "&" followed by 1 or more trailing characters. This expression will not work should firstname be the first or last field in the content. Thank, Matt
If you found my answers helpful to your question, please mark it as "accepted"
... View more
05-11-2017
07:54 PM
1 Kudo
@Anil Reddy You can get rid of capture group 0 by changing the "Include Capture Group 0" property to false. Capture groups are defined using (). what falls between them is a capture group. You can create a single java expression that has multiple capture groups. So the ExtractText processor creates a attribute for each of these capture groups. Then the complete result of the regular expression is assigned to the property name you created. In the above i have created four different java regular expressions. Each runs against the content of the incoming FlowFile. Each Regex has one capture group (.*?). As result you will have address.1= to that one defined capture group. NiFi also wants to create the attribute as you defined with just "address". so the <propertyname>.num attributes are created because of the use of capture groups in your regex. For example, let assume the firstname property had the following regex: firstname=(.*?)[&]{1}lastname=(.*?)[&]{1} Here you see i have two capture groups in one regular expression. This would translate in to two new attributes on your flowfile: Thanks, Matt
... View more
05-11-2017
06:44 PM
@Anil Reddy Are the four fields you are trying to extract the values from consistently: "firstname" "lastname" "email" "address"
... View more
05-11-2017
06:32 PM
@Anil Reddy Your new example does not use a "&" between all your fields. Is that a typo? I see "&" between first two fields and "," after that.
... View more
05-11-2017
04:13 PM
@Gaurav Jain NiFi does not redistribution of FlowFiles at this time between nodes behind the scenes. Any redistribution of FLowFiles between nodes in a cluster has to be done programmatically through your dataflow design via components (processors like postHTTP to ListenHTTP or RPG) to push FlowFiles to other nodes. Thanks, Matt
... View more
05-11-2017
03:15 PM
@Gaurav Jain When you find an answer in Hortonworks Community Connections (HCC) that addresses your question, please accept that answer so that other HCC users know what worked for you. Thank you kindly, Matt
... View more
05-11-2017
02:16 PM
@Gaurav Jain Here is an article i wrote awhile ago that explains the differences between using GetSFTP processor or List and Fetch SFTP processors:
https://community.hortonworks.com/articles/97773/how-to-retrieve-files-from-a-sftp-server-using-nif.html Thanks, Matt
... View more
05-11-2017
01:28 PM
@Francisco Pires What about in front of your directory property value "C:\SNIRH"? Can you attach a template of this configured processor?
... View more
05-11-2017
01:25 PM
1 Kudo
@Anil Reddy You could use extractText processor configured similar to the following: I changed the two shown standard properties and added two additional regex properties. Using the following example input: field_1=field1value&field_2=field2value&field_3=field3value&field_4=field4value You will end up with the following attributes on your FlowFile: There will be a few additional attributes created that you can ignore, but you will have a sequentially numbered attribute names with the associated values and one field_last that will have the very last value in your input string. Thanks, Matt
... View more
05-11-2017
12:00 PM
@Muhammad Umar Try providing the absolute path to your core-site.xml and hdfs-site.xml files in the putHDFS processor. Make sure these two files are readable by the user running your NiFi. Tail your nifi-app.log before staring the processor to see if it throws any error or warn log messages. Thanks, Matt
... View more