Data Source
A place data comes from: what it is and on what terms, not what was taken from it or when (that is the dataset's). Engines never read, fetch or refresh it; they keep it through editing, export and re-import. It never holds credentials: no password, token or key in 'src' or anywhere else (opf/datasource-credentials warns about a user and password in 'src' and a key or token in its query string); a host keeps secrets in its own store and names the connection in 'connector' or 'extensions'.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| title | string | — | Human name of the data source, shown by editors. |
| description | string | — | Free-form note about the data source. |
| connector | string | — | The kind of data source, in the host's or the author's words: a name a tool recognizes, such as 'csv', 'xlsx', 'postgres', 'bigquery' or 'rest'. Engines do not interpret it. It also says what language a dataset's 'query' is written in. |
| src | string | — | Where the data is: an 'asset:<id>' reference, a URL, or a relative or local path. A URL carries no credentials. |
| license | string | — | The terms the data is under: an SPDX license identifier or a short statement. It travels with the data. |
| refreshEvery | string | — | How often the data is meant to be taken again, as an ISO 8601 duration. No engine acts on it. A validator given a date warns when a dataset's 'retrieved' is older than this (opf/dataset-stale). |
| extensions | object | — | Custom data passthrough, for example the connection settings a host owns; ignored by the engine but preserved across read/write round-trips. Never credentials. |
title
typestringrequirednodefault—
Human name of the data source, shown by editors.
{
"title": "Finance warehouse"
}description
typestringrequirednodefault—
Free-form note about the data source.
{
"description": "Finance export, unaudited"
}connector
typestringrequirednodefault—
The kind of data source, in the host's or the author's words: a name a tool recognizes, such as 'csv', 'xlsx', 'postgres', 'bigquery' or 'rest'. Engines do not interpret it. It also says what language a dataset's 'query' is written in.
{
"connector": "xlsx"
}src
typestringrequirednodefault—
Where the data is: an 'asset:<id>' reference, a URL, or a relative or local path. A URL carries no credentials.
{
"src": "./data/revenue.csv"
}license
typestringrequirednodefault—
The terms the data is under: an SPDX license identifier or a short statement. It travels with the data.
{
"license": "CC-BY-4.0"
}refreshEvery
typestringrequirednodefault—pattern^P(?=\d|T\d)(?:\d+Y)?(?:\d+M)?(?:\d+W)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+(?:\.\d+)?S)?)?$
How often the data is meant to be taken again, as an ISO 8601 duration. No engine acts on it. A validator given a date warns when a dataset's 'retrieved' is older than this (opf/dataset-stale).
{
"refreshEvery": "P1D"
}extensions
typeobjectrequirednodefault—
Custom data passthrough, for example the connection settings a host owns; ignored by the engine but preserved across read/write round-trips. Never credentials.
Complete definition constraints
{
"type": "object",
"additionalProperties": false,
"description": "A place data comes from: what it is and on what terms, not what was taken from it or when (that is the dataset's). Engines never read, fetch or refresh it; they keep it through editing, export and re-import. It never holds credentials: no password, token or key in 'src' or anywhere else (opf/datasource-credentials warns about a user and password in 'src' and a key or token in its query string); a host keeps secrets in its own store and names the connection in 'connector' or 'extensions'.",
"properties": {
"title": {
"type": "string",
"description": "Human name of the data source, shown by editors.",
"examples": [
"Finance warehouse"
]
},
"description": {
"type": "string",
"description": "Free-form note about the data source.",
"examples": [
"Finance export, unaudited"
]
},
"connector": {
"type": "string",
"description": "The kind of data source, in the host's or the author's words: a name a tool recognizes, such as 'csv', 'xlsx', 'postgres', 'bigquery' or 'rest'. Engines do not interpret it. It also says what language a dataset's 'query' is written in.",
"examples": [
"xlsx",
"postgres",
"rest"
]
},
"src": {
"type": "string",
"description": "Where the data is: an 'asset:<id>' reference, a URL, or a relative or local path. A URL carries no credentials.",
"examples": [
"./data/revenue.csv",
"asset:revenue",
"https://cdn.acme.com/data/revenue.csv"
]
},
"license": {
"type": "string",
"description": "The terms the data is under: an SPDX license identifier or a short statement. It travels with the data.",
"examples": [
"CC-BY-4.0",
"Internal use only"
]
},
"refreshEvery": {
"type": "string",
"pattern": "^P(?=\\d|T\\d)(?:\\d+Y)?(?:\\d+M)?(?:\\d+W)?(?:\\d+D)?(?:T(?=\\d)(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?$",
"description": "How often the data is meant to be taken again, as an ISO 8601 duration. No engine acts on it. A validator given a date warns when a dataset's 'retrieved' is older than this (opf/dataset-stale).",
"examples": [
"P1D",
"P1W",
"P3M",
"PT6H"
]
},
"extensions": {
"type": "object",
"description": "Custom data passthrough, for example the connection settings a host owns; ignored by the engine but preserved across read/write round-trips. Never credentials."
}
},
"examples": [
{
"title": "Finance warehouse",
"connector": "postgres",
"src": "postgres://warehouse.acme.com/finance",
"license": "Internal use only",
"refreshEvery": "P1D"
}
]
}