Unable to get data block

Highlighted
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.

Highlighted
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

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog