Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have following sales data going back to year 2014. The actual model i have takes an hour to reload as it reloads all the data. I want to reduce the reload time by applying incremental reload. How do i accomplish this. Basically, the incremental reload should be the last sales date.
Attached herewith is the data.
Kind regards
Nayan
Check the attached file
First initially load all data and then incremental load data with max date by finding max date by variables and then comment initial load table.
MaxDateTab:
LOAD Date(Max(Date)) as MaxDate FROM SalesData.qvd(qvd);
LET vMaxDate = Peek('MaxDate',0,'MaxDateTab');
//Incremental Load
Data:
LOAD Date,
[Sales Amount]
FROM
[Sales Data.xlsx]
(ooxml, embedded labels, table is Sheet1)
Where Date > '$(vMaxDate)';
Concatenate(Data)
LOAD * FROM SalesData.qvd(qvd);
Store Data into SalesData.qvd;
DROP Table Data;
Also go through this
Thank you. Will let you know if I'm successful.
Kind regards
Nayan
Ok ... Good.
Check the attached file
First initially load all data and then incremental load data with max date by finding max date by variables and then comment initial load table.
MaxDateTab:
LOAD Date(Max(Date)) as MaxDate FROM SalesData.qvd(qvd);
LET vMaxDate = Peek('MaxDate',0,'MaxDateTab');
//Incremental Load
Data:
LOAD Date,
[Sales Amount]
FROM
[Sales Data.xlsx]
(ooxml, embedded labels, table is Sheet1)
Where Date > '$(vMaxDate)';
Concatenate(Data)
LOAD * FROM SalesData.qvd(qvd);
Store Data into SalesData.qvd;
DROP Table Data;
Thank you Anand for your reply, i will let you know.
By the way, on the Incremental Load Script, will it be better to use an " Where Exist" expression as it will only look at the max date reload data and as compared to just a "Where" Expression, where it will load all data and then reduce to a max date. Am I correct?
Kind regards
Nayan
Exactly but in your requirement you are want to load the data with Maxdate which is Max date for one day, Right. so in this you have to find only Max Date and load your latest available dates from the table and concatenate with the previous (History Qvd).
Thank you for the feedback. Will the reload time be shorter?
Kind regards
Nayan
Hi Anand
The reload time is shorter.
Kind regards
Nayan