Hi All,
Hope you are doing well!..I am trying to build a Magic ETL workflow to calculate the number of entries (combination of sno and mmodel) occuring new in the current date of reference in comparison to the immediate previous day.. Please find the sample data below:
Input table
sno mmodel snapshot_date
r123 S1234 3/1/2022
r3421 S1234 3/1/2022
y123 D2123 3/1/2022
g21q D2123 3/1/2022
W321 G345 3/1/2022
E231 G345 3/1/2022
r123 S1234 3/2/2022
D891 S1234 3/2/2022
y123 D2123 3/2/2022
W321 G345 3/2/2022
K1231 J1231 3/2/2022
r123 S1234 3/3/2022
D891 S1234 3/3/2022
H213 V231 3/3/2022
121k N213 3/3/2022
And the output required would be
date new Delay
3/1/2022 0
3/2/2022 2
3/3/2022 2
In the above output for the date March 2nd the combination of entries (D891,S1234) and (K1231,J1231) appears only on march 2nd and not on March 1st so the number of new delays would be 2
In the above output for the date March 3rd the combination of entries (H213,V231) and (121K,N213) appears only on March 3rd and not on March 2nd so the number of new delays would be 2..
Can you please let me know how to set up the ETL for the above..
Thanks,
Arun