Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We recently moved our data to run on a different Disk Drive than the Qlikview application to help run the Servers more efficiently.
Now when I try to reload the data I keep hitting a table not found error for the below scripts.
Error:
Table Not Found Error
Table 'Assets' not found
Store Assets into \\MyServerName\E$\Data-Lite\S1-Assets.qvd (qvd)
Essentially just loops through the matching files from certain filepath.
I can access files no problem and write no problem, but this script isn't happy with the change of location.
LET vPartFileName = '\API_AssetDetails*.csv'; //evaluate identity of source excel document. Note wildcard in place of date.
set vFilesFoundCounter = 0; // add v0.5
FOR EACH File IN filelist ('$(vFolder)' & '$(vPartFileName)') //loop through each file from source data folder. Filelist syntax generates, in this instance, excel\Asset Details*.xlsx
LET vFilename = subfield('$(File)', '\', -1); // determines actual filename. Based on string of file (excel\Asset Details*.xlsx). Looks for part of string 1 from the right, delimited by '\'.
Assets:
NoConcatenate
LOAD
FileMonthStartDate,
[Asset Number],
[Model Name]
FROM $(\\MyServerName\E$\excel\)$(vFilename)
(txt, utf8, embedded labels, delimiter is ',', no quotes, no eof);
let vFilesFoundCounter = '$(vFilesFoundCounter)' + 1;
Next File
Store Assets into \\MyServerName\E$Data-Lite\S1-Assets.qvd (qvd);
Drop Table Assets;
Hi All,
So unfortunately I found the solution and it was just to remove most of the logic in the file name finder.
Just added an Asterisk to the Filename location as a Wildcard Character and it works.
So the below is now how my script looks.
Assets:
LOAD
FileMonthStartDate,
[Asset Number],
[Model Name]
FROM \\MyServerName\E$\excel\API_AssetDetails*.csv
(txt, utf8, embedded labels, delimiter is ',', no quotes, no eof);
Store Assets into \\MyServerName\E$Data-Lite\S1-Assets.qvd (qvd);
Drop Table Assets;
You could have a look at your datamodel, so comment the store and drop command and do CTRL+T to see what tables are available in your datamodel, looks like the Assets table is not available with that name.
Hi,
Have you checked if file exists in the below location
$(\\MyServerName\E$\excel\)$(vFilename)
Also try loading the excel from the qliks load button in the script to check the file location is same
Yes as advised, the error is not on finding the file.
It's on the Storing section.
Thanks but it's definitely there when you do the Table Viewer
Hi All,
So unfortunately I found the solution and it was just to remove most of the logic in the file name finder.
Just added an Asterisk to the Filename location as a Wildcard Character and it works.
So the below is now how my script looks.
Assets:
LOAD
FileMonthStartDate,
[Asset Number],
[Model Name]
FROM \\MyServerName\E$\excel\API_AssetDetails*.csv
(txt, utf8, embedded labels, delimiter is ',', no quotes, no eof);
Store Assets into \\MyServerName\E$Data-Lite\S1-Assets.qvd (qvd);
Drop Table Assets;