Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

loading Split qvds giving different results to single qvd with same data

Ok i had a simple extract script which was:

INFOTABLE:

Load

  *;

SQL

SELECT *

FROM infotable

Store  INFOTABLE into $(vDetailsQVDDirectory)\INFOTABLE.qvd;

Drop table INFOTABLE;

exit script;

This extract was then used in a load script:

INFOTAB:

LOAD *

FROM

[$(vDetailsQVDDirectory)\INFOTABLE.qvd]

(qvd);

And loaded everything.

I then wanted to split the load for schedule efficiency and archive purposes to two separate extract scripts:

INFOTABLEPY:

Load

  *;

SQL

SELECT *

FROM infotable

WHERE YEAR != '2017';

Store  INFOTABLEPY into $(vDetailsQVDDirectory)\INFOTABLEPY.qvd;

Drop table INFOTABLEPY;

and

INFOTABLECY:

Load

  *;

SQL

SELECT *

FROM infotable

WHERE YEAR = '2017';

Store  INFOTABLECY into $(vDetailsQVDDirectory)\INFOTABLECY.qvd;

Drop table INFOTABLECY;

These are then loaded by using a load script with a * to pick them both up:

INFOTAB:

LOAD *

FROM

[$(vDetailsQVDDirectory)\INFOTABLE*.qvd]

(qvd);

However when loaded together the new way has less rows (and missing data) than the old way.

Why is this happening, I am not limiting any data?

Image to help people:

spliy.png

23 Replies
matthewp
Creator III
Creator III
Author

201378978487830022.49
2014172114548492788.36
2017124477028203.87
201118654108027.26
2015156306497404589.49
2016186531514705015.2
201219213518833421.51
swuehl
MVP
MVP

Still it could be helpful if you could identify the missing rows.

For example, are they missing in both 2017 and previous years or only in one of the extracts?

Besides this, it could be helpful to check the number of rows extracted from the DB in the three SELECT statements.

Does the number of rows already differ at that point or only after storing / loading from QVD?

matthewp
Creator III
Creator III
Author

Thats a valid point and a good way to dissect it!

FROM Qlikview:

OLD

PRE 2017 - 2017

460715       9645

NEW

PRE 2017 - 2017

452826        9654



SIDE NOTE: 9654 and 9645 are not typos

swuehl
MVP
MVP

Sorry, what exactly do these number show?

I am a bit confused to see two numbers for OLD.

matthewp
Creator III
Creator III
Author

OLD is the old way i loaded the data with a single extract and a single load

NEW is the new way i loaded the data with two extracts and a single load

swuehl
MVP
MVP

But if OLD is the single extract, how do you get the two numbers for the row count?

OLD

PRE 2017 - 2017

460715      9645

matthewp
Creator III
Creator III
Author

extract it to excel, put a filter on for 2017, count them, put a filter on for not 2017, count them

matthewp
Creator III
Creator III
Author

Also added an illustration to the question to visually show what I am doing

swuehl
MVP
MVP

Now you are adding another tool with a different filter on the data...

I was just asking to identify the first occurence of discrepancy between your approaches.

a) It already happens when extracting from DB --> Compare first SELECT, number of records, with 2nd and 3rd SELECT, sum of number of records retrieved.

b) it happens somewhere within Qlik, storing / loading the data

matthewp
Creator III
Creator III
Author

Got this working with correct data by defining both qvds with their own loads:

INFOTAB:

LOAD *

FROM

[$(vDetailsQVDDirectory)\INFOTABLEPY.qvd]

(qvd);

LOAD *

FROM

[$(vDetailsQVDDirectory)\INFOTABLECY.qvd]

(qvd);