Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Cherichoc-
Creator
Creator

Extract API data and using tExtratDelimtedFileds and tNormalize

I have a job that extracts data from an API.

My struggle is extracting the data from the API to columns in tExtractDelimetedFields. The API data is something like:

[{"Day": 01","Name":"John",Surname":"Doe","Attended":"Yes"},{"Day": 01","Name":"Peter",Surname":"Pan","Attended":"No"},

,{"Day": 01","Name":"Cindy",Surname":"Rella","Attended":"Yes"}]

The expected results is for the fields to be in a table in their columns which i will be able to do.

Not sure if my item separator is correct as i am not familiar with regex

tExtractDelimitedFiled field separator as well, my input fields are body and error_msg, outputfields are Day, Name, surname, attended

1 Solution

Accepted Solutions
gjeremy1617088143

I've tried with this Json :

[{"Day":"01","Name":"John","Surname":"Doe","Attended":"Yes"},

{"Day":"01","Name":"Peter","Surname":"Pan","Attended":"No"},

{"Day":"01","Name":"Cindy","Surname":"Rella","Attended":"Yes"}]

 

I used tFileInputRaw and tConvertType to simulate your json return from api

 

0695b00000OA3BIAA1.jpg0695b00000OA3AtAAL.jpg

View solution in original post

4 Replies
gjeremy1617088143

Hi, you can use tExtractJSONFields component, it will fit better for your use.

https://help.talend.com/r/en-US/7.3/processing/textractjsonfields

Send me love and kudos

Cherichoc-
Creator
Creator
Author

How would I Loop jsonPath query and also map the columns

 

gjeremy1617088143

I've tried with this Json :

[{"Day":"01","Name":"John","Surname":"Doe","Attended":"Yes"},

{"Day":"01","Name":"Peter","Surname":"Pan","Attended":"No"},

{"Day":"01","Name":"Cindy","Surname":"Rella","Attended":"Yes"}]

 

I used tFileInputRaw and tConvertType to simulate your json return from api

 

0695b00000OA3BIAA1.jpg0695b00000OA3AtAAL.jpg

Anonymous
Not applicable

I cover this in a series of tutorials/blogs about working with Slack. You can find tutorial 2 here....

https://community.talend.com/s/article/Sending-Slack-messages-with-Talend-part-2-Collecting-your-Slack-data

 

At steps 8 and 18 I show how to iterate over arrays in JSON.