Six Stars

Unable to get data block

 

Hi,

I am getting incomplete format in tfileInputDelimited as below.

 

{"name":"WDCi","locations":[{"location":"KL","staffs":[{"staff":"Lean","new_Loc":" KL"},{"staff":"Kai Herng","new_Loc":" KL KL"}]},{"location":"Sydney","staffs":[{"staff":"Walter","new_Loc":" KL KL Sydney"},{"staff":"Deborah","new_Loc":" KL KL Sydney Sydney"}]},{"location":"US","staffs":{"staff":"Terry","new_Loc":" KL KL Sydney Sydney US"}}]}

 

I need output for the same job as below.

 

{"company":

{"name":"WDCi","locations":[{"location":"KL","staffs":[{"staff":"Lean","new_Loc":" KL"},{"staff":"Kai Herng","new_Loc":" KL KL"}]},{"location":"Sydney","staffs":[{"staff":"Walter","new_Loc":" KL KL Sydney"},{"staff":"Deborah","new_Loc":" KL KL Sydney Sydney"}]},{"location":"US","staffs":{"staff":"Terry","new_Loc":" KL KL Sydney Sydney US"}}]}}

 

My job:

json.PNG

My actual data:

 

{"company":{"name":"WDCi","locations":[{"location":"KL","staffs":[{"staff":"Lean"},{"staff":"Kai Herng"}]},{"location":"Sydney","staffs":[{"staff":"Walter"},{"staff":"Deborah"}]},{"location":"US","staffs":{"staff":"Terry"}}]}}

 

Please suggest what needs to be done. Kindly reply as early as possible.

  • Data Integration
1 REPLY
Community Manager

Re: Unable to get data block

Hi
It seems the new_Loc element is missing from the output data, you might don't configure the json tree correctly. Can you please upload some screenshots of basic settings of tWriteJsonField component?

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business