Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tJSONFileInput cascading header level to detail

I have been messing around with the JSONPath expressions but have not been able to get it to work.
JSON structure sample:

{
"type": "Actors",
"detail":
},
{
"firstname": "Jason",
"lastname": "Mewes",
"movies":
}
]
}
I want my output to look like:
Actors|Kevin Smith | Clerks | 1994 |8| Silent Bob
Actors|Kevin Smith | Jay and Silent Strike Back |2001 | 7|Silent Bob
Actors|Jason Mewes | Clerks | 1994 |8| Jay
Actors|Jason Mewes | Jay and Silent Strike Back | 2001 |7| Jay
But right now I get an output more like this:
Actors|Kevin Smith | Clerks | 1994 |8| Silent Bob
|| Jay and Silent Strike Back | 2001 |7| Silent Bob
|| Clerks | 1994 |8| Jay
|| Jay and Silent Strike Back | 2001 |7| Jay

Also, even though my JSON is valid per lint, I sometimes get an error message: "The Json resource datas maybe have some problems, please make sure the data structure with the same fields."
Thanks,
Ben
Labels (3)
11 Replies
Anonymous
Not applicable
Author

Hi Ben
Can you upload a screenshot of basic setting of tFileInputJson?
Best regards
Shong
Anonymous
Not applicable
Author

Image attached. I have tried a few different path notations. ex $.detail. vs $..
Output
The Json resource datas maybe have some problems, please make sure the data structure with the same fields.
The Json resource datas maybe have some problems, please make sure the data structure with the same fields.
Actors|Kevin|Smith|Clerks|1994|8|Silent Bob
|Jason|Mewes|Jay and Silent Strike Back|2001|7|Silent Bob
|||Clerks|1994|8|Jay
|||Jay and Silent Strike Back|2001|7|Jay
BTW, I had to fix the moviename field in the JSON file, and I am open to restructuring the JSON if that is required.
Anonymous
Not applicable
Author

Hi Ben
I got the same problem with many examples and confirmed that the component can't cascading the header to next level element if there are many rows.
Can you please report a bug on our bugtracker? Our developer will investigate it further and see if it is possible.
Best regards
Shong
Anonymous
Not applicable
Author

Bug created. Thanks, Ben
Anonymous
Not applicable
Author

Bug created. Thanks, Ben

Thank you, Ben, please add the issue ID here.
Best regards
Shong
_AnonymousUser
Specialist III
Specialist III

Is there a workaround to achieve cascading header to detail.. Im new to Talend and Im not able to find a workaround.
_AnonymousUser
Specialist III
Specialist III

Hello,
I have the same problem with this JSON data:
{
"championships":

},
{
"name": "Premier League",
"teams":

}
]
}

I would like to have a result like:
Serie A | Milan AC
Serie A | Juventus Turin
Premier League | Liverpool FC
Is there any workaround to resolve it?
Many thanks in advance!
Anonymous
Not applicable
Author

has this issue been resolved yet? i'm currently facing the same problem. thanks
Anonymous
Not applicable
Author

Me too +1
Running TOS 4.2.3.r67267