Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
CaioAraujo
Contributor
Contributor

Problem extracting data from the QVD file to load into the spreadsheet.

I have a problem where data that is pulled from a server by a QVD file
are not being loaded on the current date, the system works perfectly in the Script
load, but when I check the data, only those that are finished are displayed, the rest
is not recognized. What could this problem be? How can I get around this?
I'll leave the script code to check:

Set dataManagerTables = '','tables';
//This block renames script tables from non generated section which conflict with the names of managed tables

For each name in $(dataManagerTables)
Let index = 0;
Let currentName = name;
Let tableNumber = TableNumber(name);
Let matches = 0;
Do while not IsNull(tableNumber) or (index > 0 and matches > 0)
index = index + 1;
currentName = name & '-' & index;
tableNumber = TableNumber(currentName)
matches = Match('$(currentName)', $(dataManagerTables);
Loop
If index > 0 then
Rename Table '$(name)' to '$(currentName)';
EndIf;
Next;
Set dataManagerTables = ;


Unqualify *;

[TICKET]:
LOAD
ROWNO() AS KEY,
ID,
NOME,
USUARIO_FINAL,
ID_SHAREDBOX,
ID_STATUS,
ID_CATEGORIA,
ID_SUBCATEGORIA,
NOME_REMETENTE,
EMAIL_REMETENTE,
DEPARTAMENTO,
EMAIL_ATENDENTE,
CATEGORIA,
SUBCATEGORIA,
STATUS,
FINAL,
DATE_INSERT,
DATE_UPDATE,
DATE_LOG,
ATENDENTE,
MES_ANO,
HORA,
HORA_FINALIZADO,
MES,
IF(DURACAO <= MAKETIME(1), 'Menos de 1h',
IF(DURACAO > MAKETIME(1) AND DURACAO <= MAKETIME(2), 'Entre 1h e 2h', 'Mais de 2h')) AS INTERVALO
FROM [lib://QVD_TRB/TICKET.qvd] (qvd)
WHERE DEPARTAMENTO = 'Cadastro de Rotas';

 

Labels (6)
1 Reply
F_B
Specialist
Specialist

Hi @CaioAraujo ,

the issue you're describing is likely related to the filtering or condition applied in your where clause, it could be that some records are not meeting the conditions at the time of data loading, or there might be a timing issue where some records are not yet available or marked as "finished."

You could temporarily remove the where clause to see if the records for the current date are present without the filter. Or you can try modifying it like this:

WHERE DEPARTAMENTO = 'Cadastro de Rotas' OR DATE_INSERT >= TODAY();

Hope this helps