darshthakkar
3 years agoValued Contributor
Routing files from S3
Continuing the discussion from How to load Today Date Files from s3 Bucket to SLDB:
Hi @kkishore,
Group the incoming data by CARRIERCODE & SHIPCARRIERTRACKINGNUM:
And add the following expression in a mapper after the group by snap:
$group.map(x=>{[x.DATETIMETYPE+"_DATETIMEVALUE"]:x.DATETIMEVALUE,[x.DATETIMETYPE+"_DATEVALUE"]:x.DATEVALUE}).reduce((acc,curr)=>acc.extend(curr),{}).extend($groupBy)Hope this helps,
Regards