Guides
Check DAB configurations
Use this guide if you have DAB (Data according to Business) files to check before deployment, by hand or in automation. You will check the model, mappings and workflow offline, and check the mappings and workflow against the source tables.
Run the examples from the directory of the tutorial's bookstore project, created by daana init bookstore --example bookstore (see the tutorial). The DAB files are in dab/. The duckdb connection profile, which points at bookstore.duckdb, is in connections.yaml. Check the model:
daana dab check model dab/model.yaml
The command checks YAML structure, entity and attribute definitions, relationship references, required fields and naming rules. It also refuses a model where a joined view would have two attribute columns with the same name. It does not connect to a database or deploy the model.
Select the model
Pass the model path explicitly, or omit it to use app.paths.model from the configuration. The default is model.yaml in the current directory. Check the model with an explicit path or from the dab directory:
daana dab check model dab/model.yaml
cd dab && daana dab check model
An explicit path takes precedence over the configured path. The second command leaves the shell in dab/, so return to the project directory with cd ... Then add --verbose to include entity details in the report:
daana dab check model dab/model.yaml --verbose
Use the report in automation
Request the report as JSON with --format json, so that a script can read it:
daana dab check model dab/model.yaml --format json
The check exits with status 0 for a valid model and 1 for an invalid or unreadable model. The JSON report uses the model-check schema, which includes command: "model", success, summary, issues and model details. --format json changes only the format of the report. The check writes the report, as text or as JSON, to standard output and nothing else; the closing error line of a failed check and any warning or error that the check logs to the console go to standard error.
Check mappings
A mapping check is a connected check by default: it tests the mappings against the source tables. The --model flag names the model file, --connections names the profiles file and --connection selects a profile. Run the offline check with --skip-schema-validation, then the connected check through the duckdb profile:
# Check structure and model references without a source connection
daana dab check mapping dab/mappings/ --model dab/model.yaml --skip-schema-validation
# Include live source schema checks (the mapping default)
daana dab check mapping dab/mappings/ --model dab/model.yaml --connections connections.yaml --connection duckdb
Inspect the summary at the end of the bookstore's connected mapping check:
Summary:
Total: 2
Valid: 2
Invalid: 0
Both of the bookstore's mappings pass the connected check.
A project created with plain daana init uses the profile name dev. Its mappings must be written before they can be checked (see Project workflow). In such a project, pass dev with --connection:
# Generic example: a project from plain daana init, with authored mappings
daana dab check mapping dab/mappings/ --model dab/model.yaml --connections connections.yaml --connection dev
The connected check opens the source tables through the profile and tests each table, primary-key column and transformation expression against them. A mapping that reads a column the table does not have passes the offline check and fails the connected one:
✘ Errors:
Schema Invalid Expression:
• stage.sales_orders: invalid transformation expression for 'order_value_amount': Binder Error: Referenced column "total_amountx" not found in FROM clause!
The error names the source table, the attribute whose transformation expression failed, and the column that the table does not have, total_amountx.
Mapping checks use app.paths.mappings, app.paths.model and app.paths.connections when explicit paths are omitted. Explicit flags take precedence. Use --strict to turn schema warnings into errors. A mapping check writes its report to standard output and nothing else, as text or, with --format json, as JSON. A connected mapping check writes its progress messages to standard error, where logged warnings and errors go too.
Check a workflow
A workflow check also covers the workflow's model, mappings and connection profiles. Check the workflow offline, then add --source for the connected check and --strict to treat its warnings as errors:
# Check the workflow and its model, mappings and connection profiles offline
daana dab check workflow dab/workflow.yaml --connections connections.yaml
# Include live source validation explicitly
daana dab check workflow dab/workflow.yaml --connections connections.yaml --source --format json
# Require source warnings to pass too
daana dab check workflow dab/workflow.yaml --connections connections.yaml --source --strict
In the bookstore layout the profiles are in the project directory, one level above the workflow. The examples name the file explicitly with --connections.
A workflow check writes its report to standard output and nothing else, as text or, with --format json, as JSON; logged warnings and errors go to standard error.
Omit the file to use app.paths.workflow (default workflow.yaml). Explicit --connections overrides profile discovery for both offline and source checks. Without that flag, profiles are discovered relative to the workflow; a configured app.paths.connections alone does not replace discovery.
Workflow checks connect only with --source. Missing source objects and incomplete checks produce warnings by default; --strict --source treats them as errors. Invalid local inputs, rejected unsafe expressions, startup/report failures and missing framework remain errors in both modes. --strict alone does not enable live validation.
Existing commands
daana check model, daana check mapping and daana check workflow are supported and use the same flags, checkers, reports and exit status as their daana dab check equivalents. Their JSON reports have the command values model, mapping and workflow, and scripts can keep calling these paths.
The checks on this page use the path daana dab check. The executable is daana. Lifecycle and authoring commands keep their existing paths.
Offline checks do not test the source tables. See the command reference for supported flags and the model reference for model fields.