Skip to main content Skip to complementary content

Mapping

The mapping prefix is used to create a mapping table that can be used to, for example, replacing field values and field names during script execution.

Syntax:  

Mapping( loadstatement | selectstatement )

 

The mapping prefix can be put in front of a LOAD or a SELECT statement and will store the result of the loading statement as a mapping table. A mapping table consists of two columns, the first containing comparison values and the second containing the desired mapping values. Mapping tables are stored temporarily in memory and dropped automatically after script execution.

The content of the mapping table can be accessed using e.g. the Map … Using statement, the Rename Field statement, the Applymap() function or the Mapsubstring() function.

Example:  

Mapping LOAD * from x.csv

Mapping SQL SELECT a, b from map1

map1:

mapping LOAD * inline [

x,y

US,USA

U.S.,USA

America,USA ];

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!