Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions content/docs/standard/table-dialect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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).
Expand Down
4 changes: 4 additions & 0 deletions profiles/dictionary/dialect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -175,3 +177,5 @@ sheetName:
type: string
table:
type: string
namespace:
type: string
3 changes: 3 additions & 0 deletions public/profiles/2.1/datapackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,9 @@
},
"table": {
"type": "string"
},
"namespace": {
"type": "string"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions public/profiles/2.1/dataresource.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,9 @@
},
"table": {
"type": "string"
},
"namespace": {
"type": "string"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions public/profiles/2.1/tabledialect.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
},
"table": {
"type": "string"
},
"namespace": {
"type": "string"
}
}
}