Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
I'm using this load script to loop through a folder to load QVDs:
For each File in FileList ('..\..\QVD\*.qvd')
$(vTable):
LOAD
*
FROM
$(File)
(qvd);
Next File
But, when I look at the loaded tables each table has the full filepath as its name. Eg , Sales.QVD has been loaded as :
'D:\Dev\Qlik\Apps\SalesForce\QVD\Sales' where as I need the table loaded as 'Sales'
There are 5 more QVDs that I need to load from the QVD folder and the same is happening to each QVD.
Can anyone help?
Thanks!
Phil
It looked that your variable vTable isn't valid and therefore qlik autogenerates the filename from the path. You could try the following:
For each File in FileList ('..\..\QVD\*.qvd')
let vTable = subfield(subfield('$(File)', '\', -1), '.', 1);
[$(vTable)]:
LOAD
*
FROM
$(File)
(qvd);
Next File
- Marcus
It looked that your variable vTable isn't valid and therefore qlik autogenerates the filename from the path. You could try the following:
For each File in FileList ('..\..\QVD\*.qvd')
let vTable = subfield(subfield('$(File)', '\', -1), '.', 1);
[$(vTable)]:
LOAD
*
FROM
$(File)
(qvd);
Next File
- Marcus
Perfect - thanks!