On this page

A transformation resource converts records from a source dataset to a target dataset. Choose declarative MAPPINGS for field-level work or SCRIPT when the mapping model cannot express the required result.

Configure mappings

{
  "type": "transformation",
  "_id": "normalize_customer",
  "description": "Map CRM records into the customer dataset",
  "source": "crm_customer_dataset",
  "target": "customer_dataset",
  "transformationType": "MAPPINGS",
  "carryOverData": false,
  "carryOverMetadata": true,
  "mappings": [
    {
      "id": "customer_identifier",
      "description": "Copy the CRM identifier",
      "mappingType": "COLUMN",
      "source": ["crm_id"],
      "target": ["customer_id"]
    },
    {
      "id": "full_name",
      "description": "Join first and last name",
      "mappingType": "COLUMN",
      "source": ["first_name", "last_name"],
      "target": ["full_name"],
      "delimiter": " "
    },
    {
      "id": "source_system",
      "description": "Identify the source",
      "mappingType": "CONSTANT",
      "constant": "CRM",
      "target": ["source_system"]
    }
  ]
}

Mapping types are COLUMN and CONSTANT. Supplying several source columns to a COLUMN mapping performs concatenation with delimiter; there is no separate CONCATENATE mapping type.

delimiter applies only when the target column holds a single value. A multiple-valued target receives each source value on its own rather than the joined one.

Mapping evaluation

Each mapping reads the original input record. It cannot read output produced by an earlier mapping. Use a scripted transformation for dependent operations.

Mappings targeting the same column accumulate values. Two mappings to fullName retain both values rather than replacing the first with the second.

Source and target columns must exist in their respective datasets. Validation reports an undeclared mapping column. Inspect the complete output as well as validation: a valid mapping can still target the wrong declared field.

Use a scripted transformation

Set transformationType to SCRIPT and provide the resource’s top-level script. Script is not a per-mapping type. Use it only for reviewed rules that cannot be represented by column and constant mappings.

The script receives both records — the one that arrived and the one being built — and writes into the second. It is not asked to return anything.

A script failure can leave a partially transformed record without stopping the load. Test failure cases and inspect the output before applying the transformation to a larger record set.

Carry-over options

OptionEffect
carryOverDataStarts the target from incoming data before mappings or script changes it
carryOverMetadataCarries supported Golden metadata into the target

_id and existing _source are preserved independently of carryOverMetadata. Transformations cannot forge server-owned record metadata.

Set both options explicitly and validate the resulting record. A target field that is not populated may remain empty, so compare test output with the complete target dataset rather than checking only the fields you expect to change.

Golden 3.0.0 · Published 2026-10-04