Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tRest and map JSON with tExtractJSONField with TALEND

I'm quite new to Talend and I am stuck with getting JSON data using tRest.
We Suppose that I am trying to get all posts from social networks.
That's why I am using  to get data which is formatted in JSON.
Here is one of the scenarios I tried. I have an output JSON data like this from  with 2 posts as example, I removed some nodes to clarify ... :
{
"posts":
       
   },
   {
       "network": "Facebook",
       "post_id": "547835328170823680",
       "text": "#tunisia .. #tunis",
       "html": " ",
       "permalink": " ",
       "post_time": 1777449095,
       "user_id": "159995522",
       "user_name": " ",
       "user_real_name": " ",
       "user_profile_image_url": " ",
       "hashtags":        
   }
]
}

Here's the first Talend job :

And I configured tExtractJSONField to extract text field from the data as below :


In fact, I need these fields : newtork, text, post_time, and the list of hashtags.
Because of Body on the Mapping table, I think I can not add more attributes to map the rest of fields.
I found there's a way to map data with tXMLMap where the body field can be extended to add more fields :

I believe there's a way do the same thing for JSON but I dont know how and I wait for your help.
Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,
Thanks for help, I found how to do the mapping.
0683p000009MBpE.jpg

0683p000009MCAF.jpg
Now I have a little problem, I need to extract hashtags, which are in array like this :
"hashtags":      

The problem is the node hashtags return only the first tag!
And I want to see all tags, like "tag1, tag2, ..."
I wait for your help.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi,
Your screenshots are not available for us. Could you please upload your image by chicking "Upload" button or dropping your file into "Drop files here to attache them" field directly?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
Thanks for help, I found how to do the mapping.
0683p000009MBpE.jpg

0683p000009MCAF.jpg
Now I have a little problem, I need to extract hashtags, which are in array like this :
"hashtags":      

The problem is the node hashtags return only the first tag!
And I want to see all tags, like "tag1, tag2, ..."
I wait for your help.