Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.
I am looking for this specific requirement where I have to delete the qvd file from the load script. Is there a way to do it?
Also some of the related discussions talks about emptying a qvd file, but I want the column structure to be preserved.
I tried this solution:
Load * From qvd.qvd (qvd) where 1>2;
store qvd into qvd.qvd (qvd);
But this doesn't seem to preserve the column structure.
You cannot delete the QVD (or other) file directly from QS script. But you can use the "Execute" command instead (directly or with BAT file)...
But please note that you have to switch to "Legacy" mode to do so...
For the second question:
You need to specify all fields in the data table explicitly (using "Inline" structure) and store it into QVD to create an "empty" QVD file.
load * inline [
A1, A2, A3, A4, A5
store QVD_Table into [lib://Extractions (abc)/Test_empty_qvd.qvd;