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
Yes:
Map:
mapping
LOAD
...
;
SQL select
...;
Yes:
Map:
mapping
LOAD
...
;
SQL select
...;
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.
@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 !
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
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
if you want, but if necessary 🙂
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.