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: 
ashoknimmagadda
Contributor
Contributor

Convert Multiple Qvds to Qvx

Let In_Path_QVD = '';
Let Out_Path_QVX = '';


//*** Start of the For loop ****

FOR EACH file in FileList('$(In_Path_QVD)\*.qvd');


Data:
LOAD *, FileBaseName() as qvdname
FROM
[$(file)]
(qvd);

let vFile=peek('qvdname',-1,'Data');


STORE Data into [$(Out_Path_QVX)$(vFile).qvx](qvx);
Drop Table Data;

 

Next;

Is this working

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

You may optimizing the loads per:

FOR EACH file in FileList('$(In_Path_QVD)\*.qvd');
    Data: LOAD * FROM [$(file)] (qvd);
    let vFile = subfield(subfield('$(file)', '\', -1), '.', 1);
    STORE Data into [$(Out_Path_QVX)$(vFile).qvx](qvx);
   Drop Table Data;
Next;

 

View solution in original post

3 Replies
jochem_zw
Employee
Employee

Should be working, i guess

marcus_sommer

You may optimizing the loads per:

FOR EACH file in FileList('$(In_Path_QVD)\*.qvd');
    Data: LOAD * FROM [$(file)] (qvd);
    let vFile = subfield(subfield('$(file)', '\', -1), '.', 1);
    STORE Data into [$(Out_Path_QVX)$(vFile).qvx](qvx);
   Drop Table Data;
Next;

 

Ahidhar
Creator III
Creator III

you can drop field 'qvdname' to avoid synthetic key formation like this

for each file in filelist(inpath)
Data:
load *,
FileBaseName() as qvdname
from $(file)
(qvd);
let vfile=peek('qvdname',-1,'Data');
drop Field qvdname;
store Data into [$(outpath)$(vfile).qvx](qvx);
drop table Data;
next file