Skip to content

Commit 1ea8d1d

Browse files
authored
Merge pull request #121 from bitol-io/readme-date-logical
add Expressing Date / Datetime / Timezone information to readme
2 parents 128e407 + f7d8e31 commit 1ea8d1d

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Welcome!
1313
Thanks for your interest and for taking the time to come here! ❤️
1414

1515
## Executive summary
16-
This standard describes a structure for a **data contract**. Its current version is v3.0.0. It is available for you as an Apache 2.0 license. Contributions are welcome!
16+
This standard describes a structure for a **data contract**. Its current version is v3.0.1. It is available for you as an Apache 2.0 license. Contributions are welcome!
1717

1818
## Discover the open standard
1919
A reader-friendly version of the standard can be found on its [dedicated site](https://bitol-io.github.io/open-data-contract-standard/).

docs/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,53 @@ Additional metadata options to more accurately define the data type.
289289
| string | minLength | Minimum Length | No | Minimum length of the string. |
290290
| string | pattern | Pattern | No | Regular expression pattern to define valid value. Follows regular expression syntax from ECMA-262 (https://262.ecma-international.org/5.1/#sec-15.10.1). |
291291

292+
#### Expressing Date / Datetime / Timezone information
293+
294+
Given the complexity of handling various date and time formats (e.g., date, datetime, time, timestamp, timestamp with and without timezone), the existing `logicalType` options currently support only `date`. To specify additional temporal details, `logicalType` should be used in conjunction with `logicalTypeOptions.format` or `physicalType` to define the desired format. Using `physicalType` allows for definition of your data-source specific data type.
295+
296+
``` yaml
297+
version: 1.0.0
298+
kind: DataContract
299+
id: 53581432-6c55-4ba2-a65f-72344a91553a
300+
status: active
301+
name: date_example
302+
apiVersion: v3.0.1
303+
schema:
304+
# Date Only
305+
- name: event_date
306+
logicalType: date
307+
logicalTypeOptions:
308+
- format: "yyyy-MM-dd"
309+
examples:
310+
- "2024-07-10"
311+
312+
# Date & Time (UTC)
313+
- name: created_at
314+
logicalType: date
315+
logicalTypeOptions:
316+
- format: "yyyy-MM-ddTHH:mm:ssZ"
317+
examples:
318+
- "2024-03-10T14:22:35Z"
319+
320+
# Time Only
321+
- name: event_start_time
322+
logicalType: date
323+
logicalTypeOptions:
324+
- format: "HH:mm:ss"
325+
examples:
326+
- "08:30:00"
327+
328+
# Physical Type with Date & Time (UTC)
329+
- name: event_date
330+
logicalType: date
331+
physicalType: DATETIME
332+
logicalTypeOptions:
333+
- format: yyyy-MM-ddTHH:mm:ssZ"
334+
examples:
335+
- "2024-03-10T14:22:35Z"
336+
337+
```
338+
292339
### Authoritative definitions
293340

294341
Reference to an external definition on element logic or values.

vendors.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Vendors who natively support ODCS (Open Data Contract Standard).
77
A non-exhaustive, alphabetical list of organizations offering solutions natively compatible with ODCS, such as data
88
catalogs, data quality platforms, security tools, and more.
99

10-
* [Data Caterer](https://data.catering/setup/guide/data-source/metadata/open-data-contract-standard/) - Test data
10+
* [Data Caterer](https://data.catering/latest/docs/guide/data-source/metadata/open-data-contract-standard/) - Test data
1111
management tool using data contracts as a metadata source
1212
* [Data Contract CLI](https://cli.datacontract.com) - Open Source tooling around data contracts
1313
* [Data Contract Manager](https://datacontract-manager.com) - Professional data contract management tool with Data Marketplace, Access Management, and Data Governance AI.
@@ -19,4 +19,5 @@ catalogs, data quality platforms, security tools, and more.
1919
## Service providers
2020

2121
* [AbeaData](https://abeadata.com) - Consulting & training on data contracts.
22+
* [Andrew Jones](https://andrew-jones.com) Independant consulting & training on data contracts.
2223

0 commit comments

Comments
 (0)