Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a problem in my script that logs data. Historization is only done for certain data and not for all data.
Here is my data test:
Tmp_FactRaw_Histo_Date_Encours:
LOAD avis,
ordre,
date#(date_encours,'DD/MM/YYYY') as date_encours,
encours_aru
;
LOAD * INLINE [
avis,ordre,date_encours,encours_aru
12345,000787915,09/04/2023,1
45678,000793354,09/04/2023,1
75216,000754796,09/04/2023,1
15479,000879357,09/04/2023,1
2035A,000897542,09/04/2023,1
TS789,000896419,09/04/2023,1
85236,000756311,09/04/2023,1
];
My script :
Let vCurrent= Week(Today());
Set vFilePath = 'C:\...\FactRaw_Encours_Stock_ARU_Histo.qvd';
trace $(vFilePath);
IF (NOT isNull(qvdCreateTime('C:\....\Histo_Data.qvd'))) THEN
Trace 'Le QVD Histo_Data existe';
NoConcatenate
Histo_Data:
LOAD avis,
ordre,
encours_aru,
date_encours,
Week(date_encours) as Date_encours_numero_semaine
Resident Tmp_FactRaw_Histo_Date_Encours;
Concatenate(Histo_Data)
LOAD *
FROM [C:\....\Histo_Data.qvd](qvd)
WHERE NOT EXISTS (date_encours);
Drop table Tmp_Histo_Data;
Store FactRaw_Encours_Stock_ARU_Histo into 'C:\....\Histo_Data.qvd';
ELSE
TRACE 'Le QVD Histo_Dataexiste pas';
TRACE 'Création du QVD Histo_Data';
NoConcatenate
Tmp_Histo_Data_$(vCurrent):
LOAD avis,
ordre,
date_encours,
encours_aru,
Week(date_encours) as Date_encours_numero_semaine
Resident Tmp_Histo_Data;
Store Tmp_Histo_Data_$(vCurrent) into 'C:\....\Histo_Data.qvd';
Drop table Tmp_Histo_Data_$(vCurrent);
Drop table Tmp_Histo_Data;
END IF;
The script logs my dates only for review = 12345 but not for the others:
Do you know where the problem could come from? Why is the historization not done on all the data?
Thanks in advance for your help 🙂