Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one please help me on this.
In a folder daily with corresponding date one excel file will be updated.
From those excel file names I have extracted the date like below.
When I have run the script on tomorrow then one more date will be added. But here I have to restrict only Last 9 days data.
Thanks in advance.
Try this
T:
LOAD Date
FROM test_data.xlsx
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
W:
load *
Resident T;
drop table T;
max:
load max(Date) as max_date
Resident W;
let vMAX = peek('max_date',0,'max');
NoConcatenate
Final:
load *
Resident W
where Date> Date('$(vMAX)'-9,'DD-MM-YYYY');
DROP TABLE W;
Try this
T:
LOAD Date
FROM test_data.xlsx
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
W:
load *
Resident T;
drop table T;
max:
load max(Date) as max_date
Resident W;
let vMAX = peek('max_date',0,'max');
NoConcatenate
Final:
load *
Resident W
where Date> Date('$(vMAX)'-9,'DD-MM-YYYY');
DROP TABLE W;