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!

Pivot one column to rows from CSV file along with other fields

avatar
Explorer

Hi,

 

I have a CSV file where the last column has pipe-delimited text which needs to be split up on pipe and I have to pivot it into rows. The last column can have any number of values with pipe-delimited and it varies by each row. How can we accomplish this in NIFI?

 

Ex: 

 

A, B,  C|D

X, Y,  X|Y|Z|B

 

The above file has to be converted to 

 

A, B, C

A, B, D

X, Y, X

X, Y, Y

X, Y, Z

X, Y, B

1 ACCEPTED SOLUTION

avatar

For this usecase the most natural solution is probably as follows:

1. Send message to a script for processing

2. Let the script turn your 1 row into an output of N rows 

3. Optional: Split the rows in Nifi

 


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

View solution in original post

1 REPLY 1

avatar

For this usecase the most natural solution is probably as follows:

1. Send message to a script for processing

2. Let the script turn your 1 row into an output of N rows 

3. Optional: Split the rows in Nifi

 


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.