Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Mapping Load * INLINE [ Role,Description
SSE,'Senior Software Engineer'
SEA,'System Enterprise Analyst',
JSE,'Junior System Engineer',
ASOC,'Associate',
Trainee,'Associate Trainee',
ITT,'IT Technical',
DSA,'Design Systems Analyst']
;
I Have loaded Map_Table and i want to look up from field called Designation in Employee Table to Description in Map_Table using the Deisgnation and Role.
I could see below code is loading fine but not fetching the output.
Please check and help on the same.
Load Designation,
Lookup('Description',Designation,'Role','Map_Table') as Long_Desc
FROM Employee.xlsx
(ooxml, embedded labels, table is Sheet1);
ApplyMap is much faster than Lookup but if you want to test it, below is the code...
Temp:
Load * INLINE
[
Role,Description
SSE,'Senior Software Engineer'
SEA,'System Enterprise Analyst'
JSE,'Junior System Engineer'
ASOC,'Associate'
Trainee,'Associate Trainee'
ITT,'IT Technical'
DSA,'Design Systems Analyst'
];
Employee:
Load *, Lookup('Description','Role',Designation,'Temp') as Long_Desc Inline
[
Designation, Salary
SSE, 100
JSE, 200
ITT, 300
MMM, 200
];
Drop Table Temp;
But I would suggest to do below instead of Lookup...Though Mapping Load and ApplyMap is my obvious choice...
Left Join (Employee) Load Role as Designation, Description as Long_Desc Resident Temp;
Drop Table Temp;
Instead of LookUp use as below
ApplyMap('Map_Table',Designation,'UNKNOWN') as Long_Desc
I have tried working with Mapping_load it works, but i want to know how to make using Lookup?
when using mapping load , you should use the applyMap with it and not the lookup function.
I have just tried normal inline load as
But Not working..
Load * INLINE [ Roles,Descriptions
SSE,'Senior Software Engineer'
SEA,'System Enterprise Analyst',
JSE,'Junior System Engineer',
ASOC,'Associate',
Trainee,'Associate Trainee',
ITT,'IT Technical',
DSA,'Design Systems Analyst']
;
Lkp_Table:
Load Designation,
Lookup('Descriptions',Designation,'Roles','Lkp_Base') as Long_Desc
FROM Employee.xlsx
(ooxml, embedded labels, table is Sheet1);
Hi
Could you not use a simple left join based on description?
That might work
ApplyMap is much faster than Lookup but if you want to test it, below is the code...
Temp:
Load * INLINE
[
Role,Description
SSE,'Senior Software Engineer'
SEA,'System Enterprise Analyst'
JSE,'Junior System Engineer'
ASOC,'Associate'
Trainee,'Associate Trainee'
ITT,'IT Technical'
DSA,'Design Systems Analyst'
];
Employee:
Load *, Lookup('Description','Role',Designation,'Temp') as Long_Desc Inline
[
Designation, Salary
SSE, 100
JSE, 200
ITT, 300
MMM, 200
];
Drop Table Temp;
But I would suggest to do below instead of Lookup...Though Mapping Load and ApplyMap is my obvious choice...
Left Join (Employee) Load Role as Designation, Description as Long_Desc Resident Temp;
Drop Table Temp;
Hi, Chaitanya.
I notice in your inline load you are putting commas at the end of each line. I don't think this is required.
e.g. SEA,'System Enterprise Analyst'
not SEA,'System Enterprise Analyst',
Regards,
Neil