Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm getting an intermittent problem during an incremental load.
Basically I load my new and updated records from a Database and concatenate it with the Historical records stored in a QVD file.
The problem happens when I store the updated set of records in the previous loaded historical QVD - this is pretty much the standard Incremental Load Process.
So I get this error:
"Failed to open file in write mode for file"
Again, this is an intermittent problem and I'm not able to reproduce it.
1 - Is there anyone else having this issue?
2 - Is there a way to avoid this problem?
I'm thinking this may be a Qlik Sense bug.
Thank you in advance,
Mark Costa
Mark,
After struggling all weekend with the "Failed to open file in write mode for file" error, I added your suggested script to our incremental loads. We have had 3 successful reloads.
Thank you for posting your solution.
Jess
Hi Mark, I am trying to use the code you had written but I am not sure if I am doing it right because the load didn't work and remain plundered.
I've put the CODE just after the STORE command, and I've add a ';' at the end:
I've put the CODE just after the DROP TABLE command and I've add a ';' at the end:
None of them let me finish the load. Am I doing something wrong?
Thanks a lot.
You are not checking NoOfRecords of the proper file....
Just copy/paste the same string from your STORE statement:
QvdNoOfRecords([lib://achrivosQVD/encuestas/encuesta_atencion_cliente.qvd]);
VK
Hi Vladimir, I am sorry but I don't understand what you have suggested me to do.
Do I have to write just this: `QvdNoOfRecords([lib://achrivosQVD/encuestas/encuesta_atencion_cliente.qvd]);`?
So , what about the code:
DO
SLEEP 5000;
LET _fwMessage = QvdNoOfRecords ('lib://My Library\myqvdfile.qvd');
TRACE $(_fwMessage);
LOOP WHILE (LEN('$(_fwMessage)') = 0)"
Thanks a lot.
Hi Ainhoa Parra Miñano,
Your statement "LET _fwMessage = QvdNoOfRecords ('lib://My Library\myqvdfile.qvd');" extracts Number of records from myqvdfile.qvd file from "My Library", but not from "encuesta_atencion_cliente.qvd" file, which I believe you are planning to do....
The subroutine Mark has suggested above was designed to check if the QVD file you've created with STORE statement is closed properly before you continue...
So, you need to run this LOOP on the just created QVD file until the QvdNoOfRecords call will return a proper value....
So this is why you need to use the SAME path to the SAME QVD file you've created in STORE statement....
VK
Hi Ainhoa, good day.
VK is saying that you have to replace lib://My Library\myqvdfile.qvd with lib://achrivosQVD/encuestas/encuesta_atencion_cliente.qvd, so your code will look like:
DO
SLEEP 5000;
LET _fwMessage = QvdNoOfRecords ('lib://achrivosQVD/encuestas/encuesta_atencion_cliente.qvd');
TRACE $(_fwMessage);
LOOP WHILE (LEN('$(_fwMessage)') = 0)
Note 1: add this code right after your STORE command, like you did in your first image.
Note 2: you don't have to add a ; at the end of the LOOP WHILE command
Please let us know if that worked and if you have any other question.
Regards,
Mark Costa
Hi Vladimir, thanks now I realise my mistake, so sorry.
Lot of thanks, now it works perfectly.
Hi Mark, thank you very much,I was comitting a stupid mistake ,thanks for telling me.
Now it worked perfectly.
Just so you know this bug is not fixed in Qlik Sense 3.1 R1, 3.1.1
Hi Mark,
We tried to implement the workaround. It works for the first few days but still fails intermittently with the same qvd file.
Xinzhen