tJSONFileInput cascading header level to detail

One Star

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
Community Manager

Re: tJSONFileInput cascading header level to detail

Hi Ben
Can you upload a screenshot of basic setting of tFileInputJson?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tJSONFileInput cascading header level to detail

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.
Community Manager

Re: tJSONFileInput cascading header level to detail

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tJSONFileInput cascading header level to detail

Bug created. Thanks, Ben
Community Manager

Re: tJSONFileInput cascading header level to detail

Bug created. Thanks, Ben

Thank you, Ben, please add the issue ID here.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tJSONFileInput cascading header level to detail

Is there a workaround to achieve cascading header to detail.. Im new to Talend and Im not able to find a workaround.
One Star

Re: tJSONFileInput cascading header level to detail

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!
One Star

Re: tJSONFileInput cascading header level to detail

has this issue been resolved yet? i'm currently facing the same problem. thanks
Four Stars

Re: tJSONFileInput cascading header level to detail

Me too +1
Running TOS 4.2.3.r67267
Community Manager

Re: tJSONFileInput cascading header level to detail

Hi All
For your information, we will enhance this component on v5.3.0, see jira issue.
This modification might be available in next release, we sincerely invite you to test the changes and feedback to us!
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: tJSONFileInput cascading header level to detail

We are using Talend 6.3.1 and still get the same error for tFileInputJSON (screenshot attached) even though the source json is valid. The input file has 346 records, but only 329 records come out before the job throws below log:

 

[statistics] connecting to socket on port 3604
[statistics] connected
[WARN ]: renew_checks_0_1.Renew_Checks - tFileInputJSON_1 - The Json resource datas maybe have some problems, please make sure the data structure with the same fields.
1296 milliseconds
[statistics] disconnected