table_dedupe

Normalise, block, compare, score and cluster near-duplicate rows; the threshold is explicit.

ConstructDeterministic

Flags

Flag Value
Kind construct: makes a value from values
Rows keeps some rows
Deterministic yes
Order matters no
Decomposable no
Makes a table value

Parameters

Parameter Type Required Notes
table reference yes A value's reference.
fields array of object yes 1 or more items
blocks array of object no
normalise object no
threshold number no at least 0, at most 1
response_format "concise" | "detailed" no The byte budget: 64 KiB concise, 512 KiB detailed.

Example

Over the example tables customers; ${input:name} is an input's reference and ${verb} the value an earlier call made.

JSON
table_dedupe {
  "table": "${input:customers}",
  "fields": [
    {
      "column": "name",
      "method": "jaro_winkler"
    }
  ],
  "blocks": [
    {
      "column": "region"
    }
  ],
  "threshold": 0.9
}

Result

0 pairs over the threshold

JSON
{
  "ref": "sha256:25f8447cc8c693227d7ad9b5c4d1bd7763bd09d5e8b76702b2d5a50ac3c66438",
  "kind": "table",
  "rows": 45,
  "schema": {
    "fields": [
      {
        "name": "cid",
        "type": {
          "kind": "int64"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "name",
        "type": {
          "kind": "utf8"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "region",
        "type": {
          "kind": "utf8"
        },
        "nullable": true,
        "metadata": {}
      },
      {
        "name": "since",
        "type": {
          "kind": "date"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "cluster",
        "type": {
          "kind": "int64"
        },
        "nullable": false,
        "metadata": {}
      }
    ],
    "metadata": {}
  },
  "compared": 197,
  "pairs": []
}

Diagnostics

A refusal comes back as ok: false with coded diagnostics; every code, with its fix, is on the diagnostics page. A parameter that does not match the schema above is ARG_INVALID, with the parameter's path.