From 559b6acf643dd4f7a984501028c7c69e01e642b2 Mon Sep 17 00:00:00 2001 From: roll Date: Mon, 7 Jul 2025 14:50:09 +0100 Subject: [PATCH 1/2] Added dialect namespace definition --- content/docs/standard/table-dialect.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content/docs/standard/table-dialect.mdx b/content/docs/standard/table-dialect.mdx index 1f6f2984..9b9bec5f 100644 --- a/content/docs/standard/table-dialect.mdx +++ b/content/docs/standard/table-dialect.mdx @@ -141,6 +141,7 @@ Database formats is a group of formats accessing data from databases like SQLite - [$schema](#dollar-schema): `https://datapackage.org/profiles/1.0/tabledialect.json` by default - [table](#table): undefined by default +- [namespace](#namespace): undefined by default ## Properties @@ -628,6 +629,28 @@ With this dialect definition: `SHOULD` output the data from the second table. +### `namespace` + +A Table Dialect descriptor `MAY` have the `namespace` property that `MUST` be a string; undefined by default. This property specifies a database schema (namespace). + +For example, the database with the tables below: + +```txt +raw.table +cleaned.table +``` + +With this dialect definition: + +```json +{ + "table": "table", + "namespace": "cleaned" +} +``` + +`SHOULD` output the data from the second table. + ## Excluded Table Dialect has nothing to do with the names, contents or types of the headers or data within the CSV file (see [Table Schema](/standard/table-schema/) instead), only how it is formatted. However, Table Dialect does allow the presence or absence of a header to be specified, similarly to [RFC4180](http://www.ietf.org/rfc/rfc4180.txt). From 90d40a1d54139e4915bd6d4bdb0554e7141caca8 Mon Sep 17 00:00:00 2001 From: roll Date: Mon, 7 Jul 2025 14:51:26 +0100 Subject: [PATCH 2/2] Updated the profiles --- profiles/dictionary/dialect.yaml | 4 ++++ public/profiles/2.1/datapackage.json | 3 +++ public/profiles/2.1/dataresource.json | 3 +++ public/profiles/2.1/tabledialect.json | 3 +++ 4 files changed, 13 insertions(+) diff --git a/profiles/dictionary/dialect.yaml b/profiles/dictionary/dialect.yaml index 45fa9b9a..2ced81ae 100644 --- a/profiles/dictionary/dialect.yaml +++ b/profiles/dictionary/dialect.yaml @@ -43,6 +43,8 @@ tableDialect: "$ref": "#/definitions/sheetName" table: "$ref": "#/definitions/table" + namespace: + "$ref": "#/definitions/namespace" header: title: Header description: Specifies if the file includes a header row, always as the first row in the file. @@ -175,3 +177,5 @@ sheetName: type: string table: type: string +namespace: + type: string diff --git a/public/profiles/2.1/datapackage.json b/public/profiles/2.1/datapackage.json index dac04f0b..bd26a72b 100644 --- a/public/profiles/2.1/datapackage.json +++ b/public/profiles/2.1/datapackage.json @@ -665,6 +665,9 @@ }, "table": { "type": "string" + }, + "namespace": { + "type": "string" } } }, diff --git a/public/profiles/2.1/dataresource.json b/public/profiles/2.1/dataresource.json index 89cb50fc..4b7e1fb8 100644 --- a/public/profiles/2.1/dataresource.json +++ b/public/profiles/2.1/dataresource.json @@ -429,6 +429,9 @@ }, "table": { "type": "string" + }, + "namespace": { + "type": "string" } } }, diff --git a/public/profiles/2.1/tabledialect.json b/public/profiles/2.1/tabledialect.json index 00293e71..3575d7d3 100644 --- a/public/profiles/2.1/tabledialect.json +++ b/public/profiles/2.1/tabledialect.json @@ -141,6 +141,9 @@ }, "table": { "type": "string" + }, + "namespace": { + "type": "string" } } } \ No newline at end of file