Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
qliky88
Creator
Creator

Applymap using a table from server connection

Hi All,

 

Just wondering is it possible to use the Applymap() function using a table from an external source/ server connection instead of using an excel document as the table? 

 

If so how would that be written? 

 

Many thanks

Labels (4)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Yes:

Map:

mapping
LOAD

...
;
SQL select
...;

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

7 Replies
Taoufiq_Zarra

Yes:

Map:

mapping
LOAD

...
;
SQL select
...;

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Anonymous
Not applicable

Yes it's possible.

To use  Applymap()  function you need to have a Mapping Load in your script before the Applymap()  will be used.

For the Mapping Load you can use a data connection to any source, just make sure you load only the 2 relevant fields that you intend to use in the Applymap() function. Exactly like you would from excel.

 

 

qliky88
Creator
Creator
Author

@Taoufiq_Zarra , thanks for the reply. 

 

What is the best way to reorder the columns in my external mapping table? Can I simply just call one column before the other?

The columns I want to use need to be swapped to use the applymap properly. 

 

Thanks ! 

Taoufiq_Zarra

@qliky88 

you can load the table after transformation in database.
as you can load into an intermediate table

TableTmp:

load

...

..

;

SQL select * ...

 

and then Map table will be :

Map:

load
..
resident Table TableTmp

 

but if you have specific problems you can post it here

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
qliky88
Creator
Creator
Author

Hi @Taoufiq_Zarra , 

 

By this do you mean load a temporary table from the already imported table from the DB connection? And just reorder the column names? 

Sorry if this is a basic question 😛 Thanks 

Taoufiq_Zarra

if you want, but if necessary 🙂

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
marco_almeida
Creator II
Creator II

You can use any source. The syntax is:

MAP_NAME: MAPPING LOAD FROM, TO FROM[SOURCE];

OR

MAP_NAME: MAPPING SELECT FROM, TO FROM TABLE;

Both methods works.

 

Grupo Telegram Qlik Brasil: https://t.me/joinchat/AeRmnUmcxQ02L00g3x-HtQ