Say I have the following attributes related to customer data -
1. Customer ID
2. Customer Name
3. Customer Addresses (Multiple Like Home, Work, etc)
4. Customer Phone (Multiple like Home, Work, Mobile, Fax, etc)
When I query relational DB to capture all of this information, I get a denormalized dataset, wherein the customer id and customer name repeats for all the entries of addresses and phones.
I want to convert this data into a nested JSON which will have id and name fields only once, but an array of addresses and phone numbers.
How to achieve this in HDF or Apache NiFi