Hello, I followed the steps from the example with facebook friends, but with a different json, but valid. this are the errors that I receive: statistics] connecting to socket on port 4033 connected java.io.IOException: Illegal character: <g> A JSONObject text must begin with '{' at character 1 of 1391433900 java.io.IOException: Illegal character: <g> java.io.IOException: Illegal character: <s> A JSONObject text must begin with '{' at character 1 of ENTER_LOC thi is a long message for all the values from my json. Please let me know if you have any ideea why I have this error. (I am using talend for the first time.) Thank you!
so for me the "likes/data" is actually "events/params" , and "user/friends" is actually all json data "$."
I can send also print screen with my settings
Thanks you!
{
"sessionTimestamp":1391433900,
"accountId":"stage-local",
"events":,
"userId":"100006603450795",
"tracking":{
"accountId":"stage-local",
"created":1391434031,
"createdMicroTimestamp":1391434031.2963,
"type":"session",
"userId":100006603450795,
"sessionTimestamp":1391433900
}
}
If you read json data from a file, you don't need a tExtractJsonField component, only use a tFileInputJson and set the loop jsonpath query as "/events/params", and then you are able to extract all the values, see my screenshot. As a newbie, I would suggest you to create a json metadata follows the wizards step by step.
Shong
Like the sample in the component manual, you can read the events node from the json file, and then extract the values from the events node with tExtractJsonField, see my screenshots, however, only with a tFileInputJson component is enough to read the data from the json file.
Shong
If you read the first node of the json file with query path "$.", tFileInputJson do not return an normal json string, the result do not start with the syntax {, (you can test it by yourself, add a tLogRow after tFileInputJson to print the result on the console), that leads to the failure on tExtractJsonField, that's why you get the error "A JSONObject text must begin with '{' at character 1 of 1391433900" in your job.
Shong