Skip to content

Commit 2ba9223

Browse files
committed
On-site: CI/CD becomes Part C (exercise 7), data platform Part D (exercises 8, 9)
Same order and numbering as the online tutorial; solution folders renumbered accordingly.
1 parent 2808e9a commit 2ba9223

25 files changed

Lines changed: 39 additions & 39 deletions

‎.env‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
DATACONTRACT_POSTGRES_USERNAME=workshop
99
DATACONTRACT_POSTGRES_PASSWORD=workshop
1010

11-
# Entropy Data (Part C) - create an API key in your organization settings
11+
# Entropy Data (Part D) - create an API key in your organization settings
1212
ENTROPY_DATA_API_KEY=ed_...
1313
ENTROPY_DATA_HOST=https://api.entropy-data.com
1414

‎.env.example‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
DATACONTRACT_POSTGRES_USERNAME=workshop
99
DATACONTRACT_POSTGRES_PASSWORD=workshop
1010

11-
# Entropy Data (Part C) - create an API key in your organization settings
11+
# Entropy Data (Part D) - create an API key in your organization settings
1212
ENTROPY_DATA_API_KEY=ed_...
1313
ENTROPY_DATA_HOST=https://api.entropy-data.com
1414

‎CLAUDE.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Everything below is for maintainers changing the workshop or the online tutorial
1212
- **Walkthrough videos**: `video/` records one video per tutorial chapter (see `video/README.md`).
1313
- The old Data Mesh Live 2026 version lives in a separate repo, `simonharrer/odcs-odps-workshop` (no SPA). Do not mention Data Mesh Live here.
1414

15-
Exercise numbering differs: online, CI/CD is exercise 7, publish 8, semantics 9. On-site, publish is 7, semantics 8, and CI/CD is exercise 9 (Part D). Solution folders follow the on-site numbers.
15+
Online and on-site use the same numbering: Part C is CI/CD (exercise 7), Part D is the data platform (exercise 8 publish, exercise 9 semantics). Solution folders follow these numbers.
1616

1717
## Versions (keep in sync everywhere)
1818

19-
- datacontract-cli `1.2.2`, dataproduct-cli `0.2.0`, entropy-data `0.3.13`: pinned in `scripts/install.sh`, `install.ps1`, `install.bat`, and in `solutions/exercise9/datacontract.yml`.
19+
- datacontract-cli `1.2.2`, dataproduct-cli `0.2.0`, entropy-data `0.3.13`: pinned in `scripts/install.sh`, `install.ps1`, `install.bat`, and in `solutions/exercise7/datacontract.yml`.
2020
- ODCS `v3.2.0` and ODPS `v1.1.0` in all solutions, examples, and `schemas/` (mapped in `.vscode/settings.json`).
2121
- GitHub Actions: `actions/checkout@v7`, `astral-sh/setup-uv@v10.2.0` (setup-uv has no floating major tags).
2222
- When bumping a CLI, re-capture the terminal outputs in the tutorial and re-record the affected videos.
@@ -53,7 +53,7 @@ Exercise numbering differs: online, CI/CD is exercise 7, publish 8, semantics 9.
5353
- Only `freshness` and `retention` SLA properties with an `element` become checks; `frequency` and `latency` are documentation.
5454
- Verified statement answers used in the content: 876 orders in 2023; top SKUs by units in 2024: D3KT74L5EV46T (146), IWMJ3ZX164 (62), TFH11HYOR (46).
5555
- `datacontract breaking` exits 1 on ERROR (removed field, type change, added `required`); adding a column is INFO. `datacontract ci` writes GitHub annotations and the step summary.
56-
- Semantics: one ontology file (`solutions/exercise8/semantics.yaml`, prefix `ecom: https://learn.datacontract.com/ontology/ecommerce#`) uploaded with `PUT /api/semantics/experimental/namespaces/{ns}/ontology.yaml`; the entropy-data CLI has no command for it.
56+
- Semantics: one ontology file (`solutions/exercise9/semantics.yaml`, prefix `ecom: https://learn.datacontract.com/ontology/ecommerce#`) uploaded with `PUT /api/semantics/experimental/namespaces/{ns}/ontology.yaml`; the entropy-data CLI has no command for it.
5757
- The hosted Data Contract Editor (editor.datacontract.com) runs tests via `api.datacontract.com`, which has credentials for the public Supabase copy (host `aws-1-eu-central-2.pooler.supabase.com`, port `6543`, database `postgres`, schemas `orders_v1`, `orders_v2`).
5858
- Participants remove the last `.gitignore` block (`# files created during the exercises`) in their fork before committing for the CI/CD exercise.
5959

