Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Georgy_Paul
Contributor II
Contributor II

Loading a qvd file

LOAD DISTINCT FileName() AS [QVD_File]
FROM [First QVD\*$(vRecord)*.qvd] (qvd)
WHERE WildMatch(FileName(),'*ABC*') = 0

 

What is the effective meaning of the path after FROM if vRecord is some variable ?

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Yes  record is a variable. You are trying to read the filename() of all qvd files that have a file name containing this vvariable. One exception,  you do not want to select the filename from any qvd file containing ABC in its file name.

 

View solution in original post

3 Replies
premvihari
Partner - Creator
Partner - Creator

basically $(xxx) always represents the value of variable.
in this case you have plents of Qvd files availble in the connection named as "First QVD" out of that you are loading the file which matches the value of variable vRecord  

Vegar
MVP
MVP

Yes  record is a variable. You are trying to read the filename() of all qvd files that have a file name containing this vvariable. One exception,  you do not want to select the filename from any qvd file containing ABC in its file name.

 

Vegar
MVP
MVP

If you find your script to run slowly then it is because you are looking for a distinct filename on all rows in all the qvd files in your wildcard path.

I think you will find it faster to execute if you only load one row per file by  adding a FIRST 1 to your load like this.

FIRST 1 LOAD DISTINCT FileName() AS [QVD_File]
FROM [First QVD\*$(vRecord)*.qvd] (qvd)
WHERE WildMatch(FileName(),'*ABC*') = 0;