Support Questions

Find answers, ask questions, and share your expertise

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Cloudera Community
- :
- Support
- :
- Support Questions
- :
- Pivot one column to rows from CSV file along with...

Announcements

Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Labels:

Explorer

Created 09-18-2019 03:47 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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

Accepted Solutions

Highlighted

- Dennis Jaheruddin

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

Expert Contributor

Created 09-23-2019 09:07 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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'.

1 REPLY 1

Expert Contributor

Created 09-23-2019 09:07 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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'.

Coming from Hortonworks? Activate your account here