Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Load Multiple QVDs

Good Morning Friends,

I have set of QVDs having data from same table, but column structure of qvd's are different. Few of QVDs has 10 columns & few has 15 columns. First 10 columns are same in both cases & later 5 columns being added to new data. For Historic data , structure didn't changed. Here my question is how to load all of them into a single QVD ?


1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

SET vIndex  = 1;

FOR EACH file in FileList('filepath\*.qvd');


IF vIndex = 1 THEN

Data:

LOAD

*

FROM $(file) (qvd);

ELSE

Concatenate(Data)
Load * ,

From $(file) (qvd);

ENDIF


LET vIndex = vIndex + 1;

Next

View solution in original post

15 Replies
jagan
Partner - Champion III
Partner - Champion III

HI,

Try like this

Data:

LOAD

Column1,

Column2,

'

'

'

'

Column15

Autogenerate 0;

Concatenate(Data)

LOAD

*

FROM *.qvd (qvd);

Note: Replace Column1, Column2, ..... Column15 with your actual column names.

If this is not working then use loop to read each and every file.

FOR EACH file in FileList('filepath\*.qvd');

Data:

LOAD

Column1,

Column2,

'

'

'

'

Column15

Autogenerate 0;



Concatenate(Data)
Load * ,

From $(file) (qvd);

Next

Regards,

Jagan.

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks Jagan. Is there a way to do same without mentioning column names ? In feature if somebody adds new column to source without the help of developer it should work.

BTW I will check the above code.

HirisH_V7
Master
Master

Hi,


If your done with all QVD's Transformations then,

Test_QVD:

Load *

From ;

Store Test_QVD into [TEST\Final.QVD];


Hope this Helps,

Hirish

HirisH
manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

This will not work, since structure is different it will create 2 tables

PradeepReddy
Specialist II
Specialist II

try like this..

LOAD * FROM QVD_Path\*.qvd (qvd);

Anonymous
Not applicable

Why not concatenate them??

And use a common Flag to differentiate all the tables??

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

How to concatenate ? I don't know from which QVD the structure is going to change ? I am looking for generic solution.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

SET vIndex  = 1;

FOR EACH file in FileList('filepath\*.qvd');


IF vIndex = 1 THEN

Data:

LOAD

*

FROM $(file) (qvd);

ELSE

Concatenate(Data)
Load * ,

From $(file) (qvd);

ENDIF


LET vIndex = vIndex + 1;

Next

Anonymous
Not applicable

As per you, Set of QVDs from same table. It seems you are creating multiple QVDs from same Table with different different conditions, Is it right??

Now Say, I am having a table XXX, and I am going to drive two tables from this which is: XXX1, XXX2

XXX1:

Load

A,

B,

'XXX1' as Flag

Resident XXX;

Concatenate(XXX1)

XXX2:

Load

B,

C,

D,

'XXX2' as Flag

Resident XXX;

and so on...What would be the issue in this case??

Drop table XXX;