Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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;
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;
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