‎README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ To reset the database, run `docker compose down && docker compose up -d`.
5656
6. [Exercise 6: Consumer-Driven Data Contracts](exercises/part-b/exercise6-consumer-driven-data-contracts.md) (ODCS)
5757

5858

59-
## Part C: Publish to the Data Platform
59+
## Part C: Automate with CI/CD
6060

61-
7. [Exercise 7: Publish to Entropy Data](exercises/part-c/exercise7-publish-to-entropy-data.md) (Entropy Data CLI)
62-
8. [Exercise 8: Semantics](exercises/part-c/exercise8-semantics.md) (Entropy Data CLI)
61+
Builds on Parts A and B. Needs a GitHub account.
6362

64-
No account on [app.entropy-data.com](https://app.entropy-data.com)? Run the [Entropy Data Community Edition](https://github.com/entropy-data/entropy-data-ce) locally with `docker compose -f entropy-data-ce/docker-compose.yaml up -d` (web UI on [http://localhost:8081](http://localhost:8081), set `ENTROPY_DATA_HOST=http://localhost:8081` in your `.env`).
63+
7. [Exercise 7: CI/CD with GitHub Actions](exercises/part-c/exercise7-ci-cd-with-github-actions.md) (Data Contract CLI, Data Product CLI, GitHub Actions)
6564

6665

67-
## Part D: Automate with CI/CD
66+
## Part D: Publish to the Data Platform
6867

69-
Builds on Parts A and B only (Part C is not required). Needs a GitHub account.
68+
8. [Exercise 8: Publish to Entropy Data](exercises/part-d/exercise8-publish-to-entropy-data.md) (Entropy Data CLI)
69+
9. [Exercise 9: Semantics](exercises/part-d/exercise9-semantics.md) (Entropy Data CLI)
7070

71-
9. [Exercise 9: CI/CD with GitHub Actions](exercises/part-d/exercise9-ci-cd-with-github-actions.md) (Data Contract CLI, Data Product CLI, GitHub Actions)
71+
No account on [app.entropy-data.com](https://app.entropy-data.com)? Run the [Entropy Data Community Edition](https://github.com/entropy-data/entropy-data-ce) locally with `docker compose -f entropy-data-ce/docker-compose.yaml up -d` (web UI on [http://localhost:8081](http://localhost:8081), set `ENTROPY_DATA_HOST=http://localhost:8081` in your `.env`).
7272

7373

7474
## Links

‎entropy-data-ce/docker-compose.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Entropy Data (Community Edition) - run the data platform for Part C locally.
1+
# Entropy Data (Community Edition) - run the data platform for Part D locally.
22
# Copy of https://github.com/entropy-data/entropy-data-ce/blob/main/docker-compose.yaml
33
# (plus APPLICATION_SEMANTICS_ENABLED for the semantics in exercise 8)
44
#

exercises/part-d/exercise9-ci-cd-with-github-actions.md renamed to exercises/part-c/exercise7-ci-cd-with-github-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Exercise 9: CI/CD with GitHub Actions
1+
# Exercise 7: CI/CD with GitHub Actions
22

33
Your contracts are only tested when someone runs `datacontract test`.
44
Now you automate it: every push lints and tests all contracts, and every pull request is checked for **breaking changes** before it is merged.
@@ -34,7 +34,7 @@ Builds on Parts A and B only. You need a [GitHub](https://github.com) account.
3434
```
3535

3636
> [!WARNING]
37-
> Your fork is public. Never commit an API key: if you added `ENTROPY_DATA_API_KEY` to `.env` in Part C, remove it before committing (`git diff .env`).
37+
> Your fork is public. Never commit an API key: if you ever add `ENTROPY_DATA_API_KEY` to `.env` (Part D), remove it before committing (`git diff .env`).
3838
3939
5. GitHub disables workflows in forks by default: open the **Actions** tab of your fork and click **I understand my workflows, go ahead and enable them**.
4040

@@ -187,7 +187,7 @@ A breaking change in a contract breaks consumers. The pipeline catches it *befor
187187

188188
- Make the checks mandatory: in your fork's **Settings → Rules → Rulesets**, require the status checks **Lint and test** and **Breaking changes** for `main`. Now a breaking change can't be merged anymore.
189189
- Remember the consumer-driven contract from [Exercise 6](../part-b/exercise6-consumer-driven-data-contracts.md)? It is tested in the same pipeline. In a real setup, the orders team runs the contracts of *all their consumers* in their pipeline. So they see exactly whom a change would break.
190-
- Publish the test results to Entropy Data (Part C): add your API key as repository secret `ENTROPY_DATA_API_KEY` (**Settings → Secrets and variables → Actions**) and change the test step to:
190+
- Publish the test results to Entropy Data (Part D): add your API key as repository secret `ENTROPY_DATA_API_KEY` (**Settings → Secrets and variables → Actions**) and change the test step to:
191191

192192
```yaml
193193
- name: Test data contracts
@@ -197,5 +197,5 @@ A breaking change in a contract breaks consumers. The pipeline catches it *befor
197197
```
198198

199199
Running Entropy Data locally (Community Edition)? GitHub can't reach your laptop, so this only works with the cloud.
200-
- Linked your contracts to semantic concepts (Exercise 8)? 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.
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.
201201
- **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).

exercises/part-c/exercise7-publish-to-entropy-data.md renamed to exercises/part-d/exercise8-publish-to-entropy-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Exercise 7: Publish to Entropy Data
1+
# Exercise 8: Publish to Entropy Data
22

33
YAML files in a Git repository work well for a single team — but how do *other* teams discover your data products, browse the contracts, and request access? For that you need a data product platform. In this exercise, you publish everything you built in Part A and Part B to [Entropy Data](https://entropy-data.com) using the [Entropy Data CLI](https://github.com/entropy-data/entropy-data-cli).
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Exercise 8: Semantics
1+
# Exercise 9: Semantics
22

33
Right now, the meaning of `order_id`, `order_total`, and `sku` is duplicated across your contracts: every contract carries its own copy of the descriptions. And the descriptions only say what a field *contains*, not what business concept it *is*. In this exercise, you define each concept *once* in an ontology file with stable **IRIs**, upload it to **Semantics** on the platform in one go, and link to it from the contracts you published in Exercise 7.
44

5-
> **Prerequisite:** This exercise builds on Exercise 7: your contracts are published and the Entropy Data CLI connection works. If you run the Community Edition from this repository, Semantics is already enabled.
5+
> **Prerequisite:** This exercise builds on Exercise 8: your contracts are published and the Entropy Data CLI connection works. If you run the Community Edition from this repository, Semantics is already enabled.
66
77
An IRI is a globally unique, stable name for a concept, e.g. `https://learn.datacontract.com/ontology/ecommerce#sku`. It does not depend on the platform's host or your organization name, so the same contract links correctly on any instance. It does not need to be a reachable web page: the platform resolves it to the concept that carries it.
88

‎solutions/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Reference solutions for verification purposes only, one folder per exercise. Try
44

55
Each folder shows the **end state of its exercise**. Two lifecycle transitions are not snapshotted: after exercise 2, `orders_v1` is set to `retired` (the `exercise1/` solution keeps the end state of exercise 1, `active`), and at the end of exercise 5, the `sku_sales_per_year` contract and data product are set to `active` (the `exercise4/` solutions keep the `draft` state from the design phase).
66

7-
Run `./solutions/test_all.sh` from the repository root to recheck all solutions sequentially, exercise by exercise. Set `ENTROPY_DATA_API_KEY` and `ENTROPY_DATA_HOST` in `.env` to also run the publish steps of exercises 7 and 8.
7+
Run `./solutions/test_all.sh` from the repository root to recheck all solutions sequentially, exercise by exercise. Set `ENTROPY_DATA_API_KEY` and `ENTROPY_DATA_HOST` in `.env` to also run the publish steps of exercises 8 and 9.
88

9-
The `exercise9/` folder contains the GitHub Actions workflow `datacontract.yml`. In your fork, it goes to `.github/workflows/datacontract.yml`. It runs on GitHub only and is not covered by `test_all.sh`.
9+
The `exercise7/` folder contains the GitHub Actions workflow `datacontract.yml`. In your fork, it goes to `.github/workflows/datacontract.yml`. It runs on GitHub only and is not covered by `test_all.sh`.

0 commit comments

Comments
 (0)