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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ApplyMap basic question

Hiya,

This is the first time I want to make use of ApplyMap instead of a JOIN. Below you can see I made up a table containing aircraftno_i and ac_registr. However there is no relation defined between these fields.

mappingvraag.png

The relation is defined in the "aircraft" table:

Aircraft:

LOAD ac_registr,

    ac_typ,

    aircraftno_i

FROM DataBase.aircraft;

But I dont want to insert this table or make it join,I want to use the mapping function.


So now I want to map this ac_regsistr to aircraftno_i:

MapAircraftno2Ac_registr:

    Mapping Load aircraftno_i, ac_registr FROM (HERE IS MY ISSUE);

So that I can ApplyMap in the MSC_MASTER table:

ApplyMap('MapAircraftno2Ac_registr', aircraftno_i, null()) as ac_registr,

My question is as follows, what do I input in the red marked area? I cannot select the "aircraft" table which contains the relation because I dont want it in my  model (it would create syntetic table), I only want it to look up in that table.

Anyone?

10 Replies
Not applicable
Author

Dutchsky,

see this sample.  The other folks are correct as well.  You can create a mapping load from a SQL query as well.  You don't have to load the data first then create the mapping load.

/****************Mapping Load First*******************/

IUCR:

MAPPING LOAD IUCR,

     [PRIMARY DESCRIPTION]

FROM

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

/****************Main Table Second******************/

LOAD ID,

     [Case Number],

     Date,

     Block,

     IUCR,

     /******************ApplyMap******************/

     ApplyMap('IUCR', IUCR) as [Primary Description],

     [Primary Type],

     Description,

     [Location Description],

     Arrest,

     Domestic,

     Beat,

     District,

     Ward,

     [Community Area],

     [FBI Code],

     [X Coordinate],

     [Y Coordinate],

     Year,

     [Updated On],

     Latitude,

     Longitude,

     Location

FROM

(txt, codepage is 1252, embedded labels, delimiter is ',', msq)

Where Date = 2008;