Shape · Matching and dedupe

Survivorship

Merges each group of duplicate records into one best record, picking each field by a rule such as most recent or most frequent.

Also known as: Golden record, master data

How it works

Key columns group the rows, usually the cluster_id from Match Grouping. Every other column is resolved by the Default rule: Most frequent, Most recent (by date), Oldest (by date), Maximum or Minimum; the two date rules need a Date column. Per-column rules override the default for named columns. NULLs are skipped, so a field wins from whichever row has a value, and a group where every value is NULL stays NULL; the date rules also skip rows with a NULL date. Ties go to the smallest value. The output has one row per key in the input's column order, sorted by key.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Survivorship, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  keyColumns: string[]
  defaultRule: "most_frequent"|"most_recent"|"oldest"|"max"|"min"
  dateColumn?: string
  overrides?: [{ column: string, rule: <same> }]
}

one row per key group (usually cluster_id from Match Grouping); every other column resolved by its override or the default rule; most_recent/oldest need dateColumn; NULLs are skipped; ties → smallest value

Example

Merge the matched contacts: key columns cluster_id, default rule Most recent with date column updated_at, and a per-column rule Most frequent for last_name.

cluster_idemailphoneupdated_at
1jon@example.comNULL2024-01-05
1NULL555 01002024-03-10
1 (result)jon@example.com555 01002024-03-10