Skip to content

E9: durable extraction-to-source provenance for writeback eligibility #1296

Done

Description

@athvin

Child of #514, prerequisite of #993 (its "Implementation findings" require durable extraction-to-source provenance before a preview member may acquire a connection/object identity).

The only durable link from a lake ingest_batch_id (= the run/job id) to a Salesforce connection is the Postgres job AdvanceSfCursor enqueues; raw_records carries source/payload/batch only and the import.extract audit is best-effort.

Acceptance

  • source_delivery_provenance (Postgres entity): run_id, delivery_id, source, connection_id, object, delivery/source hashes; unique per (dataset_id, run_id) and (dataset_id, delivery_id).
  • Written in the SAME transaction as the extract's job enqueue; a retry converges (no duplicate, refuses a conflicting identity).
  • Reads by run ids, and distinct connections per source (a source reused against a second connection is detectable).
  • A pushed/uploaded delivery's run has no provenance row.
  • pg_delivery_provenance covers each; make check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

salesforce-launch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions