Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Extracttext processor multiple record handling

avatar
Contributor

I am trying to load data from the below input to db.

 

 

 

My input is as shown below

 

i, John, $100

 

ii, Kevin, $150

 

iii, Steve, $200

 

 

 

Created getfile, ReplaceAttributes, Extracttext, Route to attributes, putsql flow

 

 

 

I have managed to parse fixed width file records and replaced with comma delimited values.  ExtractText processor with Enable Multiline Mode=true, Enable DOTALL Mode=true. After execution I see below in provenance event in attributes tab

 

 

 

line i

 

line.0 John

 

line.1 $100

 

 

 

Please advise how to load other two records which was not getting displayed in the attributes. 

2 REPLIES 2

avatar
Master Mentor

@Chakkara 

 

The more detail you can provide, the better we may be able to assist.

Are you using custom processors?  NiFi does not come with a ReplaceAttribute processor.

I am assuming your flow may actually be using:
GetFile (deprecated processor in favor of the listFile and FetchFile processors) --> UpdateAttribute --> ExtractText --> RouteOnAttribute --> putSQL

Can you share the configuration you are currently using on the above processors, so we can see what you are doing now?  Perhaps you only need a few tweaks to your current design.  

Thanks,

Matt