Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My database has the following format of data:
id | locale | link | attr1 | attr2 | attr3
100 en abc@xyz.com aaa lmn pqr
100 de abc@xyz.de aaa lmn pqr
100 nl abc@xyz.nl aaa lmn pqr
100 fr abc@xyz.fr aaa lmn pqr
100 it abc@xyz.it aaa lmn pqr
I would like to create a JSON file like the following:
[ {
"id" : "100"
"attr1" : aaa
"attr2" : lmn
"attr3" : pqr
"attrRoot" : [ {
"locale" : "en"
"link" : "abc@xyz.com"
},
{
"locale" : "de"
"link" : "abc@xyz.de"
},
{
"locale" : "nl"
"link" : "abc@xyz.nl"
},
{
"locale" : "fr"
"link" : "abc@xyz.fr"
},
{
"locale" : "it"
"link" : "abc@xyz.it"
}]
}]
I am able to achieve the format and the data correctly, but since I am iterating the rows, I get the same data (as shown above) 5 times, for every row corresponding to the "id".
Hi,
Since you are using a custom component, I would recommend to contact the corresponding Talend community member who has developed this component.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
I am getting an invalid JSON when I am trying to validate it. Could you please share the JSON which pass the JSON validation process?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Sure, here it is:
Also attached an image
[
{
"id":"100",
"attr1":"aaa",
"attr2":"lmn",
"attr3":"pqr",
"attrRoot":[
{
"locale":"en",
"link":"abc@xyz.com"
},
{
"locale":"de",
"link":"abc@xyz.de"
},
{
"locale":"nl",
"link":"abc@xyz.nl"
},
{
"locale":"fr",
"link":"abc@xyz.fr"
},
{
"locale":"it",
"link":"abc@xyz.it"
}
]
}
]
I also forgot to mention - I am trying to achieve the result using tJSONDoc custom components
Hi,
Since you are using a custom component, I would recommend to contact the corresponding Talend community member who has developed this component.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
@llicould you assist?
Yes I can. Send me your desired json and which sources you have (e.g. some csv example files) and I will provide an example job.
jan.lolling@gmail.com
Thanks for the quick response, I just send them to you as a message. Please check.