This article will cover the syntax of the ‘Unmap’ regular script statement

This statement is used to remove previously specified field mapping for subsequent loads. 

Statement syntax

FieldlistA comma separated list of fields to be unmapped going forward.

Example

An enum map is called to map a table. An unmap statement is then used to remove the mapping for the next table loaded (which is concatenated to the first table).

SALE_STATUS:
MAPPING LOAD * INLINE [
  SaleStatusEnum, Status 
  1, Ordered
  2, Paid
  3, Dispatched
  4, Delivered
];
Map Status using SALE_STATUS;
SALES:
LOAD * INLINE [
	SalesID, Status
    SLS0001, 4
    SLS0002, 2
    SLS0003, 1
];
Unmap Status;
SALES:
LOAD * INLINE [
	SalesID, Status
    SLS0004, 4
    SLS0005, 2
    SLS0006, 1
];

Result

A concatenated table is loaded containing data from both tables. The field ‘status’ from the first table is mapped but is unmapped from the second table.