Start typing to search.

Task Reference

compute_hash

View Markdown

Compute a stable content hash per record so downstream sync steps can detect changes between runs.

compute_hash

Computes a hash of the input record and adds it as a field, for change detection between runs.

When to use it

Use compute_hash with get_destination_id and a skip_if comparison to update only records whose content changed. For new tasks, prefer sync_record, which computes and compares the hash internally as part of one composite step.

Configuration

Key Type Required Default Description
fields string[] No all fields not prefixed with _ Field names to include in the hash.
algorithm string No sha256 Hash algorithm: sha256 or md5.
field_name string No _hash Name of the output field the hash is written to.

An invalid algorithm fails validation with Invalid hash algorithm: '<value>' (must be sha256, md5); a non-string-array fields fails with compute_hash fields must be an array of strings.

Example

name: hash-contacts
connectors:
  source:
    type: csv
steps:
  - name: read_contacts
    type: call_method
    config:
      connector: source
      method: read
      args:
        resource: contacts
 
  - name: hash
    type: compute_hash
    config:
      fields: ["name", "email", "updated_at"]

Behavior notes

  • The output is the input record plus the hash field — by default _hash, or the name set in field_name. No other fields change.
  • Requires an object input. A non-object item fails the step with Compute hash requires an object input.
  • When fields is omitted, every field whose name does not start with _ participates in the hash, so previously added bookkeeping fields (like _hash itself) are excluded.
  • Downstream steps that compare hashes must use the same fields list and algorithm, or every record looks changed.