table_snapshot

A table frozen as a value with its hash.

ConstructDeterministic

Flags

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

Parameters

Parameter Type Required Notes
table reference yes A value's reference.
response_format "concise" | "detailed" no The byte budget: 64 KiB concise, 512 KiB detailed.

Example

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

JSON
table_filter {
  "table": "${input:orders}",
  "predicate": {
    "fn": "eq",
    "args": [
      {
        "col": 7
      },
      {
        "lit": "open",
        "type": {
          "kind": "utf8"
        }
      }
    ]
  }
}

table_snapshot {
  "table": "${table_filter}"
}

Result

54 rows frozen

JSON
{
  "ref": "sha256:5c50f07a096af21e0051d02c87b3bba2bcc27861a28b3fcd1439584041960e01",
  "kind": "table",
  "rows": 54,
  "schema": "…"
}

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.