Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping script

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 ;

21 Replies
gandalfgray
Specialist II
Specialist II

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;

Not applicable
Author

lifesaver. Thanks