Skip to content

Normalize

table category: table-control no `||` resultSize: 1

Builds a unique-key index on the CDM table; duplicate records are silently skipped.

Normalize declares a uniqueness constraint over a set of CDM-table fields. As records are inserted, the engine checks them against the index and discards any that would duplicate an existing key. This is essential when several source tables map into the same CDM table and may produce overlapping records (a typical case is the location table).

Even when only one source table maps in, normalisation is often worthwhile — for example, provider records frequently share an address.

At most one Normalize rule per CDM table.

Parameters

1key Mandatory — accepts: array of fields (:-notation)

The fields whose combined value must be unique on the table.

Requires

  • All referenced CDM fields must exist.
  • At least one field must be supplied.

Examples

Normalize([:address_1, :city, :state, :zip])