Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to either delete a qvd file or empty it using the load script. I have tried both and have not been successfully.
I have tried using the EXECUTE command and the script failed. I have tried using this to empty the files, but I get an message saying they do not exist, when they actually do exist.
Sub EmptyQvd(qvdFilePath)
TRACE --;
TRACE Start EmptyQvd for file $(qvdFilePath);
// First check if the qvd-file exists
if (not IsNull(QvdCreateTime(qvdFilePath))) then
TRACE ... file exists ...;
// Check if the Qvd-file contains more than 0 records
if(QvdNoOfRecords(qvdFilePath) > 0) then
tmp_qvd_table:
NoConcatenate
load *
where 1=2;
first 1
load *
from [$(qvdFilePath)](qvd);
store tmp_qvd_table into [$(qvdFilePath)](qvd);
Drop table tmp_qvd_table;
end if ;
else
TRACE ... file '$(qvdFilePath)' does not exist;
end if;
TRACE finished EmptyQvd;
TRACE --;
End Sub
;
Call EmptyQvd('\\server\ProgramData\Qlik\Sense\Log\governanceLogContent_7.8.0-usage_file.qvd');
Call EmptyQvd('\\server\ProgramData\Qlik\Sense\Log\governance_time_range_ops_7.8.0-usage.qvd');
Call EmptyQvd('\\server\ProgramData\Qlik\Sense\Log\governance_date_time_ops_7.8.0-usage.qvd');
but you don't seem to be using it when calling your EmptyQVD sub...
'\\server\ProgramData\Qlik\Sense\Log\governanceLogContent_7.8.0-usage_file.qvd'
i'd expect something like
Call EmptyQvd('lib://LOGS\Log\governanceLogContent_7.8.0-usage_file.qvd');
with LOGS defined as connection : \\server\ProgramData\Qlik\Sense
can you share the document log please?
Regards
I am sorry, but I cannot. It has some confidential data that I cannot share. Is there a specific piece of information in the log I can summarize for you instead?
I want to see what happens if the error occurs
(How many datas are loaded, what state has your if-clause and so on)
Maybe you can reload with one file where the error occurs and delete details you don't want to share.
does your connection exist?
(don't see a lib:// ... )
I do have a connection. This was just a subset of the script.
but you don't seem to be using it when calling your EmptyQVD sub...
'\\server\ProgramData\Qlik\Sense\Log\governanceLogContent_7.8.0-usage_file.qvd'
i'd expect something like
Call EmptyQvd('lib://LOGS\Log\governanceLogContent_7.8.0-usage_file.qvd');
with LOGS defined as connection : \\server\ProgramData\Qlik\Sense
The example I was using as a reference didn't have any connections. After adding this, I was successful. Thanks!