Skip to content

Commit eff070d

Browse files
authored
Merge pull request #42 from bitol-io/dev
v2.2.2 release
2 parents 7165b63 + 28da747 commit eff070d

File tree

92 files changed

+19526
-567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+19526
-567
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: docs-site-deploy
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Configure Git Credentials
16+
run: |
17+
git config user.name github-actions[bot]
18+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.x
22+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
23+
- uses: actions/cache@v4
24+
with:
25+
key: mkdocs-material-${{ env.cache_id }}
26+
path: .cache
27+
restore-keys: |
28+
mkdocs-material-
29+
- run: pip install mkdocs-open-in-new-tab mike
30+
- run: pip install mkdocs-material
31+
- run: mkdocs build
32+
- run: mike deploy --push --update-aliases ${{ github.ref_name }} latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

22
.DS_Store
3+
.idea

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
This document tracks the history and evolution of the **Open Data Contract Standard**.
22

3+
# v2.2.2 - 2024-01-05 - OPEN
4+
5+
* Change `dataset.description` data type from `array` to `string`
6+
* Change `dataset.column.isPrimaryKey` data type from `string` to `boolean`
7+
* Change `price.priceAmount` data type from `string` to `number`
8+
* Change `slaProperties.value` data type from `string` to `oneOf[string, number]`
9+
* Change `slaProperties.valueExt` data type from `string` to `oneOf[string, number]`
10+
* Update [examples](docs/examples) to adhere to JSON schema
11+
* Full example from README directs to [full-example.yaml](docs/examples/all/full-example.yaml)
12+
* Add in mkdocs for creating documentation website
13+
314
# v2.2.1 - 2023-12-18 - APPROVED
415

516
* Reformat quality examples to be valid YAML.

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Welcome!
77
Thanks for your interest and for taking the time to come here! ❤️
88

99
## Executive summary
10-
This standard describes a structure for a **data contract**. Its current version is 2.2.1. It is available for you as an Apache 2.0 license. Contributions are welcome!
10+
This standard describes a structure for a **data contract**. It's current version is v2.2.2. It is available for you as an Apache 2.0 license. Contributions are welcome!
1111

1212
## Discover the open standard
13-
Discover the [Open Data Contract Standard](./docs/README.md). This file contains some explanations and several examples. More [examples](./examples/README.md) have been added to v2.2.1.
13+
Discover the [Open Data Contract Standard](docs/index.md). This file contains some explanations and several examples. More [examples](docs/examples/index.md) can be found here.
1414

1515
## What is a Data Contract?
1616

@@ -29,7 +29,8 @@ A data contract defines the agreement between a data producer and consumers. A d
2929

3030
### JSON Schema
3131

32-
JSON Schema for ODCS can be found [here](schema/odcs-json-schema.json). You can import this schema into your IDE for validation of your YAML files. The links below show how you can import the schema:
32+
JSON Schema for ODCS can be found [here](schema/odcs-json-schema.json). You can import this schema into your IDE for
33+
validation of your YAML files. Links below show how you can import the schema:
3334

