Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ordner auslesen

Ich habe folgendes Script:

SET vPath = \\ov-qlikview\TheCubeData\monthlyData\;

for each file in FileList(vPath & '*.QVD')
delivery:

LOAD  
     *     
FROM
     $(file) 
     (qvd);
           
store * from delivery into \\ov-qlikview\TheCubeData\month_data_all.qvd (qvd); 
drop table  delivery;
next 

der auszulesenden Ordner enthält monatliche QVD-Dateien mit gleichem Aufbau und identischen Feldbezeichnungen.

Wenn ich das Script so laufen lasse erhalte ich systhetische Keys und das Script kommt nicht zum Ende.

Lasse ich den 'drop table delivery ' Befehl weg wird nur die letzte Datei mit Inhalt geschrieben.

Ich benötige eine Gesamtdatei aus allen einzulesenden QVD Dateien.

Wo ist mein Denkfehler?

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

I understand German but I am terrible at writing German so maybe it is OK with a English written answer for you:

If all the QVDs have the same structure - the exact same fields you should not get a synthetic key as you are experiencing.

One way of loading all the QVDs even if the files doesn't have exactly the same fields is to use a CONCATENATE LOAD which will force QlikView to read all these QVDs into one single table.

delivery:

LOAD * INLINE [

File

dummy

];

STORE * FROM delivery INTO "\\ov-qlikview\TheCubeData\month_data_all.qvd" (qvd);

CONCATENATE LOAD FileName() AS File,* FROM "\\ov-qlikview\TheCubeData\monthlyData\*.QVD";

DROP TABLE delivery;

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

I understand German but I am terrible at writing German so maybe it is OK with a English written answer for you:

If all the QVDs have the same structure - the exact same fields you should not get a synthetic key as you are experiencing.

One way of loading all the QVDs even if the files doesn't have exactly the same fields is to use a CONCATENATE LOAD which will force QlikView to read all these QVDs into one single table.

delivery:

LOAD * INLINE [

File

dummy

];

STORE * FROM delivery INTO "\\ov-qlikview\TheCubeData\month_data_all.qvd" (qvd);

CONCATENATE LOAD FileName() AS File,* FROM "\\ov-qlikview\TheCubeData\monthlyData\*.QVD";

DROP TABLE delivery;

Anonymous
Not applicable
Author

hallo Peter,

vielen Dank für Deine Hinweise.

Ich musste wieder einmal feststellen, dass gleich nicht gleich ist.

Die  Daten  kommen von verschiedenen  ausländischen Tochterunternehmen

und sollten den gleichen Aufbau haben.

Dies war leider nicht so.

Insofern war der Hinweis darauf, dass es keine sync-keys geben kann, wenn der Aufbau gleich ist,

schon sehr hilfreich.

Auf jeden Fall hat der kurze Dialog meine Denkblokade gelöst.

Vielen Dank dafür