I am stuck in one job of Talend. I am using Talend for migrating the DB fields into a JSON file.
I am successfully able to do the job but the JSON format which I am getting is an array format, not the customized format like address fields are not coming under parent child relationship.
In my job I am reading the data from file storing it into db and then generating the JSON file.
Current JSON output:
[
{
"name":"test",
"age":"21",
"phone":"12345678",
"city":"india",
"state":India",
"country":"India"
}
]
Desired JSON output:
[
{
"profile": {
"name":"test",
"age":"21",
"phone":"12345678",
},
"address": {
"city":"india",
"state":"India",
"country":"India"
}
}
]
There are majorly two issue with my job :
- JSON customised format
- No of row per file
Can any one please help me out in this.