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?
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.
you can load the table after transformation in database.
as you can load into an intermediate table
SQL select * ...
and then Map table will be :
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
You can use any source. The syntax is:
MAP_NAME: MAPPING LOAD FROM, TO FROM[SOURCE];
MAP_NAME: MAPPING SELECT FROM, TO FROM TABLE;
Both methods works.