Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am not able to set multiple as Loop Elements as i am getting multiple values from database in same same column for one particular id, so i want to generate json file and then want to insert to Mongodb.
Hi,
Could you please provide 5 or 6 sample records and its expected output in a sample file? Please also include your current output along with overall job and component screen shots. This will give us idea about how to analyse in detail.
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 🙂
The input table :
Produit |
Marque |
Client |
Année |
A |
Toyota |
1 |
2018 |
B |
Toyota |
2 |
2019 |
C |
Renault |
3 |
2017 |
D |
Toyota |
4 |
2017 |
The json file to generate:
{
‘Datas’ : [
{Marque : ‘Toyota’, Produits : [A, B, D], Clients : [1,2,4], Année : [2017,2018,2019]},
{Marque : ‘Renault, Produits : [C], Clients : [3], Année : [2017]}
]
}
The components of the job:
I have used a tSortRow in order to sort the data on the field Marque and then used the tWriteJsonField in order to generate the json file, the problem is that i can't use multiple loop elements in order to group the data into different arrays.
Hi,
did you got the solution for this?
if yes,can you share the sample job for this