Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
param75
Contributor III
Contributor III

Talend Data Mapper - JSON -> CSV

Hi,
Today I have a JSON file that I want to convert to CSV (via tHMap component) but I have a problem with empty values in loop, which creates offsets in my file.
Here the longpagesummary may not exist and in this case, Talend doesn't create Initiator/Terminator (separator ; ) so i have a file which not correct.
In example, i want Initiator/Terminator in line 6 in case where the field doesn't exist.
0683p000009MCxo.jpg 0683p000009MDHr.jpg
Thank's for your help !
Labels (3)
5 Replies
Anonymous
Not applicable

Hi,
Can't you add a filter in your loop to make sure you have fields not empty ?
Eric
param75
Contributor III
Contributor III
Author

Hello Eric,
If I add a filter in my loop, there is only 1 element with initiator and terminator. So my final file is not correct.
With a filter I have:
"ID";"LOOP_VALUE";"TEXT"
"1";"ABC"
"2";"Value Exemple";"CDE"
"3";"EFG"
"4";"GHI"

instead of:
"ID";"LOOP_VALUE";"TEXT"
"1";"";"ABC"
"2";"Value Exemple";"CDE"
"3";"";"EFG"
"4";"";"GHI"
Anonymous
Not applicable

Could you upload your map ?
param75
Contributor III
Contributor III
Author

Yes no probleme, here the zip file of Map:
map_forum.zip.zip
Anonymous
Not applicable

Hi,
Here it is what I can suggest:
1-You create a new field description_default (Not looping)
0683p000009MDLm.png
2-His value is blank:
0683p000009MDKz.png3-And you enter an emit condition:
0683p000009MDJ8.pngEric