tREST->tExtractJSONFields empty result

Four Stars kee
Four Stars

tREST->tExtractJSONFields empty result

Hi all, I am using tREST to retrieve data from openweathermap.org with the following API call:

"http://api.openweathermap.org/data/2.5/forecast?id=5128581&APPID=845db74f9ad508bb72241cafec6f534f"

I get the data and can save it in a file locally. But I only need dt_txt and description. So I would like to extract this information directly from the tREST-component. In the screenshot my job design can be seen.

extractWeather-1.png

The result is unfortunately empty.

extractWeather-2.png

I tried with other tool to see if my Path Expression is correct and there it worked, so this shouldn't be the issue.

Can anyone point me to what I might be doing wrong and what I can do to make it work?

Thanks for help.


Accepted Solutions
Eight Stars

Re: tREST->tExtractJSONFields empty result

Looks like you have the loop query defined twice. Try deleting:

$.list[*]

from each json_query field.

The fields should just be:

2018-02-05_8-31-19.png

 

View solution in original post


All Replies
Eight Stars

Re: tREST->tExtractJSONFields empty result

Looks like you have the loop query defined twice. Try deleting:

$.list[*]

from each json_query field.

The fields should just be:

2018-02-05_8-31-19.png

 

View solution in original post

Four Stars kee
Four Stars

Re: tREST->tExtractJSONFields empty result

Yes, this was my mistake, thank you so much for help.

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

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

Blog