Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a situation were I have table A & B loaded into memory, when I loading Table c I need to mask a value based on value from table A how do I do this? is lookup() or peek() would help
see image
What is your expected output in table C.?
Are you looking for something like this?
Try:
TableA:
Mapping LOAD GroupID, Dept INLINE [
GroupID, Dept, DeptDesc
10, 500, abc
11, 501, bbc
12, 502, cba
13, 563, aaa
14, 555, cab
15, 878, bbb
];
TableB:
LOAD *, ApplyMap('TableA', GroupID) AS ColorDept INLINE [
EmpID, GroupID
9595, 12
9999, 12
9000, 13
9990, 10
9001, 15
8999, 11
];
Used a background color expression to get the respective colors, you can change accordingly.
I would say Mapping Table with ApplyMap
Mapping load require a key, Table A & C have no common key.
Group ID seems to be the same, no? Based on Group ID, you want to determine if Dept is 500 or 501 and then based on that you decide color
Yes but Table C has Empl ID no Group ID and I am trying to do in the load script for the Table C
What is your expected output in table C.?
Are you looking for something like this?
Try:
TableA:
Mapping LOAD GroupID, Dept INLINE [
GroupID, Dept, DeptDesc
10, 500, abc
11, 501, bbc
12, 502, cba
13, 563, aaa
14, 555, cab
15, 878, bbb
];
TableB:
LOAD *, ApplyMap('TableA', GroupID) AS ColorDept INLINE [
EmpID, GroupID
9595, 12
9999, 12
9000, 13
9990, 10
9001, 15
8999, 11
];
Used a background color expression to get the respective colors, you can change accordingly.
Thanks for the help
along the same lines I applied map created new temp field and after loading table C using if condition resolved my issue. at the end dropped the temp field