Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have two field in the data load editor. One field has the name of employees and the other has there respective title.
There are few employees who are missing titles.
I wanted to know if there is a way I can match or fill in their title in the data load editor.
For example.
EmployeeName EmployeeTitle
Name1 RN
Name2 Physician
Name3
Name4 LPN
Name5
Name6 Janitor
I know that Name3 is an RN and Name 5 is a Janitor. Is there a way I can match them to their respective titles.
I could do an if statement like the following
if( EmployeeName = 'Name3' , 'RN', EmployeeTitle) as "EmployeeTitle,
I wanted to know if there is a more effecient way of doing, maybe like mapping or something. I have several users with that issue and I would rather not right if statements as I am afraid it may impact performance.
Please help.
Thank you in advance.
Yes you could just use mapping, see: Mapping … and not the geographical kind.
- Marcus
Hi Marcus.
Thank you for posting a response. I looked into the link and it seems to discuss mapping values that already exist how about mapping nulls, and each null depending on the employees name might be different.
Any suggestions?
No it will work with NULL's, too - maybe in this way:
map:
mapping load * inline [
Name, Title
Name3, RN
];
load
*,
if(len(trim(EmployeeTitle)) = 0, applymap('map', EmployeeName , '#NV'), EmployeeTitle) as EmployeeTitle
from Source;
- Marcus