Instructions

Instructions tell the data import framework how to retrieve, map and convert values from the Records and set values in the Model.

Each Instruction in the instructions array is defined by a dictionary, and executed in order for each Record.

Independence of Instructions

Although Instructions are executed strictly in the order they appear in your control file, in general, Instructions are independent of each other.

Therefore they can appear in any order in your control file, with the following exceptions:

  • Where an Instruction sets a value in a Destination, such as field, and that Instruction has the "multivalue":true option, if you use remove-values to clear the current values, that remove-values Instruction must appear first in the control file.
  • The within and for-each Instructions change the ‘context’ within the Record, execute their embedded instructions list, then reset the context. To access the expected data, Instructions like field must appear within that embedded list of Instructions.

Common properties

Some properties in the definition dictionary are common to all Instructions.

action The action of the Instruction. If not specified, defaults to "field".

Other properties will depend on the action of the Instruction, and any conversions that need to be applied to the input data.

Instruction actions

field
field-structured
set-value
remove-values
set-attribute-group
if-exists
if-value-one-of
if-has-value
within
for-each
new
load
assert-destination
abort-record
log-error