Project Scaffold
There are two ways to bootstrap a project: a bare start, or a skeleton that already runs.
dg scaffold defs dagster_rocky.RockyComponent <name>: uses Dagster’s built-in scaffolder via the registered entry point. Writes a baredefs.yaml.init_rocky_project(target_dir): Python helper that writes a complete skeleton withdefs.yaml,rocky.toml,.gitignore,models/, and aREADME.md.
dg scaffold (canonical)
Section titled “dg scaffold (canonical)”Install dagster-rocky and the dg CLI finds RockyComponent on its
own. The discovery comes from the
[project.entry-points."dagster_dg_cli.registry_modules"] entry in
dagster-rocky’s pyproject.toml.
uv add dagster-rockyuv run dg list components | grep -i rocky# dagster_rocky.RockyComponent
uv run dg scaffold defs dagster_rocky.RockyComponent my_pipelineThis writes a single my_pipeline/defs.yaml with type: dagster_rocky.RockyComponent.
init_rocky_project (richer)
Section titled “init_rocky_project (richer)”For a complete project skeleton, use the Python helper:
from pathlib import Pathfrom dagster_rocky import init_rocky_project
init_rocky_project(Path("my_pipeline"))After running, my_pipeline/ contains:
my_pipeline/├── defs.yaml # type: dagster_rocky.RockyComponent + attributes├── rocky.toml # DuckDB-backed full-refresh starter├── .gitignore # the DuckDB files and state the engine creates├── models/ # empty, with .gitkeep│ └── .gitkeep└── README.md # quickstart instructionsThe default rocky.toml uses the DuckDB local-execution adapter. The
scaffold therefore runs end to end with no warehouse credentials. It copies
every table in each src__<source> schema of warehouse.duckdb into
raw__<source>, with row_count and column_match checks.
The file also carries a commented-out incremental strategy and a
[pipeline.main.checks.freshness] block. Turn them on once every source table
has a load timestamp column. The freshness block then gives your Dagster assets
a freshness policy.
Overwrite protection
Section titled “Overwrite protection”init_rocky_project refuses to overwrite existing files by default; pass
overwrite=True to force:
init_rocky_project(Path("my_pipeline"), overwrite=True)Next steps
Section titled “Next steps”rocky --config rocky.toml validate # check the config (DuckDB, no credentials)rocky --config rocky.toml run # run the pipeline locallydg dev # launch the Dagster UIInstall the rocky binary first. See Installation.