Skip to content

Commit ac8de43

Browse files
simonharrerclaude
andcommitted
Link the Data Contract CLI documentation at cli.datacontract.com
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 565803a commit ac8de43

9 files changed

Lines changed: 24 additions & 24 deletions

File tree

‎exercises/part-a/exercise1-put-your-data-under-contract.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Let's add some more detail to the contract...
244244
# ...
245245
```
246246

247-
Documentation: [SQL quality rules, property-level example](https://docs.datacontract.com/quality-rules/sql#property-level-example)
247+
Documentation: [SQL quality rules, property-level example](https://cli.datacontract.com/quality-rules/sql#property-level-example)
248248

249249
19. Test the contract again and spot the new check added by this.
250250

@@ -271,9 +271,9 @@ Let's add some more detail to the contract...
271271

272272
Documentation:
273273

274-
- [Quality rule types](https://docs.datacontract.com/quality-rules#quality-rule-types): `text`, `sql`, and `library`
275-
- [SQL schema-level example](https://docs.datacontract.com/quality-rules/sql#schema-level-example): checks that span several columns or tables, like the `order_id` check above
276-
- [SQL comparators](https://docs.datacontract.com/quality-rules/sql#comparators): `mustBe`, `mustBeGreaterThan`, `mustBeBetween`, ...
274+
- [Quality rule types](https://cli.datacontract.com/quality-rules#quality-rule-types): `text`, `sql`, and `library`
275+
- [SQL schema-level example](https://cli.datacontract.com/quality-rules/sql#schema-level-example): checks that span several columns or tables, like the `order_id` check above
276+
- [SQL comparators](https://cli.datacontract.com/quality-rules/sql#comparators): `mustBe`, `mustBeGreaterThan`, `mustBeBetween`, ...
277277

278278

279279
## Add Context for AI
@@ -357,13 +357,13 @@ AI agents, LLM chat tools, and BI assistants increasingly query data on their ow
357357
description: Data updated daily
358358
```
359359

