Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Talend job I'm working in Desktop Studio where I am using the tExtractJSONFields component and it is bringing in NULL values for one of the fields. All other data is being extracted from the JSON correctly. The field in question has a "." in the title and I suspect this may be part of the issue. The field is named: studio_flow_executions_aggregated.flow_execution_finished_time . The problem is that the exact same JSON extract component on our PROD environment is properly extracting the data from this field. In DEV I changed where the extract component is outputting data to and this is the only change I made. I did not change the extract component itself but a tLog_Row component is proving that it is the extract process itself that is not picking up the field, not the output table mapping.
Just to prove that the field has the "." I have also attached a screenshot of the same API call posted in Postman where the field populates with data and proof in our Snowflake table that the PROD table is loading this same data with no issues.
Has anyone run into this problem before and does anyone have any advice on how to troubleshoot?
Can you share an example of the JSON in text.....including any loops? Your JSONPath queries don't look as I would expect, but I cannot go much further without seeing the JSON. Don't share private data, but if you can put together an example of the kind of thing you are working with, I may be able to help.
From looking at the path that is not working, I *think* that this is because of the dot in the middle of the name. A way of trying this is to change it to this.....
['studio_flow_executions_aggregated.flow_execution_finished_time']
The square brackets with the single quotes should prevent this issue.
Can you share an example of the JSON in text.....including any loops? Your JSONPath queries don't look as I would expect, but I cannot go much further without seeing the JSON. Don't share private data, but if you can put together an example of the kind of thing you are working with, I may be able to help.
From looking at the path that is not working, I *think* that this is because of the dot in the middle of the name. A way of trying this is to change it to this.....
['studio_flow_executions_aggregated.flow_execution_finished_time']
The square brackets with the single quotes should prevent this issue.
Thank you @Richard Hall - this was exactly the solution.
So to recap:
The issue is that the incoming JSON field name has a period "." as a special character. To solve for this, wrap the field name with [ ] and single quotes ' ' so the entire string can be read.
Original (non-working) path mapping: $.studio_flow_executions_aggregated.flow_execution_finished_time
Solution: $.['studio_flow_executions_aggregated.flow_execution_finished_time']
I knew it was something simple. I just couldn't figure out how to get the program to read the whole field as a string. Thanks again!
Not a problem. Glad it worked