Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to use pick and match dynamically while loading data.
Source:
load * inline
[
Sale_ID,Department, Quanity
A,2223X,23
B,2324A,123
C,1234S,234
D,2223qw,5
E,1234S,7
F,2223X,8
];
Final_table:
load Sale_ID,
pick(match(-1,Department='2223X',Department='2324A',Department='1234S',Department='2223qw'),1,2,3,4) as Department_id,
Department,
Quanity
resident Source;
Drop table Source;
if Department_id is added newly, is it possible new department_id called 5 dynamically.
Thanks..