Skip to content

Commit 5b47f19

Browse files
docs: retire strict_provenance and drop provenance terminology
Match datajoint-python's removal of the strict_provenance runtime guardrail, and align the docs with the decision to keep provenance terminology out of DataJoint's own documentation. DataJoint implements the relational workflow model — data integrity, consistency, lineage, and reproducibility; provenance is a platform-level compatibility concern documented separately. - Rename reference/specs/provenance.md -> trace.md; rewrite it as the spec for the upstream read surface (Diagram.trace + self.upstream), removing the strict_provenance section entirely and reframing the "read/write boundary" in lineage/reproducibility terms. - about/whats-new-23.md: reframe the "provenance trinity" as the trace + self.upstream pair; drop the strict_provenance subsection and adoption step; retarget links to trace.md and the make() contract. - mkdocs.yaml: nav "Provenance Trace & Strict Provenance" -> "Upstream Trace". - Sweep "provenance" from the conceptual and tutorial pages (index, about/index, relational-workflow-model, normalization, comparison-to-workflow-languages, schema-as-workflow-specification, data-pipelines, faq, and three tutorial notebooks), replacing it with "lineage"/"reproducibility"/"traceability" as fits each context.
1 parent 350ee9a commit 5b47f19

15 files changed

Lines changed: 335 additions & 496 deletions

mkdocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ nav:
123123
- Staged Insert: reference/specs/staged-insert.md
124124
- Cascade: reference/specs/cascade.md
125125
- AutoPopulate: reference/specs/autopopulate.md
126-
- Provenance Trace & Strict Provenance: reference/specs/provenance.md
126+
- Upstream Trace: reference/specs/trace.md
127127
- Job Metadata: reference/specs/job-metadata.md
128128
- Object Store Configuration: reference/specs/object-store-configuration.md
129129
- Deployment:

src/about/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Key characteristics:
1818
- **Automatic dependency tracking** — Foreign keys encode workflow dependencies
1919
- **Built-in computation** — Imported and Computed tables run automatically
2020
- **Data integrity** — Referential integrity and transaction support
21-
- **Reproducibility** — Immutable data with full provenance
21+
- **Reproducibility** — Immutable data with full lineage
2222

2323
## History
2424

src/about/whats-new-23.md

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
# What's New in DataJoint 2.3
22

3-
DataJoint 2.3 introduces the **provenance trinity**`Diagram.trace`, `self.upstream`, and `strict_provenance` — which together turn "a computed row can be traced to the exact upstream rows it came from" from a convention into something the framework helps construct and check. It also ships the **SparkAdapter Codec Protocol** for typed rendering to Spark-native types, **`dj.deploy.set_replica_identity`** for PostgreSQL change-data-capture, and a **cascade fix** for Part-of-Part and renamed-foreign-key chains.
3+
DataJoint 2.3 adds a first-class **upstream read surface**`Diagram.trace` and `self.upstream` — which make "a computed row derives only from its declared upstream inputs" easy to follow inside `make()` and easy to query afterward. It also ships the **SparkAdapter Codec Protocol** for typed rendering to Spark-native types, **`dj.deploy.set_replica_identity`** for PostgreSQL change-data-capture, and a **cascade fix** for Part-of-Part and renamed-foreign-key chains.
44

