Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
santharubban
Creator III
Creator III

QVD exsit or not


how to check QVD exsit or not in a folder?

9 Replies
Gysbert_Wassenaar

if filetime('c:\mydata\my.qvd) then

      //qvd exists

else

      //qvd doesn't exist

end if


talk is cheap, supply exceeds demand
Clever_Anjos
Employee
Employee

If FileSize('Filename') > 0 then

trace File exists

end if

Anonymous
Not applicable

Hi santharubban,

in the Script, use the filetime() function to check if a file exists or not.

For ex:

if isnull(filetime('c:\filename.txt')) then

//file doesnt exists

else

//file exists

end if

chiru_thota
Specialist
Specialist

You can use below syntax.

LET vQvdExists = if(QvdNoOfRecords('$(QVD_Path)\$(vQvdFile)') > 0, -1, 0);

Thanks,

Chiru

santharubban
Creator III
Creator III
Author

Thanks all for quick reply,

for incremental load,

v_IncrementalQVDCreatedate = QvdCreateTime('AFM.qvd');

from above, qvd exist no issues but dvd not exists it will return null.

so while loading table, i am getting error

load * from C:\Users\SXS3411\Desktop\AFM_ShadowFile.csv(txt, codepage is 1252, embedded labels, delimiter is ',', msq)where Date >$(v_IncrementalQVDCreatedate );

when IncrementalQVDCreatedate  is null i am getting error. can anyone help me how to slove this.

Clever_Anjos
Employee
Employee

Use a 'default date' for example:

LET v_IncrementalQVDCreatedate = alt(QvdCreateTime('AFM.qvd'),'2001/01/01');


santharubban
Creator III
Creator III
Author

while Concatenating 2 tables i am getting error

Nicole-Smith

I wouldn't use the .qvd create time for your incremental load.  If you're pulling data from a very large file, the file could take minutes to import and store into a .qvd.  If new records were added in those few minutes, you'll miss those by using the .qvd create time.  I would suggest using a max date field from within the field itself.

Clever_Anjos
Employee
Employee

Could you post your script? I´ll check it