You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ac8de43
Browse filesBrowse the repository at this point in the historyBrowse files
19. Test the contract again and spot the new check added by this.
250
250
@@ -271,9 +271,9 @@ Let's add some more detail to the contract...
271
271
272
272
Documentation:
273
273
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
- [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
@@ -357,13 +357,13 @@ AI agents, LLM chat tools, and BI assistants increasingly query data on their ow
357
357
description: Data updated daily
358
358
```
359
359
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:
361
361
362
362
```bash
363
363
datacontract test --checks slaProperties orders_v1.odcs.yaml
364
364
```
365
365
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)
Copy file name to clipboardExpand all lines: exercises/part-b/exercise4-design-your-data-product.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ You consume the `orders_v2` contract — it guarantees you the `quantity` column
46
46
-`total_quantity` is never less than `order_count`
47
47
- The view is not empty
48
48
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).
50
50
51
51
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**:
Copy file name to clipboardExpand all lines: exercises/part-c/exercise7-ci-cd-with-github-actions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,4 +198,4 @@ A breaking change in a contract breaks consumers. The pipeline catches it *befor
198
198
199
199
Running Entropy Data locally (Community Edition)? GitHub can't reach your laptop, so this only works with the cloud.
200
200
- 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).
Copy file name to clipboardExpand all lines: tutorial/src/content/de/ci-cd.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -398,4 +398,4 @@ def orders_contract():
398
398
orders_contract()
399
399
```
400
400
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).
Copy file name to clipboardExpand all lines: tutorial/src/content/de/contract-first.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ quality:
101
101
```
102
102
103
103
<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`.
Copy file name to clipboardExpand all lines: tutorial/src/content/de/contract.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,7 +356,7 @@ Testing orders_v1.odcs.yaml
356
356
```
357
357
358
358
<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).
360
360
</Callout>
361
361
362
362
</Step>
@@ -382,7 +382,7 @@ quality:
382
382
mustBe: 0
383
383
```
384
384
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).
386
386
387
387
</Step>
388
388
@@ -571,12 +571,12 @@ slaProperties:
571
571
```
572
572
573
573
<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`):
575
575
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.
578
578
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).
Copy file name to clipboardExpand all lines: tutorial/src/content/en/ci-cd.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -398,4 +398,4 @@ def orders_contract():
398
398
orders_contract()
399
399
```
400
400
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).
Copy file name to clipboardExpand all lines: tutorial/src/content/en/contract-first.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ quality:
101
101
```
102
102
103
103
<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`.
Copy file name to clipboardExpand all lines: tutorial/src/content/en/contract.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,7 +356,7 @@ Testing orders_v1.odcs.yaml
356
356
```
357
357
358
358
<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).
360
360
</Callout>
361
361
362
362
</Step>
@@ -382,7 +382,7 @@ quality:
382
382
mustBe: 0
383
383
```
384
384
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).
386
386
387
387
</Step>
388
388
@@ -571,12 +571,12 @@ slaProperties:
571
571
```
572
572
573
573
<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`):
575
575
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.
578
578
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).
0 commit comments