Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have below table which describe various grocery types-
Name | Qty | Season | Country of Origin |
---|---|---|---|
Mango | 2 | Spring | Mexico |
Orange | 3 | All Seasons | USA |
Apple | 4 | All Seasons | USA |
Fig | 2 | Winter | Italy |
Rice | 3 | Summer | China |
Peppers | 5 | All Seasons | Jamaica |
I am creating inline table to attach field Type. I want to have Types as "Fruit","Crop" or "Unknown".
Load * Inline
[
Name,Type
Mango,Fruit
Orange,Fruit
Apple,Fruit
Fig,Fruit
Rice,Crop
]
Now in above list I want to add a default option which will map any other 'Name" value as "Misc".
Can you please suggest how to check it.
Ok did something like this..
Grocery_Table:
[Name,Qty,Season,Country Of Origin]
Test:
Mapping Load * Inline
[
Name,Type
Mango,Fruit
Orange,Fruit
Apple,Fruit
Fig,Fruit
Rice,Crop
];
Load *, ApplyMap('Test',Name ,'Misc') as Type
Thanks Mayil without your advice it was not possible.
HI,
Use
Test:
Mapping Load * Inline
[
Name,Type
Mango,Fruit
Orange,Fruit
Apple,Fruit
Fig,Fruit
Rice,Crop
];
Load *, ApplyMap('Test',Name ,'Misc') as FieldName from tablename;
Hope it helps
Hi Mayil,
Which table name you are expecting in below line?
Load *, ApplyMap('Test',Name ,'Misc') as FieldName from tablename;
HI,
Below table which describe various grocery types, you specified know-Please use that table ..
Edit:After use that, let me know, its working?
Hope it helps
Thanks a lot for all the help. I will try this option.