Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to concatenate a QVD to other QVD based on the month end of "Month_date" column
CurrentData:
LOAD Id,
Department,
Date(Today(),'DD/MM/YYYY') as Month_date
From Dummy.xlsx(ooxml, embedded labels);
STORE CurrentData into CurrentData.qvd(qvd);
LET vMonth = Date(Today(),'DD/MM/YYYY');
LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');
IF '$(vMonth)' = '$(vMonthend)' then
Concatenate(CurrentData)
LOAD * from HistoricalData.qvd(qvd);
ENDIF;
DROP Table CurrentData;
But the above Script marked in Red is not working.
Anyone could you help me on this...
Hi,
I am sure you can not see the table CurrentData at all. Am I right?
If yes then i want to point out something in your script.
If you look into your script, after concatenating the CurrentData in Historical data, you will need to store the data in to historical again.
Meaning the data got concatenated in qpplication but not stored in qvd.
So your script should be like this.
CurrentData:
LOAD Id,
Department,
Date(Today(),'DD/MM/YYYY') as Month_date
From Dummy.xlsx(ooxml, embedded labels);
STORE CurrentData into CurrentData.qvd(qvd);
LET vMonth = Date(Today(),'DD/MM/YYYY');
LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');
IF '$(vMonth)' = '$(vMonthend)' then
Load * ,' ' as junk resident CurrentData;
Concatenate(CurrentData)
LOAD * from HistoricalData.qvd(qvd);
Store CurrentData into HistoricalData.Qvd;
ENDIF;
DROP Table CurrentData;
Hope this is clear
Regards,
Kaushik Solanki
Hi,
It may not be working cause you may not have HistoricalData.qvd
What error it is giving?
Regards,
Kaushik Solanki
Hi Kaushik,
HistoricalData.qvd already existed...
condition is working fine but it is not concatenating the CurrentData table to HistoricalData QVD.
Hi Kumari
Try this
CurrentData:
LOAD Id,
Department,
Date(Today(),'DD/MM/YYYY') as Month_date
From Dummy.xlsx(ooxml, embedded labels);
STORE CurrentData into CurrentData.qvd(qvd);
LET vMonth = Date(Today(),'DD/MM/YYYY');
LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');
IF '$(vMonth)' = '$(vMonthend)' then
Load * ,' ' as junk resident CurrentData;
Concatenate(CurrentData)
LOAD * from HistoricalData.qvd(qvd);
ENDIF;
DROP Table CurrentData;
drop field junk;
Hi,
I am sure you can not see the table CurrentData at all. Am I right?
If yes then i want to point out something in your script.
If you look into your script, after concatenating the CurrentData in Historical data, you will need to store the data in to historical again.
Meaning the data got concatenated in qpplication but not stored in qvd.
So your script should be like this.
CurrentData:
LOAD Id,
Department,
Date(Today(),'DD/MM/YYYY') as Month_date
From Dummy.xlsx(ooxml, embedded labels);
STORE CurrentData into CurrentData.qvd(qvd);
LET vMonth = Date(Today(),'DD/MM/YYYY');
LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');
IF '$(vMonth)' = '$(vMonthend)' then
Load * ,' ' as junk resident CurrentData;
Concatenate(CurrentData)
LOAD * from HistoricalData.qvd(qvd);
Store CurrentData into HistoricalData.Qvd;
ENDIF;
DROP Table CurrentData;
Hope this is clear
Regards,
Kaushik Solanki