Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

quick applymap example

Would someone upload a small example of how to use applymap?  I'd really appreciate it!

22 Replies
Not applicable
Author

Hi vishnupriya,

if u r not using mapping keyword then it won't  consider as a mapping table .

so mapping is mandatory .

s its mandatory to u have 2 coloumns , if u have more than that take a resident of that table with 2 coloumns and apply applymap

Not applicable
Author

Thanks for giving answer.

i am new to Qlik View.please give me reply for these questions.

what is the use of resident??

  why we will get synthatic keys??

How to remove synthatic keys??

Not applicable
Author

Resident load:

loading the data from previously loaded table

if example i have 100 fields in one table but for my work i want only 5 fields that time i simply go with like

products:

apple

banana

fruit

orange

sapota 

jama

by using resident:   u want only   banana ,jama means

load

banana,

jama

resident products;   - so simply u can load fields which u want , no need to load all

( 5 to 6 fields u can go for comment , if 100 fields are there and u want only 5 that case we use resident)

synthetic keys:

when we have more than one common field between 2 tables then we get synthetic key

ways to remove:

commenting field,

renaming field

qualifier and unqualifier ,

Ekkada nerchukuntunaru vishnu priya

if this answer helpful to u pls make it as  a correct answer

Not applicable
Author

Hi,

what is the use of resident:

If you want to apply any transformation just use resident load for groupby and order by and having by clauses like that we can use resident load instead of doing normal load.it will give gud performance.already existing table if we wwant to load once again that is called resident load.\

why we will get synthatic keys:

if we have morethan 1 common key in moretahn 1 table then the synthetic key table will form.it will give may or maynot perfect result better to avoid it.

to remove synthetic keys:

renaming field,

qualifier and unqualifier statement ,

Not applicable
Author

Hello My friend, I want to learn how i can use the Mapping sentence and Applymap function. I have the following script, but it doesn't work. Coul you help me please? Thanks.

map1:

mapping LOAD * INLINE [

    id, valor

    a1, uno

    a2, dos

    a3, tres

    a4, cuatro

];

LOAD

     @1 as id,

     @2 as Nombre,

     @3 as Ciudad,

     ApplyMap('map1',valor,'descnonoci') as valor

FROM

prueba.txt

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

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Leonardo,

The second parameter of the ApplyMap function is the field that you are mapping on to, I would expect this to be either @1, @2 or @3 - depending on which field contains the values a1,a2,a3 and a4.

The blog post I reference below has quite a lot of detail on the various options for the parameters.

Hope that helps.


Steve

Not applicable
Author

Hello Steve, Thanks for your clarification. Now it works.

The correct expression is:  ApplyMap('map1',@1,'descnonoci') as valor

Have a nice day.

Not applicable
Author

Great Learning Post!

Anonymous
Not applicable
Author

thanks Alan found that video very easy to understand and make sense of Applymap

Not applicable
Author

Thanks for the exellent example.