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.

how do i add multiple attributes as correlation attributes for merge content

Highlighted

how do i add multiple attributes as correlation attributes for merge content

I have fixed with data files which is contain the different departments data set. We are splitting the data using splitContent processor ( its will provide fragment.identifier key for future tracking ) and processing split files parallel and converting into JSON.

Now we want to get a Merge individually jsons ( two or more jsons) into one single JSON based on fragment.identifier key . Which is the best way to merge ,is they any processor available .Do anyone have custom code .

Converted JSON flow files : flowfile 1 : {"sname":"jack","id":"00001","state":"NY" }

flowfile 2: {"country":"US","date":"1983"}

flowfile 3: { "add":"pkd","pin":"B4K7S0" }

These three split files having same “fragment.identifier” let say fragment.identifier is 1000.

Note : we can't use EvaluateJsonPath processor, we wanna to do flowfile based merging.

Expecting output : {"sname":"jack","id":"00001","state":"NY","country":"US","date":"1983","add":"pkd","pin":"B4K7S0" }


Any help will be highly appreciated.


Thanks,

Vicky

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