Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Nikos_Lamprinakos
New Contributor

Re: Where exists function giving error in Qlik Sense Nov 2018 release

Hi Marcus,

I think it mostly impacts the scenario you mention, as these are were one can benefit from optimized loads.

Slightly changing your example, you will get an error in the following scenarios:

Scenario 1: Not loading the YEAR field in the table

dummy: load year(today()) as YEAR autogenerate 1;

table: load 

[field 1]
,[field 2]

 from QVD where exists(YEAR);

drop tables dummy;

 

-this will result in 'unknown load statement error'

Scenario 2: Rename YEAR in table

dummy: load year(today()) as YEAR autogenerate 1;

table: load 

[field 1]
,[field 2]
,YEAR as [Sales Year]

 from QVD where exists(YEAR);

drop tables dummy;

-this will result in 'unknown load statement error'

 

You can avoid the error with Exists(YEAR,YEAR), but the load will not be optimized.

My workaround so far to keep the load optimized is to include the field without renaming it, and then dropping it. It however feels counter-intuitive so I would really like your suggestions.


Nikos

Highlighted

Re: Where exists function giving error in Qlik Sense Nov 2018 release

I could admit that both scenarios work with older releases (at least QV 11.2 SR12). Currently I couldn't remember that I use exists() anywhere in such a way (because the exists-field is an essential part of the - usually - incremental loadings and also there is seldom a need to rename it) and I assume it as rather unlikely that I would do it in the future.

Nevertheless it would be interesting why Qlik has changed this functionality and what others think about it:

Henric Cronström

Rob Wunderlich

Stefan Wühl

Gysbert Wassenaar

nsm1234567
Contributor

Re: Where exists function giving error in Qlik Sense Nov 2018 release

Yeah, a response on this would be really helpful as this is going to have a huge impact in our environment.  Almost all of our loads in Qlikview and Qliksense use this method to keep the load optimised.  We've also discovered that if a particular field is not included in the load of the where exists it'll fail.  So the below sort of code:  which used to work for us now fails:

TABLE1:

LOAD companyNumber

FROM QVD;

TABLE2:

LOAD someOtherField

FROM SOME_OTHER_QVD_THAT_CONTAINS_COMPANYNUMBEr

WHERE EXISTS companyNumber;

 

 

This is extremely frustrating!

Community Browser