Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I have about 100 QVD files is it there a way to simplify loading process

Hello Peeps,

I have many QVD files from SAP BW; is there a way to cross load my files to load from one extension than having many extension? I have some similar fields in my QVD's. How do I go about this.

6 Replies
Not applicable
Author

If it has same data and fields I would do an outer join/concatenation of the tables and bring it up to as minimal number QVDs as possible using resident in the same QVW.

JonnyPoole
Employee
Employee

I see three loads in the QVW from 3 different QVDs with many of the same fields but also with many calculated fields.

You can do a *.qvd  load with concatenate to auto stack the rows in all QVDs into 1 big table in QLIK. Then perform all your calculated expressions through a resident load .

Something like this:

//Placeholder Table

TempData:

LOAD * INLINE [

    Month

];

//Concatenate all QVDs

Concatenate (TempData)

LOAD *

FROM

(qvd);

Data:

Load

     < PERFORM ALL EXPRESSIONS FOR CALCULATED FIELDS HERE >

resident TempData;

drop table TempData;

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You will need to loop around each file.  As long as the files have been pre-cleaned with the correct data structure (eg. the correct field name to associate with other files) this will work okay.

The code will be something like this:

for each vFile in FileList('.\MyQVDFolder\*.qvd')

     LOAD

         *

     FROM $(vFile) (qvd);

next

QlikView will auto concatenate all files which share the same field structure (all files from a particular SAP source should have the same structure) and will associate in the data model the others.

You will hit serious problems if the QVD's have not been pre-tidied to have the correct data model in them though.

Hope that helps,

Steve

ecolomer
Master II
Master II

Hi,

You need some bucle.

An example:

/p07.png

for qvd files, you need explicit MyFyle.qvd(qvd)

ecolomer
Master II
Master II

In this example I have some files (about 70) in some directories

The initial directory are ...

DIRECTORY C:\Mis lugares Web\F1\www.statsf1.com\es;

Set Root='C:\Mis lugares Web\F1\www.statsf1.com\es';

And I have som directories with ther year name ...

C:\Mis lugares Web\F1\www.statsf1.com\es\2013

C:\Mis lugares Web\F1\www.statsf1.com\es\2012 ... and so

And into each directory (year) I have some files with this template: class*.html

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

This is why enumerating around a number of files hardly ever works.  There is almost always things you need to do to each file as you load it.

You could use the qualify and unqualify statements to manage how joins happen - as you are in your uploaded example.

It also sounds like you need to put another tier of loading in, to merge your first level QVDs into a second more structured level of QVDs - perhaps merging data from multiple QVDs using ApplyMap, Concatenate and JOIN.

I've a blog post on ApplyMap that you may find helpful:

http://bit.ly/kQcAZ5

Steve