3435
- [IntelliJ](https://www.jetbrains.com/help/idea/json.html#ws_json_schema_add_custom)
3536
- [VS Code](https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings)
@@ -60,3 +61,28 @@ Formerly known as the data contract template, this standard is used to implement
6061

6162
### How does PayPal use Data Contracts?
6263
PayPal uses data contracts in many ways, but this [article](https://medium.com/paypal-tech/the-next-generation-of-data-platforms-is-the-data-mesh-b7df4b825522) from the [PayPal Technology blog](https://medium.com/paypal-tech) gives a good introduction.
64+
65+
### Mkdocs mike versioning
66+
To start with using [mike](https://github.com/jimporter/mike) as a tool for versioning the documentation, the following was run:
67+
68+
```bash
69+
pip install mike
70+
cd open-data-contract-standard #ensure you are inside the repo
71+
mike deploy --push --update-aliases v2.2.1 latest #set latest version to v2.2.1
72+
mike set-default --push latest #by default, users will go to latest
73+
```
74+
75+
#### Deploying a new version
76+
Given that the Github action [here](.github/workflows/docs-site-deploy.yaml) it set to trigger when a new tag version is
77+
created, all that is required is to:
78+
1. [Create a new release](https://github.com/bitol-io/open-data-contract-standard/releases)
79+
2. Put in new tag version for release (follows pattern v*)
80+
3. Once release is created with new tag version, the Github action gets kicked off and mike will deploy the latest documentation linked to latest version tag
81+
82+
#### Delete version
83+
If a version tag was pushed that was incorrect, it can be deleted via:
84+
85+
```bash
86+
mike deploy --push --update-aliases <previous tag version> latest #set latest version to previous tag version
87+
mike delete <incorrect tag> --push
88+
```

docs/contributing.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Open Data Contract Standard
2+
3+
## Executive summary
4+
First off, thanks for taking the time to contribute! ❤️
5+
6+
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
7+
8+
You do not have to be a member of AIDA User Group to contribute, although becoming a member is free. Strength is always in the number. Check [it out](https://aidausergroup.org/join/).
9+
10+
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
11+
> - Star the project.
12+
> - Tweet about it.
13+
> - Refer this project in your project's readme.
14+
> - Mention the project at local meetups and tell your friends/colleagues.
15+
16+
<!-- omit in toc -->
17+
## Table of Contents
18+
19+
- [Code of Conduct](#code-of-conduct)
20+
- [I Have a Question](#i-have-a-question)
21+
- [I Want To Contribute](#i-want-to-contribute)
22+
- [Suggesting Enhancements](#suggesting-enhancements)
23+
- [Improving The Documentation](#improving-the-documentation)
24+
- [Join The Project Team](#join-the-project-team)
25+
26+
27+
## Code of Conduct
28+
29+
This project and everyone participating in it is governed by the
30+
[Open Data Contract Standard Code of Conduct](blob/master/CODE_OF_CONDUCT.md).
31+
By participating, you are expected to uphold this code. Please report unacceptable behavior
32+
to [@jgperrin](https://github.com/jgperrin).
33+
34+
35+
## I Have a Question
36+
37+
** New **
38+
39+
AIDA User Group also opened its Slack for Data Contract discussion. It is an alternate way of contributing to this project. The Slack channel is now [available](https://aidaug.slack.com/archives/C05UZRSBKLY).
40+
41+
You have to be a member of AIDA User Group (it's free) to have access to our Slack channel. All the details are [here](https://aidausergroup.org/welcome/).
42+
43+
> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/AIDAUserGroup/open-data-contract-standard).
44+
45+
Before you ask a question, it is best to search for existing [Issues](https://github.com/AIDAUserGroup/open-data-contract-standard/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
46+
47+
If you then still feel the need to ask a question and need clarification, we recommend the following:
48+
49+
- Open an [Issue](https://github.com/AIDAUserGroup/open-data-contract-standard/issues).
50+
- Provide as much context as you can about what you're running into.
51+
52+
We will then take care of the issue as soon as possible.
53+
54+
## I Want To Contribute
55+
56+
> ### Legal Notice <!-- omit in toc -->
57+
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
58+
59+
### Suggesting Enhancements
60+
61+
This section guides you through submitting an enhancement suggestion for Data Contract Template, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
62+
63+
<!-- omit in toc -->
64+
#### Before Submitting an Enhancement
65+
66+
- Make sure that you are using the latest version.
67+
- Read the [documentation](https://github.com/AIDAUserGroup/open-data-contract-standard) carefully and find out if the functionality is already covered.
68+
- Perform a [search](https://github.com/AIDAUserGroup/open-data-contract-standard/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
69+
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset.
70+
71+
<!-- omit in toc -->
72+
#### How Do I Submit a Good Enhancement Suggestion?
73+
74+
Enhancement suggestions are tracked as [GitHub issues](https://github.com/AIDAUserGroup/open-data-contract-standard/issues).
75+
76+
- Use a **clear and descriptive title** for the issue to identify the suggestion.
77+
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
78+
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
79+
- **Explain why this enhancement would be useful** to most Open Data Contract Standard users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
80+
81+
### Improving The Documentation
82+
Please contact [@jgperrin](https://github.com/jgperrin). Examples are always welcome.
83+
84+
## Join The Project Team
85+
Please contact [@jgperrin](https://github.com/jgperrin).
Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ uuid: 53581432-6c55-4ba2-a65f-72344a91553a
99
# Lots of information
1010
description:
1111
purpose: Views built on top of the seller tables.
12-
limitations: null
13-
usage: null
12+
limitations: Data based on seller perspective, no buyer information
13+
usage: Predict sales over time
1414
tenant: ClimateQuantumInc
1515

1616
# Getting support
1717
productDl: product-dl@ClimateQuantum.org
1818
productSlackChannel: '#product-help'
19-
productFeedbackUrl: null
19+
productFeedbackUrl: https://product-feedback.com/sellers
2020

2121
# Physical parts / GCP / BigQuery specific
2222
sourcePlatform: googleCloudPlatform
@@ -25,14 +25,14 @@ datasetProject: edw # BQ dataset
2525
datasetName: access_views # BQ dataset
2626

2727
kind: DataContract
28-
apiVersion: 2.3.0 # Standard version (follows semantic versioning, previously known as templateVersion)
28+
apiVersion: v2.2.2 # Standard version (follows semantic versioning, previously known as templateVersion)
2929

3030
type: tables
3131

3232
# Physical access
33-
driver: null
34-
driverVersion: null
35-
server: null
33+
driver: jdbc:postgresql
34+
driverVersion: 1.0.0
35+
server: localhost:5432
3636
database: pypl-edw.pp_access_views
3737
username: '${env.username}'
3838
password: '${env.password}'
@@ -42,7 +42,7 @@ schedulerAppName: name_coming_from_scheduler # NEW 2.1.0 Required if you want to
4242
dataset:
4343
- table: tbl
4444
physicalName: tbl_1 # NEW in v2.1.0, Optional, default value is table name + version separated by underscores, as table_1_2_0
45-
priorTableName: null # if needed
45+
priorTableName: seller_table # if needed
4646
description: Provides core payment metrics
4747
authoritativeDefinitions: # NEW in v2.2.0, inspired by the column-level authoritative links
4848
- url: https://catalog.data.gov/dataset/air-quality
@@ -59,15 +59,14 @@ dataset:
5959
logicalType: date
6060
physicalType: date
6161
isNullable: false
62-
description: null
62+
description: Reference date for transaction
6363
partitionStatus: true
6464
partitionKeyPosition: 1
6565
clusterStatus: false
6666
clusterKeyPosition: -1
6767
criticalDataElementStatus: false
68-
tags: null
69-
classification: null
70-
encryptedColumnName: null
68+
tags: []
69+
classification: public
7170
transformSourceTables:
7271
- table_name_1
7372
- table_name_2
@@ -90,24 +89,23 @@ dataset:
9089
clusterStatus: true
9190
clusterKeyPosition: 1
9291
criticalDataElementStatus: false
93-
tags: null
94-
classification: null
95-
encryptedColumnName: null
92+
tags: []
93+
classification: restricted
9694
- column: rcvr_cntry_code
9795
isPrimary: false # NEW in v2.1.0, Optional, default value is false, indicates whether the column is primary key in the table.
9896
primaryKeyPosition: -1
9997
businessName: receiver country code
10098
logicalType: string
10199
physicalType: varchar(2)
102100
isNullable: false
103-
description: null
101+
description: Country code
104102
partitionStatus: false
105103
partitionKeyPosition: -1
106104
clusterStatus: false
107105
clusterKeyPosition: -1
108106
criticalDataElementStatus: false
109-
tags: null
110-
classification: null
107+
tags: []
108+
classification: public
111109
authoritativeDefinitions:
112110
- url: https://collibra.com/asset/742b358f-71a5-4ab1-bda4-dcdba9418c25
113111
type: businessDefinition
@@ -162,14 +160,10 @@ stakeholders:
162160
- username: mhopper
163161
role: Data Scientist
164162
dateIn: 2022-10-01
165-
dateOut: null
166-
replacedByUsername: null
167163
- username: daustin
168164
role: Owner
169165
comment: Keeper of the grail
170166
dateIn: 2022-10-01
171-
dateOut: null
172-
replacedByUsername: null
173167

174168
# Roles
175169
roles:

examples/all/postgresql-adventureworks-contract.yaml renamed to docs/examples/all/postgresql-adventureworks-contract.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ driver: "org.postgresql.Driver"
1111
description: {}
1212
database: "adventureworks"
1313
dataset:
14+
tables:
1415
- table: "department"
1516
physicalName: "department"
1617
description: "Lookup table containing the departments within the Adventure Works\
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 1.0.0
2+
kind: DataContract
3+
uuid: 53581432-6c55-4ba2-a65f-72344a91553a
4+
type: tables
5+
status: current
6+
datasetName: my_table
7+
quantumName: my_quantum
8+
dataset:
9+
- table: tbl
10+
description: Provides core payment metrics
11+
dataGranularity: Aggregation on columns txn_ref_dt, pmt_txn_id
12+
columns:
13+
- column: txn_ref_dt
14+
businessName: Transaction reference date
15+
logicalType: date
16+
physicalType: date
17+
description: Reference date for the transaction. Use this date in reports and aggregation rather than txn_mystical_dt, as it is slightly too mystical.
18+
sampleValues:
19+
- 2022-10-03
20+
- 2025-01-28

docs/examples/index.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Examples of Data Contracts
2+
3+
## Executive summary
4+
This folder contains mainly excerpt of data contracts to illustrate specific sections & behaviors.
5+
6+
## Table of content
7+
* [Full example](#full-example)
8+
* [Fundamentals & demographics](#fundamentals)
9+
* [Datasets & schema](#dataset-and-schema)
10+
* [Data quality](#data-quality)
11+
* [Pricing](#pricing)
12+
* [Stakeholders](#stakeholders)
13+
* [Roles](#roles)
14+
* [Service-level agreement](#service-level-agreement)
15+
* [Other properties](#other-properties)
16+
17+
## Full example
18+
19+
- [Full example](all/full-example.yaml)
20+
- [Postgres AdventureWorks](all/postgresql-adventureworks-contract.yaml)
21+
22+
## Fundamentals
23+
24+
- [Table and column](fundamentals/table-column-description.yaml)
25+
26+
## Dataset and schema
27+
28+
- [Table with single column](schema/table-column.yaml)
29+
- [Table with columns and partitioning](schema/table-columns-with-partition.yaml)
30+
31+
## Data quality
32+
33+
- [Column accuracy](quality/column-accuracy.yaml)
34+
- [Column completeness](quality/column-completeness.yaml)
35+
- [Column validity](quality/column-validity.yaml)
36+
37+
## Pricing
38+
This section covers pricing when you bill your customer for using this data product. Pricing is experimental in v2.2.0 of the data contract.
39+
40+
## Stakeholders
41+
42+
- [Stakeholders example](stakeholders/basic-four-dpo.yaml)
43+
44+
## Roles
45+
46+
- [Service and operational roles](roles/service-and-operational-roles.yaml)
47+
48+
## Service-level agreement
49+
50+
- [Database SLA](sla/database-table-sla.yaml)
51+
52+
## Other properties
53+
Coming soon.

0 commit comments

Comments
 (0)