Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I am very new to Talend. I have to prepare a json file with nested structure. I have used twritejsonfield component for that. I am just trying to explore the examples given in the talend portal, and trying to implement the job. since the examples are very simple it is difficult for me to create the complex structure.
I have a table with 3 composite key columns. the table will be looking like the screenshot. I have to create a nested json file based on this composite keys. for example in the above table, the marked columns will be having same set of value for first two columns and the third column data will be different.
so the target JSON structure should be LIKE given below.
1A{
1B{
11,
12,
13,
14}
}
}
i have grouped the above 3 columns with TWRITEJSONFILED , groupby option but it provides strange results. the mapping screenshot is given below.
Please help me in preparing the correct json file format.
Thanks in Advance.
Priya
Dear Subhadip,
thank you verymuch for your reply. could you please share the screenshot of SCHEMA mapping in TWRITEJSONFILED COMPONENT. this is to know which one is loop element.
Thanks in Advance!
Priya
Dear Subhadip,
Thanks a ton. I found the correct screenshot. could you please let me know why the "set as group element " option is not available for the first key.
Thanks and Regards,
Priya
Dear Subhadip/experts,
I need to load the data coming out of twritejsonfield component to a json file. if I include toutputjsonfile component, I get only root node in the mapping area.
also I need to write the json data prepared with some headers like given below,
Hi @PRIYABOSCH
Please mark this topic as solved if the solution suits your requirement.
Thanks and Regards,
Subhadip