360-
The CLI tests [`retention`](https://docs.datacontract.com/service-levels#retention) and [`freshness`](https://docs.datacontract.com/service-levels#freshness) when [`element`](https://docs.datacontract.com/service-levels#the-element-reference) names a timestamp column ([`frequency` is documentation only](https://docs.datacontract.com/service-levels#when-no-check-is-generated)). Run only the service level checks:
360+
The CLI tests [`retention`](https://cli.datacontract.com/service-levels#retention) and [`freshness`](https://cli.datacontract.com/service-levels#freshness) when [`element`](https://cli.datacontract.com/service-levels#the-element-reference) names a timestamp column ([`frequency` is documentation only](https://cli.datacontract.com/service-levels#when-no-check-is-generated)). Run only the service level checks:
361361

362362
```bash
363363
datacontract test --checks slaProperties orders_v1.odcs.yaml
364364
```
365365

366-
Optional: add a `freshness` property (`value: 24`, `unit: h`, `element: orders.order_timestamp`) and run the checks again. It fails, because the workshop data is a static snapshot. In production, this check alerts you when a pipeline stops loading. Remove it again afterwards. Documentation: [Freshness](https://docs.datacontract.com/service-levels#freshness)
366+
Optional: add a `freshness` property (`value: 24`, `unit: h`, `element: orders.order_timestamp`) and run the checks again. It fails, because the workshop data is a static snapshot. In production, this check alerts you when a pipeline stops loading. Remove it again afterwards. Documentation: [Freshness](https://cli.datacontract.com/service-levels#freshness)
367367

368368

369369
## Set to Active

‎exercises/part-b/exercise4-design-your-data-product.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You consume the `orders_v2` contract — it guarantees you the `quantity` column
4646
- `total_quantity` is never less than `order_count`
4747
- The view is not empty
4848

49-
Documentation: [library metrics](https://docs.datacontract.com/quality-rules/library#supported-metrics) like `duplicateValues` and `rowCount` need no SQL; for everything else, use a [SQL quality rule](https://docs.datacontract.com/quality-rules/sql#schema-level-example).
49+
Documentation: [library metrics](https://cli.datacontract.com/quality-rules/library#supported-metrics) like `duplicateValues` and `rowCount` need no SQL; for everything else, use a [SQL quality rule](https://cli.datacontract.com/quality-rules/sql#schema-level-example).
5050

5151
5. Declare the semantic role of each property (`semanticType`, new in ODCS 3.2): `sku` and `year` are dimensions you group and filter by, `order_count` and `total_quantity` are measures. `transformLogic` says how a measure is computed. In the editor, open the property and set **Semantic Type** and **Transform Logic**:
5252

‎exercises/part-c/exercise7-ci-cd-with-github-actions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,4 @@ A breaking change in a contract breaks consumers. The pipeline catches it *befor
198198

199199
Running Entropy Data locally (Community Edition)? GitHub can't reach your laptop, so this only works with the cloud.
200200
- Linked your contracts to semantic concepts (Exercise 9)? The CLI resolves these links on the Entropy Data host during `ci`. Add `--no-inline-references` to the test step if the pipeline can't reach it.
201-
- **Schedule production tests with Airflow:** CI tests a contract when it changes, but the data changes every day. The [Data Contract provider for Airflow](https://github.com/datacontract/airflow-provider-datacontract) adds a `DataContractTestOperator` that runs `datacontract test` as a quality gate in your DAGs. See the [scheduling docs for Airflow](https://docs.datacontract.com/scheduling/airflow).
201+
- **Schedule production tests with Airflow:** CI tests a contract when it changes, but the data changes every day. The [Data Contract provider for Airflow](https://github.com/datacontract/airflow-provider-datacontract) adds a `DataContractTestOperator` that runs `datacontract test` as a quality gate in your DAGs. See the [scheduling docs for Airflow](https://cli.datacontract.com/scheduling/airflow).

‎tutorial/src/content/de/ci-cd.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,4 @@ def orders_contract():
398398
orders_contract()
399399
```
400400

401-
Installation mit `pip install "airflow-provider-datacontract[postgres]"`. Connections, das Veröffentlichen von Ergebnissen und die Ergebnisansicht beschreibt die [Scheduling-Doku für Airflow](https://docs.datacontract.com/scheduling/airflow) der Data Contract CLI. Kein Airflow? Ein `schedule:`-Trigger in GitHub Actions macht dasselbe, siehe die [Scheduling-Doku für GitHub Actions](https://docs.datacontract.com/scheduling/github-actions).
401+
Installation mit `pip install "airflow-provider-datacontract[postgres]"`. Connections, das Veröffentlichen von Ergebnissen und die Ergebnisansicht beschreibt die [Scheduling-Doku für Airflow](https://cli.datacontract.com/scheduling/airflow) der Data Contract CLI. Kein Airflow? Ein `schedule:`-Trigger in GitHub Actions macht dasselbe, siehe die [Scheduling-Doku für GitHub Actions](https://cli.datacontract.com/scheduling/github-actions).

‎tutorial/src/content/de/contract-first.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ quality:
101101
```
102102
103103
<Callout type="tip">
104-
Eindeutigkeit über zwei Spalten: `GROUP BY ... HAVING COUNT(*) > 1` in einer Subquery. Checks über mehrere Spalten gehören auf [Schema-Ebene](https://docs.datacontract.com/quality-rules/sql#schema-level-example) (`schema[].quality`), nicht an eine einzelne Property. Eindeutigkeit und „nicht leer“ gehen auch ohne SQL, als [Library-Metriken](https://docs.datacontract.com/quality-rules/library#supported-metrics) `duplicateValues` und `rowCount`.
104+
Eindeutigkeit über zwei Spalten: `GROUP BY ... HAVING COUNT(*) > 1` in einer Subquery. Checks über mehrere Spalten gehören auf [Schema-Ebene](https://cli.datacontract.com/quality-rules/sql#schema-level-example) (`schema[].quality`), nicht an eine einzelne Property. Eindeutigkeit und „nicht leer“ gehen auch ohne SQL, als [Library-Metriken](https://cli.datacontract.com/quality-rules/library#supported-metrics) `duplicateValues` und `rowCount`.
105105
</Callout>
106106

107107
</Step>

‎tutorial/src/content/de/contract.mdx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Testing orders_v1.odcs.yaml
356356
```
357357

358358
<Callout type="tip">
359-
„Zähle die fehlerhaften Zeilen, erwarte null“ funktioniert für fast jede Regel. Schlägt der Check fehl, hilft dir die Abfrage beim Debuggen. Mehr in der [Doku zu SQL-Qualitätsregeln](https://docs.datacontract.com/quality-rules/sql#property-level-example).
359+
„Zähle die fehlerhaften Zeilen, erwarte null“ funktioniert für fast jede Regel. Schlägt der Check fehl, hilft dir die Abfrage beim Debuggen. Mehr in der [Doku zu SQL-Qualitätsregeln](https://cli.datacontract.com/quality-rules/sql#property-level-example).
360360
</Callout>
361361

362362
</Step>
@@ -382,7 +382,7 @@ quality:
382382
mustBe: 0
383383
```
384384

385-
Alle Optionen: die [Arten von Qualitätsregeln](https://docs.datacontract.com/quality-rules#quality-rule-types), [SQL-Regeln auf Schema-Ebene](https://docs.datacontract.com/quality-rules/sql#schema-level-example) für Checks über mehrere Spalten und Tabellen, [Library-Metriken](https://docs.datacontract.com/quality-rules/library#supported-metrics) wie `rowCount` und die [Vergleichsoperatoren](https://docs.datacontract.com/quality-rules/sql#comparators).
385+
Alle Optionen: die [Arten von Qualitätsregeln](https://cli.datacontract.com/quality-rules#quality-rule-types), [SQL-Regeln auf Schema-Ebene](https://cli.datacontract.com/quality-rules/sql#schema-level-example) für Checks über mehrere Spalten und Tabellen, [Library-Metriken](https://cli.datacontract.com/quality-rules/library#supported-metrics) wie `rowCount` und die [Vergleichsoperatoren](https://cli.datacontract.com/quality-rules/sql#comparators).
386386

387387
</Step>
388388

@@ -571,12 +571,12 @@ slaProperties:
571571
```
572572

573573
<Callout type="concept" title="Welche Service Levels werden getestet?">
574-
Die CLI macht aus zwei SLA-Eigenschaften Checks, wenn sie in [`element`](https://docs.datacontract.com/service-levels#the-element-reference) eine Zeitstempel-Spalte nennen (`schema.property`):
574+
Die CLI macht aus zwei SLA-Eigenschaften Checks, wenn sie in [`element`](https://cli.datacontract.com/service-levels#the-element-reference) eine Zeitstempel-Spalte nennen (`schema.property`):
575575

576-
- [`retention`](https://docs.datacontract.com/service-levels#retention): Der **älteste** Wert (MIN) muss jünger als der Zeitraum sein. Alte Daten werden also wirklich gelöscht.
577-
- [`freshness`](https://docs.datacontract.com/service-levels#freshness): Der **neueste** Wert (MAX) muss jünger als die Schwelle sein. Neue Daten kommen also weiterhin an.
576+
- [`retention`](https://cli.datacontract.com/service-levels#retention): Der **älteste** Wert (MIN) muss jünger als der Zeitraum sein. Alte Daten werden also wirklich gelöscht.
577+
- [`freshness`](https://cli.datacontract.com/service-levels#freshness): Der **neueste** Wert (MAX) muss jünger als die Schwelle sein. Neue Daten kommen also weiterhin an.
578578

579-
Andere Eigenschaften wie `frequency` oder `latency` sind [reine Dokumentation](https://docs.datacontract.com/service-levels#when-no-check-is-generated). Achtung: `unit: m` heißt bei freshness Minuten, bei retention Monate. Mehr in der [Doku zu Service Levels](https://docs.datacontract.com/service-levels).
579+
Andere Eigenschaften wie `frequency` oder `latency` sind [reine Dokumentation](https://cli.datacontract.com/service-levels#when-no-check-is-generated). Achtung: `unit: m` heißt bei freshness Minuten, bei retention Monate. Mehr in der [Doku zu Service Levels](https://cli.datacontract.com/service-levels).
580580
</Callout>
581581

582582
Führe nur die Service-Level-Checks aus:

‎tutorial/src/content/en/ci-cd.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,4 @@ def orders_contract():
398398
orders_contract()
399399
```
400400

401-
Install it with `pip install "airflow-provider-datacontract[postgres]"`. See the [scheduling docs for Airflow](https://docs.datacontract.com/scheduling/airflow) of the Data Contract CLI for connections, publishing results, and the results view. No Airflow? A `schedule:` trigger in GitHub Actions does the same, see the [scheduling docs for GitHub Actions](https://docs.datacontract.com/scheduling/github-actions).
401+
Install it with `pip install "airflow-provider-datacontract[postgres]"`. See the [scheduling docs for Airflow](https://cli.datacontract.com/scheduling/airflow) of the Data Contract CLI for connections, publishing results, and the results view. No Airflow? A `schedule:` trigger in GitHub Actions does the same, see the [scheduling docs for GitHub Actions](https://cli.datacontract.com/scheduling/github-actions).

‎tutorial/src/content/en/contract-first.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ quality:
101101
```
102102
103103
<Callout type="tip">
104-
Uniqueness over two columns: `GROUP BY ... HAVING COUNT(*) > 1` in a subquery. Put checks spanning several columns on the [schema level](https://docs.datacontract.com/quality-rules/sql#schema-level-example) (`schema[].quality`), not on a single property. Uniqueness and "not empty" also work without SQL, as [library metrics](https://docs.datacontract.com/quality-rules/library#supported-metrics) `duplicateValues` and `rowCount`.
104+
Uniqueness over two columns: `GROUP BY ... HAVING COUNT(*) > 1` in a subquery. Put checks spanning several columns on the [schema level](https://cli.datacontract.com/quality-rules/sql#schema-level-example) (`schema[].quality`), not on a single property. Uniqueness and "not empty" also work without SQL, as [library metrics](https://cli.datacontract.com/quality-rules/library#supported-metrics) `duplicateValues` and `rowCount`.
105105
</Callout>
106106

107107
</Step>

‎tutorial/src/content/en/contract.mdx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Testing orders_v1.odcs.yaml
356356
```
357357

358358
<Callout type="tip">
359-
"Count the bad rows, expect zero" works for almost any rule. When the check fails, the query helps you debug. More in the [SQL quality rules docs](https://docs.datacontract.com/quality-rules/sql#property-level-example).
359+
"Count the bad rows, expect zero" works for almost any rule. When the check fails, the query helps you debug. More in the [SQL quality rules docs](https://cli.datacontract.com/quality-rules/sql#property-level-example).
360360
</Callout>
361361

362362
</Step>
@@ -382,7 +382,7 @@ quality:
382382
mustBe: 0
383383
```
384384

385-
All options: the [quality rule types](https://docs.datacontract.com/quality-rules#quality-rule-types), [schema-level SQL rules](https://docs.datacontract.com/quality-rules/sql#schema-level-example) for checks across columns and tables, [library metrics](https://docs.datacontract.com/quality-rules/library#supported-metrics) such as `rowCount`, and the [comparators](https://docs.datacontract.com/quality-rules/sql#comparators).
385+
All options: the [quality rule types](https://cli.datacontract.com/quality-rules#quality-rule-types), [schema-level SQL rules](https://cli.datacontract.com/quality-rules/sql#schema-level-example) for checks across columns and tables, [library metrics](https://cli.datacontract.com/quality-rules/library#supported-metrics) such as `rowCount`, and the [comparators](https://cli.datacontract.com/quality-rules/sql#comparators).
386386

387387
</Step>
388388

@@ -571,12 +571,12 @@ slaProperties:
571571
```
572572

573573
<Callout type="concept" title="Which service levels are tested?">
574-
The CLI turns two SLA properties into checks, if they name a timestamp column in [`element`](https://docs.datacontract.com/service-levels#the-element-reference) (`schema.property`):
574+
The CLI turns two SLA properties into checks, if they name a timestamp column in [`element`](https://cli.datacontract.com/service-levels#the-element-reference) (`schema.property`):
575575

576-
- [`retention`](https://docs.datacontract.com/service-levels#retention): the **oldest** value (MIN) must be younger than the period, so old data really gets deleted.
577-
- [`freshness`](https://docs.datacontract.com/service-levels#freshness): the **newest** value (MAX) must be younger than the threshold, so new data keeps arriving.
576+
- [`retention`](https://cli.datacontract.com/service-levels#retention): the **oldest** value (MIN) must be younger than the period, so old data really gets deleted.
577+
- [`freshness`](https://cli.datacontract.com/service-levels#freshness): the **newest** value (MAX) must be younger than the threshold, so new data keeps arriving.
578578

579-
Other properties such as `frequency` or `latency` are [documentation only](https://docs.datacontract.com/service-levels#when-no-check-is-generated). Careful: `unit: m` means minutes for freshness but months for retention. See the [service levels docs](https://docs.datacontract.com/service-levels).
579+
Other properties such as `frequency` or `latency` are [documentation only](https://cli.datacontract.com/service-levels#when-no-check-is-generated). Careful: `unit: m` means minutes for freshness but months for retention. See the [service levels docs](https://cli.datacontract.com/service-levels).
580580
</Callout>
581581

582582
Run only the service level checks:

0 commit comments

Comments
 (0)