datasets.yaml key reference¶
Generated by scripts/gen_schemas.py from src/sunstone/vocab/. Do not edit by hand.
Every key is one of: a Data Package 2.0 property (dp) for its level, a sunstone config key (config), a JSON-LD keyword (jsonld), or an RDF property (rdf: prefix:local or an absolute IRI). RDF properties are allowed at every level; the rows marked rdf below are the ones a rule asks for. Rule levels follow RFC 2119 (MUST, SHOULD, MAY).
Editor support: add # yaml-language-server: $schema=https://sunstoneinstitute.github.io/sunstone-py/schemas/datasets.schema.json as the first line of datasets.yaml.
Agents and identifiers¶
Agent objects (dct:publisher, each dct:creator entry) carry rdfs:label (full name), optional skos:altLabel (short name) and optional "@id" (IRI). Repeat an agent within one file with a YAML anchor: dct:publisher: &fao {rdfs:label: ..., skos:altLabel: FAO} on first use, dct:publisher: *fao after. Anchors do not cross include files.
A source with a DOI puts it in "@id": "@id": https://doi.org/10.1016/j.aqrep.2022.101316.
Document¶
Path: .
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
min_sunstone_version |
config | MUST | Minimum sunstone-py version for this project | min_sunstone_version: "1.20.0" |
dcat-si:methodology |
rdf | SHOULD | The document describing the method actually applied to produce a dataset or data package: sources, acquisition, processing and limitations. Unlike prov:hadPlan, it is documentation of what was done, not a plan of intent attached to an activity. Unlike schema:measurementTechnique, it covers the whole resource, not the measurement of one variable. | dcat-si:methodology: METHODOLOGY.md |
defaults |
config | MAY | Values applied to every dataset (rdfPrefixes and RDF properties) | defaults: ... |
include |
config | MAY | YAML files whose inputs, outputs and packages are merged in | include: [data/extra.yaml] |
inputs |
config | MAY | Input datasets (list) | inputs: ... |
lint |
config | MAY | Lint configuration (disable) | lint: ... |
outputs |
config | MAY | Output datasets (list) | outputs: ... |
package |
config | MAY | Single package metadata | package: ... |
packages |
config | MAY | Package definitions (list) | packages: ... |
plugins |
config | MAY | Per-plugin configuration, keyed by plugin name | plugins: ... |
publish |
config | MAY | Publish destination for the single package | publish: ... |
rdfPrefixes |
config | MAY | Prefix to namespace map | rdfPrefixes: {ex: https://example.org/ns#} |
Dataset¶
Path: inputs / outputs
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
licenses |
dp | MUST | Licenses (list of {name, path, title}) | licenses: [{name: CC-BY-4.0}] |
name |
dp | MUST | Identifier, lowercase kebab-case | name: un-member-states |
path |
dp | MUST | File path relative to the descriptor, or URL | path: inputs/un_members.csv |
prov:generatedAtTime |
rdf | MUST | The time at which an entity was completely created and is available for use. | prov:generatedAtTime: '2026-01-02' |
prov:wasGeneratedBy |
rdf | MUST | How the data was obtained: a prov:Activity node, e.g. {dct:type: manual-download}. | prov:wasGeneratedBy: {'@type': prov:Activity, dct:type: manual-download} |
title |
dp | MUST | Human-readable title | title: Official UN Member States |
dcat:theme |
rdf | SHOULD | A main category of the resource. A resource can have multiple themes. | dcat:theme: https://sunstone.institute/rdf/threats#01 |
dct:spatial |
rdf | SHOULD | Spatial characteristics of the resource. | dct:spatial: Norway |
dct:temporal |
rdf | SHOULD | Temporal characteristics of the resource. | dct:temporal: '2020/2024' |
description |
dp | SHOULD | Description, Markdown allowed | description: One row per member state. |
source |
config | SHOULD | Single upstream source of an input; emitted as Data Package sources[0]. Use source in datasets.yaml, not the Data Package sources array. |
source: {title: ..., dcat:downloadURL: ...} |
$schema |
dp | MAY | Profile URL of this resource | $schema: ... |
bytes |
dp | MAY | Size of the file in bytes | bytes: ... |
data |
dp | MAY | Inline data instead of path | data: ... |
dcat:keyword |
rdf | MAY | A keyword or tag describing a resource. | dcat:keyword: [aquaculture, salmon] |
dct:accrualPeriodicity |
rdf | MAY | The frequency with which items are added to a collection. | dct:accrualPeriodicity: ... |
dct:conformsTo |
rdf | MAY | An established standard to which the described resource conforms. | dct:conformsTo: ... |
dct:language |
rdf | MAY | A language of the resource. | dct:language: ... |
dct:references |
rdf | MAY | A related resource that is referenced, cited, or otherwise pointed to by the described resource. | dct:references: ... |
dct:source |
rdf | MAY | A related resource from which the described resource is derived. | dct:source: ... |
dct:subject |
rdf | MAY | A topic of the resource. | dct:subject: ... |
dialect |
dp | MAY | Table dialect (delimiter, quoteChar, header, ...) | dialect: ... |
encoding |
dp | MAY | Character encoding (utf-8) | encoding: ... |
format |
dp | MAY | File format (csv, json, parquet, ...) | format: ... |
hash |
dp | MAY | Content hash (sha256:...) | hash: ... |
homepage |
dp | MAY | Home page URL | homepage: ... |
mediatype |
dp | MAY | Media type (text/csv) | mediatype: ... |
prov:wasQuotedFrom |
rdf | MAY | An entity is derived from an original entity by copying, or 'quoting', some or all of it. | prov:wasQuotedFrom: un-member-states |
publish |
config | MAY | Per-dataset publish settings: enabled, as_name, public, dialect (to, flatten and as are deprecated) | publish: ... |
rdfPrefixes |
config | MAY | Prefix to namespace map for this dataset | rdfPrefixes: ... |
rdfs:seeAlso |
rdf | MAY | Further information about the subject resource. | rdfs:seeAlso: ... |
schema |
dp | MAY | Table schema (fields, primaryKey, ...) | schema: {fields: [...], primaryKey: id} |
sources |
dp | MAY | Raw sources (list of {title, path, email, version}) | sources: ... |
strict |
config | MAY | Strict mode: lineage cannot change | strict: ... |
type |
dp | MAY | Resource type (table) | type: ... |
Source¶
Path: inputs.source
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
@id |
jsonld | MUST (one of) | JSON-LD identifier of the node. On a source: the DOI as https://doi.org/ |
"@id": https://doi.org/10.1016/j.aqrep.2022.101316 |
dcat:downloadURL |
rdf | MUST (one of) | The URL of the downloadable file in a given format. E.g. CSV file or RDF file. The format is indicated by the distribution's dcterms:format and/or dcat:mediaType. | dcat:downloadURL: https://example.org/data.csv |
dcat:landingPage |
rdf | MUST (one of) | A Web page that can be navigated to in a Web browser to gain access to the catalog, a dataset, its distributions and/or additional information. | dcat:landingPage: https://example.org/about |
dct:license |
rdf | MUST | A legal document giving official permission to do something with the resource. | dct:license: CC-BY-4.0 |
dct:publisher |
rdf | MUST | An entity responsible for making the resource available. | dct:publisher: {rdfs:label: Food and Agriculture Organization of the United Nations, skos:altLabel: FAO} |
title |
dp | MUST | Human-readable title of the source | title: UN Member States Authority File |
dct:creator |
rdf | SHOULD | An entity responsible for making the resource. | dct:creator: [{rdfs:label: 'Aas, T. S.'}, {rdfs:label: 'Asgard, T. E.'}] |
dct:issued |
rdf | SHOULD | Date of formal issuance of the resource. | dct:issued: '2022' |
dct:modified |
rdf | SHOULD | Date on which the resource was changed. | dct:modified: '2026-01-01' |
dcat:accessURL |
rdf | MAY | A URL of a resource that gives access to a distribution of the dataset. E.g. landing page, feed, SPARQL endpoint. Use for all cases except a simple download link, in which case downloadURL is preferred. | dcat:accessURL: ... |
dct:bibliographicCitation |
rdf | MAY | A bibliographic reference for the resource. | dct:bibliographicCitation: 'Aas, T. S. & Asgard, T. E. (2022). Title. Aquaculture Reports 26.' |
dct:isPartOf |
rdf | MAY | A related resource in which the described resource is physically or logically included. | dct:isPartOf: {rdfs:label: 'Aquaculture Reports 26, 101316'} |
dct:rights |
rdf | MAY | Information about rights held in and over the resource. | dct:rights: {rdfs:label: 'Permission from Example Org', dct:license: CC-BY-4.0, dct:date: '2026-10-19'} |
email |
dp | MAY | Contact email for the source | email: ... |
path |
dp | MAY | URL of the source | path: ... |
prov:wasAttributedTo |
rdf | MAY | Attribution is the ascribing of an entity to an agent. | prov:wasAttributedTo: 'Aas, T. S.; Asgard, T. E. (Nofima); published by Elsevier' |
rdfs:seeAlso |
rdf | MAY | Further information about the subject resource. | rdfs:seeAlso: ... |
version |
dp | MAY | Version of the source | version: ... |
"@id", dcat:downloadURL and dcat:landingPage are marked MUST (one of): at least one is required (R102). |
Schema¶
Path: inputs.schema
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
$schema |
dp | MAY | Profile URL of this schema | $schema: ... |
fields |
dp | MAY | Field descriptors (list) | fields: ... |
fieldsMatch |
dp | MAY | How declared fields match data columns (exact, equal, subset, superset, partial) | fieldsMatch: ... |
foreignKeys |
dp | MAY | Foreign key constraints (list) | foreignKeys: ... |
missingValues |
dp | MAY | Strings that mean missing (list) | missingValues: ... |
primaryKey |
dp | MAY | Field name or list of field names identifying a row | primaryKey: ... |
uniqueKeys |
dp | MAY | Unique key constraints (list of lists) | uniqueKeys: ... |
Field¶
Path: inputs.schema.fields
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
name |
dp | MUST | Column name as it appears in the data | name: gdp_usd |
type |
dp | MUST | Value type (string, integer, number, boolean, date, ...) | type: number |
description |
dp | SHOULD | Human-readable description of the field | description: Gross domestic product. |
si:unit |
rdf | SHOULD | Unit of measurement for a field value | si:unit: USD |
bareNumber |
dp | MAY | Whether numbers have no currency or unit symbols | bareNumber: ... |
categories |
dp | MAY | Allowed category values for categorical fields | categories: ... |
categoriesOrdered |
dp | MAY | Whether categories are ordered | categoriesOrdered: ... |
constraints |
dp | MAY | Value constraints (required, enum, minimum, ...) | constraints: ... |
dct:conformsTo |
rdf | MAY | An established standard to which the described resource conforms. | dct:conformsTo: ... |
decimalChar |
dp | MAY | Decimal separator character | decimalChar: ... |
example |
dp | MAY | Example value | example: ... |
falseValues |
dp | MAY | Strings parsed as false | falseValues: ... |
format |
dp | MAY | Type-specific format (default, email, uri, ...) | format: ... |
groupChar |
dp | MAY | Thousands grouping character | groupChar: ... |
missingValues |
dp | MAY | Strings that mean missing for this field | missingValues: ... |
qudt:hasQuantityKind |
rdf | MAY | qudt:hasQuantityKind: http://qudt.org/vocab/quantitykind/Area |
|
rdfType |
dp | MAY | RDF class IRI of the values | rdfType: ... |
skos:exactMatch |
rdf | MAY | skos:exactMatch is disjoint with each of the properties skos:broadMatch and skos:relatedMatch. | skos:exactMatch: ... |
sosa:observedProperty |
rdf | MAY | Relation linking an Observation to the property that was observed. The ObservableProperty should be a property of the FeatureOfInterest (linked by hasFeatureOfInterest) of this Observation. | sosa:observedProperty: http://qudt.org/vocab/quantitykind/Temperature |
title |
dp | MAY | Human-readable label | title: GDP (USD) |
trueValues |
dp | MAY | Strings parsed as true | trueValues: ... |
Constraints¶
Path: inputs.schema.fields.constraints
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
enum |
dp | MAY | Allowed values | enum: ... |
exclusiveMaximum |
dp | MAY | Values must be below this | exclusiveMaximum: ... |
exclusiveMinimum |
dp | MAY | Values must be above this | exclusiveMinimum: ... |
jsonSchema |
dp | MAY | JSON Schema for object or array values | jsonSchema: ... |
maxLength |
dp | MAY | Maximum string length | maxLength: ... |
maximum |
dp | MAY | Maximum value | maximum: ... |
minLength |
dp | MAY | Minimum string length | minLength: ... |
minimum |
dp | MAY | Minimum value | minimum: ... |
pattern |
dp | MAY | Regular expression values must match | pattern: ... |
required |
dp | MAY | Whether a value is required | required: ... |
unique |
dp | MAY | Whether values must be unique | unique: ... |
License¶
Path: inputs.licenses / package.licenses
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
name |
dp | MAY | SPDX license identifier | name: ... |
path |
dp | MAY | URL of the license text | path: ... |
title |
dp | MAY | Human-readable license title | title: ... |
Dialect¶
Path: inputs.dialect
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
$schema |
dp | MAY | Profile URL of this dialect | $schema: ... |
commentChar |
dp | MAY | Character that starts a comment line | commentChar: ... |
commentRows |
dp | MAY | Row numbers to skip as comments | commentRows: ... |
delimiter |
dp | MAY | Field delimiter | delimiter: ... |
doubleQuote |
dp | MAY | Whether a quote inside a field is doubled | doubleQuote: ... |
escapeChar |
dp | MAY | Escape character | escapeChar: ... |
header |
dp | MAY | Whether the file has a header row | header: ... |
headerJoin |
dp | MAY | Separator when joining multiple header rows | headerJoin: ... |
headerRows |
dp | MAY | Row numbers that form the header | headerRows: ... |
itemKeys |
dp | MAY | Keys to read from each item (JSON) | itemKeys: ... |
itemType |
dp | MAY | Item type (array or object) | itemType: ... |
lineTerminator |
dp | MAY | Line terminator | lineTerminator: ... |
nullSequence |
dp | MAY | String that means null | nullSequence: ... |
property |
dp | MAY | Property holding the data (JSON) | property: ... |
quoteChar |
dp | MAY | Quote character | quoteChar: ... |
sheetName |
dp | MAY | Sheet name (spreadsheets) | sheetName: ... |
sheetNumber |
dp | MAY | Sheet number (spreadsheets) | sheetNumber: ... |
skipInitialSpace |
dp | MAY | Whether to skip whitespace after a delimiter | skipInitialSpace: ... |
table |
dp | MAY | Table name (databases) | table: ... |
Package¶
Path: package / packages
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
licenses |
dp | MUST | Licenses (list of {name, path, title}) | licenses: [{name: CC-BY-4.0}] |
title |
dp | MUST | Human-readable title | title: UN Member States Dataset |
$schema |
dp | MAY | Profile URL of this descriptor | $schema: ... |
contributors |
dp | MAY | People or organizations who contributed (list) | contributors: ... |
created |
dp | MAY | Creation datetime, ISO 8601 | created: ... |
datasets |
config | MAY | Dataset names in this package (packages[] only) | datasets: ... |
description |
dp | MAY | Description, Markdown allowed | description: ... |
homepage |
dp | MAY | Home page URL | homepage: ... |
id |
dp | MAY | Globally unique identifier (UUID or DOI) | id: ... |
image |
dp | MAY | Representative image URL | image: ... |
keywords |
dp | MAY | Keywords for discovery (list of strings) | keywords: ... |
name |
dp | MAY | Identifier, lowercase kebab-case | name: ... |
publish |
config | MAY | Publish destination for this package | publish: ... |
resources |
dp | MAY | Resources in this package (list) | resources: ... |
sources |
dp | MAY | Raw sources (list of {title, path, email, version}) | sources: ... |
version |
dp | MAY | Version, semver recommended | version: ... |
Contributor¶
Path: package.contributors
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
email |
dp | MAY | Contact email | email: ... |
familyName |
dp | MAY | Family name | familyName: ... |
givenName |
dp | MAY | Given name | givenName: ... |
organization |
dp | MAY | Organization the contributor belongs to | organization: ... |
path |
dp | MAY | URL of the contributor | path: ... |
roles |
dp | MAY | Roles (list, e.g. creator, publisher) | roles: ... |
title |
dp | MAY | Name of the contributor | title: ... |
Publish¶
Path: publish
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
as |
config | MAY | Public base URL for resource paths | as: ... |
as_name |
config | MAY | Published resource name (dataset publish only) | as_name: ... |
dialect |
config | MAY | CSV dialect for the published file (delimited-text Table Dialect properties) | dialect: ... |
enabled |
config | MAY | Whether publishing is enabled | enabled: ... |
flatten |
config | MAY | Put all files next to datapackage.json | flatten: ... |
public |
config | MAY | Make the pushed package public | public: ... |
to |
config | MAY | Destination URL or path, or a list of them | to: ... |
Lint¶
Path: lint
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
disable |
config | MAY | Rule ID to justification map | disable: ... |
Defaults¶
Path: defaults
| Key | Class | Rule | Description | Example |
|---|---|---|---|---|
rdfPrefixes |
config | MAY | Prefix to namespace map | rdfPrefixes: ... |
Complete example¶
min_sunstone_version: 1.20.0
dcat-si:methodology: METHODOLOGY.md
inputs:
- name: fish-farms
title: Fish Farms
description: Salmon farms by site.
path: inputs/fish_farms.csv
prov:generatedAtTime: '2026-01-02'
prov:wasGeneratedBy: {dct:type: manual-download}
source:
"@id": https://doi.org/10.1016/j.aqrep.2022.101316
title: Salmon farm survey
dct:publisher: &pub
rdfs:label: Elsevier
skos:altLabel: ELS
dct:creator:
- rdfs:label: 'Aas, T. S.'
dct:issued: '2022'
dct:modified: '2022-06-01'
dct:isPartOf: {rdfs:label: 'Aquaculture Reports 26, 101316'}
dct:license: CC-BY-4.0
- name: feed-prices
title: Feed Prices
description: Monthly feed prices.
path: inputs/feed_prices.csv
prov:generatedAtTime: '2026-01-03'
prov:wasGeneratedBy: {dct:type: manual-download}
source:
dcat:downloadURL: https://example.org/feed.csv
title: Feed price series
dct:publisher: *pub
dct:issued: '2025'
dct:modified: '2025-06-01'
dct:license: CC-BY-4.0
Aliases (old key to new key)¶
| Level | Old | New |
|---|---|---|
| document | si:methodology |
dcat-si:methodology |
| dataset | name |
title |
| dataset | slug |
name |
| dataset | location |
path |
| dataset | fields |
schema.fields |
| dataset | primaryKey |
schema.primaryKey |
| dataset | license |
licenses |
| package | license |
licenses |
| source | name |
title |
| source | attributedTo |
prov:wasAttributedTo |
| source | attributedTo.version |
version |
| source | license |
dct:license |
| source | updated |
dct:modified |
| source | acquiredAt |
<dataset>.prov:generatedAtTime |
| source | acquisitionMethod |
<dataset>.prov:wasGeneratedBy.dct:type |
| source | location.data |
dcat:downloadURL |
| source | location.web |
dcat:landingPage |
| source | location.about |
dcat:landingPage |
| source | location.metadata |
rdfs:seeAlso |
| source | location.access |
dcat:accessURL |
| source | location.dcat:downloadURL |
dcat:downloadURL |
| source | location.dcat:landingPage |
dcat:landingPage |
| source | location.dcat:accessURL |
dcat:accessURL |
| field | unit |
si:unit |
| field | source |
dct:source |
| field | si:sourceField |
dct:source |
| field | dct:title |
title |
| field_source | publisher |
dct:publisher |
| lock_source | attributedTo |
prov:wasAttributedTo |
| lock_source | license |
dct:license |
Rules¶
| Rule | Level | Category | Title |
|---|---|---|---|
| R001 | MUST | naming | Dataset missing 'title' |
| R002 | MUST | naming | Dataset missing 'name' |
| R003 | MUST | naming | Dataset missing 'path' |
| R004 | SHOULD | description | Dataset missing 'description' |
| R005 | MUST | provenance | Dataset missing license |
| R006 | MUST | provenance | License is not a recognised identifier |
| R007 | MUST | naming | Field missing 'name' |
| R008 | MUST | types | Field missing 'type' |
| R009 | MUST | config | Malformed lint.disable entry |
| R010 | MUST NOT | provenance | Output license is NoDerivatives |
| R101 | SHOULD | provenance | Input missing 'source' block |
| R102 | MUST | provenance | Source block missing required keys |
| R103 | SHOULD | units | Numeric field missing 'si:unit' |
| R104 | MUST | naming | Name not in kebab-case |
| R105 | SHOULD | description | Published output field missing 'description' |
| R201 | INFO | description | Generic field name without description |
| R202 | INFO | naming | Generic dataset title |
| R301 | MUST | extras | Unknown key |
| R302 | MUST | extras | Undeclared RDF prefix |
| R303 | MUST | extras | Unknown vocabulary term |
| R304 | MUST NOT | extras | Deprecated key |
| R305 | MUST | extras | Dataset has both 'slug' and 'title' |
| R306 | MUST | extras | New-form keys without min_sunstone_version >= 1.20.0 |
| R307 | MUST NOT | extras | RDF property duplicates a Data Package key or a generated value |
| R308 | MUST | extras | Include file cannot be merged |
| R311 | SHOULD | provenance | Source missing recommended keys |
| R312 | MUST | provenance | Input missing acquisition metadata |
| R313 | MUST | provenance | Published output has no sources |
| R314 | SHOULD | description | Published output missing recommended coverage properties |
| R315 | MUST NOT | provenance | DOI used as a link |
| R316 | SHOULD | provenance | Field source object missing recommended keys |
| R317 | SHOULD | provenance | Input field sources repeat the dataset source |
| R318 | SHOULD | provenance | Field source repeats the dataset's only source |
| R321 | SHOULD | lineage | Output has no lock entry with sources and activity |
| R322 | MUST | lineage | Lock source references unknown dataset |
| R323 | MUST NOT | lineage | Inline 'lineage' in datasets.yaml |
| R331 | MUST | types | Unknown field type |
| R341 | SHOULD | units | Unit is not Pint or QUDT |
| R351 | MUST | naming | Package missing 'title' when publishing |
| R361 | SHOULD | methodology | No methodology document |
| R362 | MUST | methodology | Publishing without a methodology document |