Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in a tFileInputJSON component?

Hi,
When to copy the data from tFileInputJSON to a tFileOutputExcel and there is no some item in the json file, the data from a column move up.
I access as follows: "$.elements.name" and "$.elements.description"
>JSON data:
{"source": "books", "elements": , }
>OutpuExcel:
name description
book1 desc1
book2 desc2
book3 desc4
book4
>Expected output:
name description
book1 desc1
book2 desc2
book3
book4 desc4
Whats's wrong?
Thanks!
Labels (3)
5 Replies
Anonymous
Not applicable
Author

Hi
Welcome to Talend Community!
I reproduced this issue and got the same result. Besides, I got this.
The Json resource datas maybe have some problems, please make sure the data structure with the same fields.

When I correct the JSON file as follow, I can get expected output.
{"name": "book3", "description": "" }

Regards,
Pedro
Anonymous
Not applicable
Author

I understand, the source is not correctly formed, unfortunately json source is external to me.
However, it is possible that in the short term the tFileInputJSON component can be manage this error?
Thanks!!
Anonymous
Not applicable
Author

Hi
The answer is no. You have to get correct JSON file.
Regards,
Pedro
Anonymous
Not applicable
Author

ok, thanks for the reply.
Regards!
_AnonymousUser
Specialist III
Specialist III

Hello Guys,
I am facing the same problem where the result of the tFilJSONInput component is not as per expectations.
{
"source": "books",
"elements":
,
}

I am using following JSON Query for
Name = "$.elements.name"
Description = "$.elements.description"

Result
name description
book1 desc1
book2 desc2
book3 desc4
book4
Expectation OR Correct result
name description
book1 desc1
book2 desc2
book3
book4 desc4
Is this a Talend Bug? or Is there any other way to achieve the required output? Please help.