- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
ExtractText from file content and put it as file attributes
- Labels:
-
Apache NiFi
Created on ‎04-16-2017 05:03 PM - edited ‎08-17-2019 10:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Am trying to extract fields from flowfile and put it as attributes so I send it to invokeHTTP processor as GET request,
flowfile content
+1234323432,200,Dynamic,Text
-------
Attributes needed
field1: +1234323432
field2: 200
------
something like below
Created on ‎04-17-2017 12:50 PM - edited ‎08-17-2019 10:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use ExtractText processor to extract these field as attributes.
Below a test I did. This configuration will extract your CSV fields as myfields.1, myfields.2, etc
As you can see in the provenance, these informations are added to the flow files as attributes
Below the complete flow
Created on ‎04-17-2017 12:50 PM - edited ‎08-17-2019 10:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use ExtractText processor to extract these field as attributes.
Below a test I did. This configuration will extract your CSV fields as myfields.1, myfields.2, etc
As you can see in the provenance, these informations are added to the flow files as attributes
Below the complete flow
