Set up your editor¶
With the JSON Schema of the files, an editor completes keys and marks mistakes as you type.
dpb schema prints the JSON Schema of the four kinds of file, so an editor can complete and check them as you type. Save the schemas once, and again after upgrading dpb:
mkdir -p .schemas
for kind in root dataproduct port table; do dpb schema $kind > .schemas/$kind.json; done
Then point the editor’s YAML support (the YAML extension in VS Code, or the built-in JSON Schema mappings in JetBrains IDEs) at them. In VS Code, add to .vscode/settings.json:
{
"yaml.schemas": {
".schemas/root.json": "datapatchbay.yaml",
".schemas/dataproduct.json": "dataproduct.yaml",
".schemas/port.json": "port.yaml"
}
}
Table files have no fixed name, so add a modeline at the top of each one (the path is relative to the file):
# yaml-language-server: $schema=../../../../.schemas/table.json
The schema checks the shape of a file. dpb validate also checks the rules across files.
Next¶
The file reference describes every key.
dpb schemalists the schemas thatdpbprints.