Scenario 4: Extracting JSON data from a URL
In this scenario, tFileInputJSON retrieves data of the
friends node from the JSON file facebook.json on the Web that contains the data of a Facebook
user and tExtractJSONFields extracts the data from the
friends node for flat data output.
The JSON file facebook.json is deployed on the Tomcat
server, specifically, located in the folder <tomcat
path>/webapps/docs, and the content of the file is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
{"user": { "id": "9999912398", "name": "Kelly Clarkson", "friends": [ { "name": "Tom Cruise", "id": "55555555555555", "likes": {"data": [ { "category": "Movie", "name": "The Shawshank Redemption", "id": "103636093053996", "created_time": "2012-11-20T15:52:07+0000" }, { "category": "Community", "name": "Positiveretribution", "id": "471389562899413", "created_time": "2012-12-16T21:13:26+0000" } ]} }, { "name": "Tom Hanks", "id": "88888888888888", "likes": {"data": [ { "category": "Journalist", "name": "Janelle Wang", "id": "136009823148851", "created_time": "2013-01-01T08:22:17+0000" }, { "category": "Tv show", "name": "Now With Alex Wagner", "id": "305948749433410", "created_time": "2012-11-20T06:14:10+0000" } ]} } ] }} |
Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Login
0 Comments