How to read JSON file with multiple arrays in a node

Highlighted
Seven Stars

How to read JSON file with multiple arrays in a node

I am using Talend for BigData 6.3.1 and trying to read JSON file with below format using tFileInputJSON(JsonPath without Loop) and tExtractJSONFields(XPath). I am able to extract records up to one level but unable to split it further. Now I need help to extract data under the fields rows, cells and field_def. 

 

Sample.json

{
columns {}
top_level_rows [1,2,...10]
rows:{
1 {
ref
child_refs -- empty array []
id
}
....
10 {
ref
parent_ref
child_refs
id
}
}
cells
[[ --(embedded array [])
[[
{
id
value
id
name
row
},
....
{
id
value
id
name
row
}
]],
[[
{
id
value
id
name
row
},
....
{
id
value
id
name
row
}
]],, ....
]]
field_def:
{
11: {
ref
table
}
.....
20: {
ref
table
}
}
}

 

I am new to Talend and need help to proceed. I googled a lot but unable to find anything for such scenarios.

 

Regards,

Keerthi


Accepted Solutions
Seven Stars

Re: How to read JSON file with multiple arrays in a node

Thanks Sabrina. This link help me to understand further.

 

Perfect solution I was looking for is in https://community.talend.com/t5/Design-and-Development/Parsing-JSON-with-tExtractJSONFields/m-p/1596...

 

Just posting here so that it might help others


All Replies
Moderator

Re: How to read JSON file with multiple arrays in a node

Hello,

Please try to two tExtractJSONField components in your job design.

Could you please take a look at this topic about:https://community.talend.com/t5/Design-and-Development/JSON-Array-values-to-Rows-is-there-a-better-w... to see if it is OK with your use case?

Best regards

Sabrina

 

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

Re: How to read JSON file with multiple arrays in a node

Thanks Sabrina. This link help me to understand further.

 

Perfect solution I was looking for is in https://community.talend.com/t5/Design-and-Development/Parsing-JSON-with-tExtractJSONFields/m-p/1596...

 

Just posting here so that it might help others

Community Manager

Re: How to read JSON file with multiple arrays in a node

Thanks for cross-referencing and posting the solution

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

Self-service Talend Migration: Moving from On-Premises to the Cloud

Move from On-Premises to the Cloud by following the advice of experts

Read Now

Modern Data Engineering in the Cloud

Learn about modern data engineering in the Cloud

Watch Now

How to deploy Talend Jobs as Docker images to Amazon, Azure and Google Cloud reg...

Learn how to deploy Talend Jobs as Docker images to Amazon, Azure and Google Cloud registries

Blog