Support Questions

Find answers, ask questions, and share your expertise

ExtractText from file content and put it as file attributes

avatar
Rising Star

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

14655-screen-shot-2017-04-15-at-120151-pm.png

1 ACCEPTED SOLUTION

avatar

Hi @Yahya Najjar

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

14666-screen-shot-2017-04-16-at-94538-pm.png

As you can see in the provenance, these informations are added to the flow files as attributes

14667-screen-shot-2017-04-16-at-94521-pm.png

Below the complete flow

14668-screen-shot-2017-04-16-at-94554-pm.png

View solution in original post

1 REPLY 1

avatar

Hi @Yahya Najjar

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

14666-screen-shot-2017-04-16-at-94538-pm.png

As you can see in the provenance, these informations are added to the flow files as attributes

14667-screen-shot-2017-04-16-at-94521-pm.png

Below the complete flow

14668-screen-shot-2017-04-16-at-94554-pm.png