5-
> **Upgrading from 2.0, 2.1, or 2.2?** No breaking changes. Everything here is additive, and `strict_provenance` defaults to off — existing pipelines run identically.
5+
> **Upgrading from 2.0, 2.1, or 2.2?** No breaking changes. Everything here is additive — existing pipelines run identically.
66
77
> **Citation:** Yatsenko D, Nguyen TT. *DataJoint 2.0: A Computational Substrate for Agentic Scientific Workflows.* arXiv:2602.16585. 2026. [doi:10.48550/arXiv.2602.16585](https://doi.org/10.48550/arXiv.2602.16585)
88
99
## Overview
1010

11-
DataJoint's provenance guarantee rests on the convention that `make(self, key)` reads only from declared upstream dependencies and writes only to `self` (and its Parts). The framework has always *defined* this boundary but never *checked* it: a `make()` could `fetch()` from any table, making the dependency invisible to the foreign-key graph and silently breaking the provenance claim downstream.
12-
13-
The 2.3 trinity closes that loop with three pieces designed as a unit:
11+
A computed row is reproducible only when `make(self, key)` reads only from its declared upstream dependencies and writes only to `self` (and its Parts). DataJoint 2.3 makes that read/write boundary easy to follow — and the resulting data lineage easy to query — with two features designed as a unit:
1412

1513
1. **`Diagram.trace()`** constructs the upstream view as a first-class query object.
1614
2. **`self.upstream`** exposes that view ergonomically inside `make()`.
17-
3. **`strict_provenance`** checks (best-effort) that nothing else is read or written.
1815

19-
## The Provenance Trinity
16+
## Upstream Trace and `self.upstream`
2017

2118
### `Diagram.trace()` — the upstream mirror of `cascade`
2219

@@ -48,31 +45,13 @@ class Spectrum(dj.Computed):
4845
self.insert1({**key, "spectrum": compute_spectrum(samples, rate)})
4946
```
5047

51-
Construction is lazy — the SQL fires only when you access an ancestor and fetch. Outside `make()`, accessing `self.upstream` raises a clear error. Even without `strict_provenance`, it's a pure ergonomic win over `(Recording & key).fetch1(...)`.
52-
53-
### `strict_provenance` — an opt-in runtime guardrail
54-
55-
Setting the flag makes the provenance boundary checked at runtime:
56-
57-
```python
58-
dj.config["strict_provenance"] = True
59-
```
60-
61-
When enabled, inside a `make()`:
62-
63-
- **Reads** of tables outside the declared-ancestor set (plus `self` and its Parts) raise `DataJointError`.
64-
- **Writes** to anything other than `self` and its Parts raise `DataJointError`.
65-
- **Key consistency** is checked: rows inserted into `self`/Parts must carry primary-key values consistent with the current `key`.
66-
67-
`strict_provenance` is an **operational** flag — a property of how a deployment runs, not of the schema. It's a **best-effort development guardrail**, not an airtight boundary: it observes access through the DataJoint Python client and is designed to surface *accidental* undeclared dependencies (turn it on in staging, fix what it flags). Comprehensive enforcement across every access path is handled on the DataJoint platform, which combines these runtime checks with agentic review of `make()` source in its code-deployment CI/CD. See the [Provenance Specification](../reference/specs/provenance.md) for the exact enforcement model and its documented limits.
48+
Construction is lazy — the SQL fires only when you access an ancestor and fetch. Outside `make()`, accessing `self.upstream` raises a clear error. It's a pure ergonomic win over `(Recording & key).fetch1(...)`, and it keeps the read inside the declared upstream — which is what makes the result reproducible. See the [make() reproducibility contract](../reference/specs/autopopulate.md#43-the-make-reproducibility-contract) for the full rule set.
6849

69-
### Adopting the trinity incrementally
50+
### Adopting `self.upstream` incrementally
7051

71-
1. Upgrade to 2.3 — the APIs are available; `strict_provenance` stays off.
52+
1. Upgrade to 2.3 — the new APIs are available; existing code is unaffected.
7253
2. Use `self.upstream` in new `make()` implementations.
73-
3. Migrate existing `make()` reads from `(Upstream & key).fetch(...)` to `self.upstream[Upstream].fetch(...)`.
74-
4. Enable `strict_provenance=True` in staging and fix the undeclared dependencies it surfaces.
75-
5. Enable in production.
54+
3. Migrate existing `make()` reads from `(Upstream & key).fetch(...)` to `self.upstream[Upstream].fetch(...)` — no semantic change, but the read is now visibly confined to the declared upstream.
7655

7756
## SparkAdapter Codec Protocol
7857

@@ -113,7 +92,7 @@ It is PostgreSQL-only (raising a clear error on other backends), idempotent at t
11392

11493
## See Also
11594

116-
- [Provenance Specification](../reference/specs/provenance.md)`trace`, `self.upstream`, and `strict_provenance` in full
95+
- [Upstream Trace Specification](../reference/specs/trace.md)`Diagram.trace` and `self.upstream` in full
11796
- [SparkAdapter Codec Protocol](../reference/specs/spark-adapter.md) — typed rendering to Spark-native types
11897
- [Deployment Operations](../reference/specs/deploy-operations.md) — the `dj.deploy` module
11998
- [Cascade Specification](../reference/specs/cascade.md) — propagation rules shared with `trace`

src/explanation/comparison-to-workflow-languages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ rather than competing with it.
3535
| Foreign-key integrity ||| Enforced |
3636
| Computation specification | Workflow file (CWL/SMK/NF) | Task functions in code | `make()` declared in schema |
3737
| Execution order | Step DAG in workflow file | Task DAG in code | Foreign-key DAG in schema |
38-
| Provenance recording | Reconstructed from run logs | Task-level run history | Structural (FK chain) |
38+
| Lineage recording | Reconstructed from run logs | Task-level run history | Structural (FK chain) |
3939
| Drift detection | Out of scope | Out of scope | Cascade on upstream change |
4040
| Query interface | Filesystem + ad hoc | Task metadata UI | Five-operator algebra |
4141
| Retry / idempotence | Step-level rerun | Task-level retry | Per-entity, key-driven |
@@ -59,7 +59,7 @@ top priorities.
5959
What these systems share is what they decline to specify: a formal
6060
data-structure layer. There are no typed schemas across pipeline stages,
6161
no foreign keys binding intermediate results, no algebraic query surface
62-
over what the pipeline has produced. Provenance is reconstructed from run
62+
over what the pipeline has produced. Lineage is reconstructed from run
6363
logs and filenames rather than enforced by structure. Entity-level lineage
6464
— which subject or sample or session produced a result — is implicit in
6565
directory conventions and scatter patterns rather than declared. Drift in
@@ -112,7 +112,7 @@ structure.
112112
the team is prepared to write its own catalog or lineage layer
113113
separately.
114114
- **Choose DataJoint** when the data and the computation cannot cleanly
115-
separate, when provenance, lineage, and integrity must be structural
115+
separate, when lineage and integrity must be structural
116116
rather than reconstructed, and when agents need a single machine-readable
117117
model of the pipeline.
118118
- **Use both.** DataJoint inside an Airflow, Argo, or Prefect orchestration

src/explanation/data-pipelines.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A **scientific data pipeline** extends beyond a database with computations. It i
66
- Integrates diverse tools for data entry, visualization, and analysis
77
- Provides infrastructure for secure, scalable computation
88
- Enables collaboration across teams and institutions
9-
- Supports reproducibility and provenance tracking throughout
9+
- Supports reproducibility and data lineage throughout
1010

1111
## Pipeline Architecture
1212

@@ -46,7 +46,7 @@ This dual structure ensures that both code dependencies and data dependencies fl
4646
This constraint is fundamental to DataJoint's design. It ensures:
4747

4848
- **Unidirectional data flow** — Data enters at the top and flows downstream
49-
- **Clear provenance** — Every result traces back to its inputs
49+
- **Clear lineage** — Every result traces back to its inputs
5050
- **Safe deletion** — Cascading deletes follow the DAG without cycles
5151
- **Predictable computation**`populate()` can determine correct execution order
5252

@@ -148,7 +148,7 @@ Throughout this process, the schema definition remains the single source of trut
148148

149149
## Comparing Approaches
150150

151-
The pipeline approach requires upfront investment in schema design. Compared to a file-based approach where data structure is implicit in filenames, dependencies are encoded in scripts, and provenance must be tracked manually, a DataJoint pipeline makes all of those explicit in the schema — and pays the investment back in reproducibility, query power, and collaboration as projects scale.
151+
The pipeline approach requires upfront investment in schema design. Compared to a file-based approach where data structure is implicit in filenames, dependencies are encoded in scripts, and lineage must be tracked manually, a DataJoint pipeline makes all of those explicit in the schema — and pays the investment back in reproducibility, query power, and collaboration as projects scale.
152152

153153
For a detailed structural comparison against file-based workflow systems (CWL, Snakemake, Nextflow) and task orchestrators (Airflow, Argo, Prefect, Dagster), and for guidance on when the two layers complement rather than substitute each other, see [Comparison to Workflow Languages](comparison-to-workflow-languages.md).
154154

@@ -160,7 +160,7 @@ Scientific data pipelines extend the Relational Workflow Model into complete dat
160160
- **DAG Structure** — Unidirectional flow of data and dependencies
161161
- **Object-Augmented Schemas** — Scalable storage with relational semantics
162162

163-
The schema remains central—defining data structures, dependencies, and computational flow. This pipeline-centric approach lets teams focus on their science while the system handles data integrity, provenance, and reproducibility automatically.
163+
The schema remains central—defining data structures, dependencies, and computational flow. This pipeline-centric approach lets teams focus on their science while the system handles data integrity, lineage, and reproducibility automatically.
164164

165165
## See Also
166166

src/explanation/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ A **lakehouse** merges data lake flexibility with data warehouse structure, opti
149149
- Data integrity and reproducibility
150150
- Traceability within structured scientific datasets
151151

152-
DataJoint can complement lakehouse architectures—using object storage for large files while maintaining relational structure for metadata and provenance.
152+
DataJoint can complement lakehouse architectures—using object storage for large files while maintaining relational structure for metadata and lineage.
153153

154154
## Does DataJoint Require SQL Knowledge?
155155

src/explanation/normalization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class HousingAssignment(dj.Manual):
239239
3. **Join efficiency** — Normalized tables with proper keys enable efficient
240240
joins through the workflow graph
241241

242-
4. **Clear provenance** — Each table represents a distinct workflow step,
242+
4. **Clear lineage** — Each table represents a distinct workflow step,
243243
making data lineage clear
244244

245245
## Summary

src/explanation/relational-workflow-model.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ above illustrates.
6666
| **Row semantics** | True proposition | Entity instance | **Workflow artifact** |
6767
| **Foreign keys** | Referential integrity | Relationship | **Execution order** |
6868
| **Computation** | Not addressed | Not addressed | **Declared in schema** |
69-
| **Provenance** | Not addressed | Not addressed | **Structural** |
69+
| **Data lineage** | Not addressed | Not addressed | **Structural** |
7070
| **Implementation gap** | High | High | **None** |
7171

7272
## A semantic interpretation, not a departure
@@ -77,7 +77,7 @@ primary and foreign keys, normalization, and the query algebra keep
7777
their classical meaning. The model adds four readings on top:
7878

7979
- Tables also represent **workflow steps**.
80-
- Rows also represent **workflow artifacts**, carrying provenance to their inputs.
80+
- Rows also represent **workflow artifacts**, traceable to their inputs.
8181
- Foreign keys also prescribe **execution order** — the dependency graph *is* the pipeline DAG, enforced by the database.
8282
- **Computed and Imported tables carry their own `make()` methods**, declaring derivation logic in the schema itself rather than in an external workflow file.
8383

@@ -98,8 +98,8 @@ alongside DataJoint.
9898

9999
## Substrate consequences
100100

101-
Because dependencies are declared before any computation runs, provenance
102-
and lineage become **properties of the substrate**, not artifacts assembled
101+
Because dependencies are declared before any computation runs, lineage
102+
and reproducibility become **properties of the substrate**, not artifacts assembled
103103
after the fact. Every row in `Segmentation` is reachable by foreign key
104104
from the exact `AverageFrame` and `SegmentationParam` that produced it;
105105
cascade deletes remove dependent results when their inputs become invalid.
@@ -165,7 +165,7 @@ at the workflow step the table represents*. A `Session` table holds
165165
attributes known when the session is entered (date, experimenter,
166166
subject); analysis parameters determined later belong in Computed tables
167167
that depend on `Session`. The discipline prevents tables that accumulate
168-
attributes from different workflow stages, obscuring provenance and
168+
attributes from different workflow stages, obscuring lineage and
169169
complicating updates.
170170

171171
### Entity integrity
@@ -209,7 +209,7 @@ incompatible designs.
209209
| Foreign keys enforce consistency | Foreign keys prescribe execution order |
210210
| Updates modify state | Computations create new states |
211211
| Schemas organize storage | Schemas specify pipelines |
212-
| Queries retrieve data | Queries trace provenance |
212+
| Queries retrieve data | Queries trace lineage |
213213

214214
## Further reading
215215

src/explanation/schema-as-workflow-specification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ The `make()` method is the typed function the schema declares from
112112
upstream key to artifact: it receives the primary key of one entity,
113113
fetches its inputs by query, produces the result, and inserts exactly
114114
one row. Each inserted row records the git hash of the `make()` source
115-
that produced it — code provenance is part of the schema's structural
116-
footprint, not an audit artifact bolted on afterward. The
115+
that produced it — the identity of the code that produced each row is part of
116+
the schema's structural footprint, not an audit artifact bolted on afterward. The
117117
[Computation Model](computation-model.md) page covers the full `make()`
118118
/ `populate()` contract, including the three-part pattern for long
119119
computations.
@@ -128,7 +128,7 @@ with a well-defined primary key, so any expression is itself a valid
128128
operand for the next operator. Entity integrity is preserved under
129129
composition. This is what lets the schema be both a specification and a
130130
queryable object — the same algebra that retrieves data also traces
131-
provenance and derives the key source for the next `populate()`. See
131+
lineage and derives the key source for the next `populate()`. See
132132
[Query Algebra](query-algebra.md) and
133133
[Semantic Matching](semantic-matching.md) for operator semantics and
134134
the lineage-based join rule that prevents accidental matches on

src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## About DataJoint
99

10-
**DataJoint** implements the [Relational Workflow Model](explanation/relational-workflow-model.md)—a data model where your database schema defines an executable data pipeline. Tables represent workflow steps, foreign keys encode dependencies, and the system handles job management, parallel execution, and provenance tracking. [Object storage](explanation/data-pipelines.md#object-augmented-schemas) integration enables seamless handling of large scientific data.
10+
**DataJoint** implements the [Relational Workflow Model](explanation/relational-workflow-model.md)—a data model where your database schema defines an executable data pipeline. Tables represent workflow steps, foreign keys encode dependencies, and the system handles job management, parallel execution, and data lineage. [Object storage](explanation/data-pipelines.md#object-augmented-schemas) integration enables seamless handling of large scientific data.
1111

1212
![pipeline](images/pipeline.svg){: style="width:100%;max-width:1100px;"}
1313

0 commit comments

Comments
 (0)