Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Here my variable is not working .any one explain me why its not working.
T1:
LOAD ID,
PRODUCT,
SALES,
DATE
FROM
[.............................................................xlsx]
(ooxml, embedded labels, table is Sheet1);
LET Vpeek1=peek('DATE',-1,'T1');
Hi Mahesh,
You need to first sort the Data
T1:
LOAD ID,
PRODUCT,
SALES,
DATE
FROM
[.............................................................xlsx]
(ooxml, embedded labels, table is Sheet1);
T2:
LOAD *
Resident T1
order by DATE ASC;
drop table T1;
LET Vpeek1=peek('DATE',-1,'T2');
I do not see any problem. What do you want in Variable?
Is your data sorted as per Date? What value is the variable returning?
its correct syntax only.
Hi Mahesh,
Can you attach your qvw file with some sample data
Hi all,
please find the attached fine.
I am learning incremental load . i am using peek function for max date.
Hi Kushal,
I want Max Date from date field.
Regards,
Mahesh.
Try like:
T1:
LOAD ID,
PRODUCT,
SALES,
DATE
FROM
[.............................................................xlsx]
(ooxml, embedded labels, table is Sheet1);
Temp:
Load
max(DATE) as MaxDate
Resident T1;
LET Vpeek1=peek('MaxDate');
Drop Table Temp;
Mahesh , if you are looking for Incremental load then Tresco way is the correct or your may also Order by the data by Date field (provided if the dates are numeric) then you can use Peek to get the max value.