Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The following mapping script produces no errors when I load it, but at the same time map none of the values to the Trade_Type field I am creating.
Any ideas?
Rename table TRADES to Trade_Temp;
Trade_Conditions:
LOAD * inline
[
RIMS_Trade_Condition,iCreditPassive,iCreditAggressive,Trade_Type
EL,Electronic,Electronic,Electronic
VC,Voice,Voice,Voice
,Electronic,Voice,Hybrid
,Voice,Electronic,Hybrid
IF,,Intra firm
];
MapTradeCondition:
Mapping LOAD
RIMS_Trade_Condition & iCreditPassive & iCreditAggressive as key ,
Trade_Type
Resident Trade_Conditions;
TRADES:
LOAD
*,
ApplyMap('MapTradeCondition',PassiveTradeType,ApplyMap('MapTradeCondition',AggressorTradeType,ApplyMap('MapTradeCondition',TradeCondition))) as Trade_Type
Resident Trade_Temp;
Drop Tables Trade_Temp,Trade_Conditions ;
Try this then:
replace from the previous processedTRADES statement:
processedTRADES:
LOAD *,
ApplyMap('MapRIMS',RIMS_Trade_Condition, ApplyMap('MapCredit',iCreditPassive&iCreditAggressive)) As Trade_Type
Resident TRADES;
DROP Table TRADES;
rename table processedTRADES to TRADES;
lifesaver. Thanks