Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikandlearn
Contributor III
Contributor III

Left join + Load * resident throws error

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.

Labels (1)
7 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi,

Does your script have more code?

Can you post the reload log?

Qlikandlearn
Contributor III
Contributor III
Author

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;

Qlikandlearn
Contributor III
Contributor III
Author

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..

fosuzuki
Partner - Specialist III
Partner - Specialist III

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.

Brett_Bleess
Former Employee
Former Employee

See the following Article link on how to enable Script/Document logging:

Enable Script/Document Logging 

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Qlikandlearn
Contributor III
Contributor III
Author

Thanks for your responses, this issue has resolved.

Brett_Bleess
Former Employee
Former Employee

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

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.