Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
asvalcuende
New Contributor II

WHERE Statement in REST Connection

Hello,

After loading data using a REST Connector I need to include a WHERE statement as follows, but it's not working. It returns an error that i can't understand. Is it possible to include a WHERE there?

RestConnectorMasterTable:

SQL SELECT

"Status",

"High",

"Low",

"Open"

FROM XML "StockQuote"

WHERE [Status]='SUCCESS';


[StockQuote]:

LOAD [Status],

[High],

[Low],

[Open]

RESIDENT RestConnectorMasterTable;


DROP TABLE RestConnectorMasterTable;


WHERELOCO.JPG


I've tried many options, please, help.


Thanks,


Alazne.

3 Replies

Re: WHERE Statement in REST Connection

Try below

1 : RestConnectorMasterTable:

Load * Where Status='SUCCESS';

SQL SELECT

"Status",

"High",

"Low",

"Open"

FROM XML "StockQuote"

WHERE [Status]='SUCCESS';


2:

SQL SELECT

"Status",

"High",

"Low",

"Open"

FROM XML "StockQuote";


[StockQuote]:

LOAD [Status],

[High],

[Low],

[Open]

RESIDENT RestConnectorMasterTable

where Status = 'SUCCESS';


DROP TABLE RestConnectorMasterTable;


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
asvalcuende
New Contributor II

Re: WHERE Statement in REST Connection

Thanks, it seems that preceding load works, but i undestand that preceding load filters data after loading it.

What I need, because of the data volume, is to filter data while loading (SQL SELECT) and thus reduce the volume of downloaded data. Is that possible?

Re: WHERE Statement in REST Connection

Hi,

I did not remember properly Some where I read that you can't write where clause on XML data...

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.