Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a joblet ouput with schema as below:
id attr1 attr2 attrNext
I would like to create a JSON file that looks like below:
[ { "id":"100001", "attrMain":[ { "attr1":"aa", "attr2":"abc@xyz.com" }, { "attr1":"bb", "attr2":"pqr@abc.com" }, { "attr1":"cc", "attr2":"xyz@xyz.com" }, ] } ]
I have so far been using tWriteJSONField with a Group by over "id" & setting attrMain as the group element, and attr1 as loop element in the "Configure JSON Tree" editor. I would like to achieve the same using tJSONDoc* components. So far, I have been able to get the below output (screenshot of job attached):
[ { "id" : "100001", "attrMain" : [ { "attr1" : "aa" }, { "attr2" : "abc@xyz.com" } ] }, { "id" : "100001", "attrMain" : [ { "attr1" : "bb" }, { "attr2" : "pqr@abc.com" } ] }, { "id" : "100001", "attrMain" : [ { "attr1" : "cc" }, { "attr2" : "xyz@xyz.com" } ] } ]
Any suggestions? Happy to provide more information on request!
Hello,
tJsonDocOutput is a custom component written by talend community user and shared on talend exchange portal.
We don't have the source code of these components. It is the ownership of the person who built it. Feel free to contact the author directly.
Best regards
Sabrina
Hello,
tJsonDocOutput is a custom component written by talend community user and shared on talend exchange portal.
We don't have the source code of these components. It is the ownership of the person who built it. Feel free to contact the author directly.
Best regards
Sabrina