Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way to use the ApplyMap function so instead of loading a table from a connection the table already resides in the Data Load Editor?
I want to keep this table in the Data Load Editor
Aircraft Model | Aircraft Type |
Airbus A330-200 (332) | Widebody Jets |
Airbus A340-300 (343) | Widebody Jets |
Airbus A380-800 (380) | Widebody Jets |
Boeing 777-200ER (772) Three Class V1 | Widebody Jets |
Boeing 777-200ER (772) Three Class V2 | Widebody Jets |
Airbus A330-300 (333) | Widebody Jets |
Boeing 767-300 (763) | Widebody Jets |
RJ-85 Avroliner (AR8) | Narrowbody Jets |
Boeing 737-800 (738) | Narrowbody Jets |
Airbus A321 (321) V3 | Narrowbody Jets |
Bombardier CRJ-700 | Regional Jets |
Embraer ERJ-145 | Regional Jets |
Bombardier CRJ-200 (CR2) | Regional Jets |
ATR 72-600 (ATR) | Turboprops |
de Havilland Dash 8 (DH3) | Turboprops |
This is my ApplyMap function which loads the table above from a connection.
MapModeltoType:
Mapping LOAD
"Aircraft Model",
"Aircraft Type"
FROM [lib://Data/Details.xlsx]
(ooxml, embedded labels, table is Sheet3);
Aircraft:
LOAD
Airline,
"Aircraft Model",
ApplyMap('MapModeltoType', "Aircraft Model", null()) as "Aircraft Type"
FROM [lib://Aircrafts/Aircrafts.xlsx]
(ooxml, embedded labels, table is Sheet2);
Try loading it first as a table, then as a mapping table from the resident table (though it's so small it doesn't matter if you load it twice from Excel).
I want the table to reside in the Data Load Editor without having to load it. Do you know the Syntax that would allow me to do that?
You just need to load it, use it in the script, and then use Drop before the end of script.
Drop Table ;
Sent from my telephone