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.

NiFi: Joining the two Tables for lookup and then selecting columns from flowfile based on values in one column of merged look up table

NiFi: Joining the two Tables for lookup and then selecting columns from flowfile based on values in one column of merged look up table

Hi All,

This is what I am trying to achieve. all of them are csv files

Flowfile (csv) -

col1_raw, col2_raw, col3_raw, col4_raw

1 , 2 , 3 , 4

1 , 2 , 3 , 4

 

Look up file1 (csv)

col_name_raw , col_name_business, class

col1_raw , col1_business , Secret

col2_raw , col2_business , Public

col3_raw , col3_business , Secret

col4_raw , col4_business , Public

 

Look up file2 (csv)

class, action

public, copy

secret, nocopy

 

output (csv) of flowfile should be

col2_business, col4_business

2 , 4

2 , 4

 

So basically I am filtering the columns of flowfile based on the action listed lookup file2. Also changing the raw column name to business column name as per lookup file1. In SQL it is very easy but in Nifi how can I achieve this using existing processors. Please help.

Don't have an account?
Coming from Hortonworks? Activate your account here