Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

JSON SQL WITH WHERE CLAUSE

Hello,

I am facing a problem with sql json from Rest API. I can not find how i filter the data that i get from API.

I have the following script

SQL SELECT
"count",
"__KEY_root",
(SELECT
"id",
"label" AS "label_u0",
"timeslotSizeInMin",
"timezoneCode",
"standalone",
"schedulingMode",
"distanceUnit",
"createdAt",
"modifiedAt",
"__KEY_division",
"__FK_division",
(SELECT
"label",
"lat",
"long",
"__FK_address"
FROM "address" FK "__FK_address"),
(SELECT
"from",
"till",
"__FK_timeslots"
FROM "timeslots" FK "__FK_timeslots")
FROM "division" PK "__KEY_division" FK "__FK_division"),
(SELECT
"serverTrackingId",
"__FK_trackingData"
FROM "trackingData" FK "__FK_trackingData")
FROM JSON (wrap on) "root" PK "__KEY_root";

how can i have where clause condition in order to get data from date to date in the field "createdAt"

I mentioned that the field "createdAt" is a timestamp

Can anyone have a solution for this ?

 

Thank you in advanced.

 

 

2 Replies
Marcos_Ferreira_dos_Santos

Hi Geogou1973,

Have you solved this question by yourself ?

In a glance, it seems that you could put a WHERE clause following the 'FROM "division"'... or use Nested Load to filter the final result.

Good luck!

 

Akash_Pohare
Contributor III
Contributor III

Hello @geogou1973 ,

Were you able to use where condition on SQL statement itself?

Could you please provide the solution if you have,

I have same requirement.

Thanks.