extract fields from JSON and assign to globalmap

Highlighted
Seven Stars

extract fields from JSON and assign to globalmap

Hello Talendians,

How do i extract fields from JSON and assign it to globalmap so that i can reuse the values for later use in downstream components?

Tinputfilejson-->TextractJSON-->Tlogrow-->tglobalmap.

This is the data flow i designed. 

 

Can someone explain me how i need to configure the json components?

 

My JSON File is as follows:

{

 "name":"Corporation"

 

"data":{

"category":"shopping",

"type":"debit",

"dsani":[

{

"dsani":{

"name":"david",

"occupation: "software engineer"

}

{

]

},

................Next few lines.

 

Do i need to use json path withoutloop for this? If someone can share me example or a reference that would be great.

 

 

Tags (2)
Highlighted
Moderator

Re: extract fields from JSON and assign to globalmap

@desanip , your design should be like below. you need to define the xloop path based on it it will extract the particular field from json and set it in global map.

 

tfileinputjson-->tLogrow-->tGlobalmap

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Seven Stars

Re: extract fields from JSON and assign to globalmap

Aren’t we supposed to use textractjsonfield component after input json.

Can you take a look at my json file that I am trying to extract and would appreciate if you could show me how to configure this. Thanks
Highlighted
Moderator

Re: extract fields from JSON and assign to globalmap

@desanip , Realy not sure about you input json structure ,based on the inputput structure if you are getting json string as single column which you need to extract then you need to use tExtractJsonfields component.

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now