Extracting JSON data from REST service

One Star

Extracting JSON data from REST service

Hello, I have a v 5.2.2. REST component calling to the NOAA v2 web service for weather station data. I'm having an issue with extracting the JSON data, however.  In 5.2.2 there isn't a ExtractFieldsJSON component to use, so I've tried two approaches 1.)the tParseJSON custom component and the 2.) tJSONNormalize.  This is a extract of the Json data -
For the tParseJSON component , I have tried just extracting the station identifier from the component (attached)

The mapping looks like tREST -> tParseJSON -->  tLogRow. The job executes with no error, but no data is output. I've tried the  tJSONNormalize component, but I'm not sure what values to place in the "Start Path for Extracting values" and "Delimiter for path representation". I've tried different values, but I've gotten nowhere. Does anyone perhaps recognize where my error is?
Seventeen Stars

Re: Extracting JSON data from REST service

Please set as loop path: 
To your question regarding the component tJSONNormalize:
This component returns all key-value pairs for all simple values.
In your case keep the start path for extracting empty.
The component returns the path to the current key-value-pair and the Delimiter for path representation is simply the char between the attribute names. I would set a dot here. 
In ayour case you simplle have to filter the output for the attribute-name station. The filtering can be done in a tMap or tFilterRow.
Here the documentation of the component (was also linked in the component detail page in Exchange).

Re: Extracting JSON data from REST service

i want to achieve the same as @travis1585 but i am actually using tExtractJSONFields. however the first component i use is tREST, i use a REST API from JIRA and it runs without an error but only retrieves one single row...
see screenshot for my Job, in the first place i would like to retrieve all data from the REST API that i get from JIRA and later on filter for specific atributes.

NB. also i would like to add that when i use just tREST --> tLogRow, i only get the first part of the REST API JSON code... i don't get the whole REST API from JIRA. when i paste the url in the browser i do see the entire code...does anoyone know what i am doing wrong?
the URL in tREST = "https://jira..nl/rest/api/latest/search"
and the HTTP headers are: 
name: "jql" 
value: "issues=san-145
so the complete URL in the browser would be: https://jira..nl/rest/api/latest/search?jql=issue%3Dsan-145


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables


Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables


Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema