Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI, I'm trying to execute this script in Qlikview
1. from 1st tab :
Req:
LOAD Source as Cube,
Source&'-'&DIMID&'.QVD' as QvdFile,
DIMID,
RECORDS,
Color,
StatusText
FROM
[..\Data Refresh Time\CO_Actual_Record_Counts.qvd](qvd)
where [End Time] > MonthStart(Today()-500);
Trace ----------------------------------------;
2. From 2nd tab:
Sub GetQvdFiles(FilePath);
For each File in filelist ('$(FilePath)');
Files:
Load
'$(File)' as FileName,
Mid('$(File)',Index('$(File)','\',-1)+1,len('$(File)')-Index('$(File)','\',-1)) as QvdFile,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT;
left join(Req)
Load * Resident Files;
Drop Table Files;
ENDSUB;
when I'm reloading the script, it throws an error like "Table Files not found", any thoughts???
Thanks.
Hi,
Does your script have more code?
Can you post the reload log?
Thanks for your response.
The script is failing as it's throwing an error as "Table Files not found left join(Req)
Load * Resident Files;
Drop Table Files;".
Do I need to add or change any to the script?
When I comment the below three lines, it's working, but the qvd's it creates may not have accurate data
left join(Req)
Load * Resident Files;
Drop Table Files;
Please find the script what I have from 2 different tabs from Edit script..
Sub GetRequests;
Trace ----------------------------------------;
Trace Load requests;
//Req:
//Load '$(Cube)' as Cube,
// '$(Cube)-'&DIMID&'.QVD' as QvdFile,
// *;
//Select DIMID,
// SID_0REQUID
//From /BIC/D$(Cube)P;
Req:
LOAD Source as Cube,
Source&'-'&DIMID&'.QVD' as QvdFile,
DIMID,
RECORDS,
Color,
StatusText
FROM
[..\Data Refresh Time\CO_Actual_Record_Counts.qvd](qvd)
where [End Time] > MonthStart(Today()-500);
Trace ----------------------------------------;
ENDSUB;
Sub GetQvdFiles(FilePath);
For each File in filelist ('$(FilePath)');
Files:
Load
'$(File)' as FileName,
Mid('$(File)',Index('$(File)','\',-1)+1,len('$(File)')-Index('$(File)','\',-1)) as QvdFile,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT;
left join(Req)
Load * Resident Files;
Drop Table Files;
ENDSUB;
Thanks in advance..
The reload log would probably tell us what is going on, but it is hard to help you if you don't help us...
A wild guess is that the SUB is called with a FilePath which doesn't have any files.
See the following Article link on how to enable Script/Document logging:
Enable Script/Document Logging
Regards,
Brett
Thanks for your responses, this issue has resolved.
We would appreciate it if you would properly close out the thread by using the Accept as Solution button on the post(s) that helped you resolve the issue, or if you figured out something different, please post what you did and then mark that as the solution so others will know what the issue was and what you did to address it.
Regards,
Brett