Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need help with a task I have been trying to solve. I have table look like this
Source code
It imports no rows. I want to import only rows where Start_Date > M_Start_Date
Essentially, for the current data, I am expecting to see only Start_Date 9/03/2020 to get imported.
Regards,
Saif
Try this:
Raw:
load * INLINE [
Person_ID,unit_ID,Start_Date,M_Start_Date
27276155,1234,23/03/2018,
27276155,1234,9/03/2020,
27276155,3611,23/04/2019,23/04/2019
];
M_Start:
load distinct
Person_ID,Date#(M_Start_Date,'DD/MM/YYYY')as M_Start_Date
resident Raw
where len(M_Start_Date)>0;
left join(M_Start)
tempData:
load Person_ID,unit_ID,Date#(Start_Date,'DD/MM/YYYY')as Start_Date
resident Raw;
drop table Raw;
NoConcatenate
Data:
load *
resident M_Start
where Start_Date > M_Start_Date;
drop table M_Start;
exit SCRIPT;
Try this:
Raw:
load * INLINE [
Person_ID,unit_ID,Start_Date,M_Start_Date
27276155,1234,23/03/2018,
27276155,1234,9/03/2020,
27276155,3611,23/04/2019,23/04/2019
];
M_Start:
load distinct
Person_ID,Date#(M_Start_Date,'DD/MM/YYYY')as M_Start_Date
resident Raw
where len(M_Start_Date)>0;
left join(M_Start)
tempData:
load Person_ID,unit_ID,Date#(Start_Date,'DD/MM/YYYY')as Start_Date
resident Raw;
drop table Raw;
NoConcatenate
Data:
load *
resident M_Start
where Start_Date > M_Start_Date;
drop table M_Start;
exit SCRIPT;