Qlik Community

Ask a Question

App Development

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

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Loading Multiple QVDs with wildcard

Hi,

I'm using the following script to load identical QVD files:

Targets_Metrics:

LOAD *,

Target_Date            as Date

From $(vPathTempData)Target_NO*.qvd (qvd);

STORE Targets_Metrics into $(vPathQVD)Targets_Metrics.qvd (qvd);

DROP Table Targets_Metrics;

But after dropping the table, there is a table with that name left in the model:

Why does it happen?

Thanks!

1 Solution

Accepted Solutions
jonathandienst
Partner
Partner

The QVD files do not have identical fields, so the QVD was not concatenated and a -1 table was created. The DROP table references the original table only. This script will enforce the concatenation:

Targets_Metrics:

LOAD 0 as Date AUTOGENERATE 0;  // create empty table as concatenation target

Concatenate(Targets_Metrics)             //force concatenation

LOAD *,

Target_Date            as Date

From $(vPathTempData)Target_NO*.qvd (qvd);

STORE Targets_Metrics into $(vPathQVD)Targets_Metrics.qvd (qvd);

DROP Table Targets_Metrics;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner
Partner

The QVD files do not have identical fields, so the QVD was not concatenated and a -1 table was created. The DROP table references the original table only. This script will enforce the concatenation:

Targets_Metrics:

LOAD 0 as Date AUTOGENERATE 0;  // create empty table as concatenation target

Concatenate(Targets_Metrics)             //force concatenation

LOAD *,

Target_Date            as Date

From $(vPathTempData)Target_NO*.qvd (qvd);

STORE Targets_Metrics into $(vPathQVD)Targets_Metrics.qvd (qvd);

DROP Table Targets_Metrics;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

dafnis14
Specialist
Specialist
Author

Thanks, Jonathan!

Tremendous help!

You are right... the tables were not identical..

The original script did concatenate and stored only the identical ones, and the table Target_Metrics-1 has the different one...