Trying to read Json File

Four Stars

Trying to read Json File

 

I am learning Talend and Struggling with the below Scenario.

 

I have an JSON input file which i am unable to read using Talend.

I tried JSON Path,Xpath, but its not working.

Can any anyone help me out regarding this issue.

 

The JSON file :

 

{"CustomersInfo":[{"Customers":"{\"CustomerName\":\"DATA-27368-Imp Org1\",\"CustomerTypeCode\":\"ORGANIZATION\",\"Address\":\"DATA-27368-1-100 Oracle Parkway\",\"SiteIdentifyingAddressIndicator\":\"Y\",\"CustomerAccountTypeName\":[],\"AccountNumber\":\"DATA-27368-1-ACCT-1\"}"},{"Customers":"{\"CustomerName\":\"Demo Customer\",\"CustomerTypeCode\":\"ORGANIZATION\",\"Address\":\"Any Street 123\",\"SiteIdentifyingAddressIndicator\":\"Y\",\"CustomerAccountTypeName\":\"External\",\"AccountNumber\":\"8002\"}"}]}


Accepted Solutions
Highlighted
Nine Stars

Re: Trying to read Json File

This could be achieved using tFileInputJSON to read the json file and then use tExtractJSONFields to extract each node separately.

Sample job layout - 

tExtractJSONField-1.JPG

tFileInputJSON-1.JPG

tExtractJSONField-2.JPG

View solution in original post


All Replies
Highlighted
Nine Stars

Re: Trying to read Json File

This could be achieved using tFileInputJSON to read the json file and then use tExtractJSONFields to extract each node separately.

Sample job layout - 

tExtractJSONField-1.JPG

tFileInputJSON-1.JPG

tExtractJSONField-2.JPG

View solution in original post

Four Stars

Re: Trying to read Json File

Hi Abhishek,

Thanks for your solution, it help me alot

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog