Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

is there some processor in Nifi to do csv processing?

is there some processor in Nifi to do csv processing?

New Contributor

I would like to do two operation in csv file.

1) sort the csv flow file on particular column

2) process records in csv row by row and update the value of second one with value of first like below.


Expected result:

Before

AAAA N

AAAA Y

AAAA Y

BBBB Y

BBBB Y

CCCC N

CCCC Y


After

AAAA N

AAAA N

AAAA N

BBBB Y

BBBB Y

CCCC N

CCCC N


Can we do it in Nifi processor or do we need to use some script to achieve this. Any other suggestions would be appreciated.


Thanks,

ram


1 REPLY 1
Highlighted

Re: is there some processor in Nifi to do csv processing?

Super Guru

@Ram S

You need to use QueryRecord processor for this case and add new query to the processor by using Apache Calcite SQL syntax. Use Window functions using lag to get previous row value for all the other rows in a partition.