I need to generate unique key by joinng D1 with D2 which is the extract from view:
D2:
My requirement is my script:
I have to generate the field
Load
"facility_identifier" & '-' & "VISIT_ID" as Uniquekey, * Resident [table];
So, I did something like below script :
[Care]: LOAD FACILITY, If(FACILITY like '*Hospital1*', 'Hospital1', If(FACILITY like '*Hospital2*', 'Hospital2', If(FACILITY like '*Hospital3*', 'Hospital3','FACILITY')))))) as facility_name,
VISIT_ID FROM [lib://AttachedFiles/Data.xlsx] ;
Unqualify *;
left join ([Amber Care]) LOAD "facility_identifier" , facility_name SQL SELECT * FROM "view";
Unqualify *;
[Amber Care Final]: Load "facility_identifier" & '-' & "VISIT_ID" as VISITID, * Resident [Amber Care];