/starlake-skills:dag-generatefrom starlake-skills
Generate orchestration DAGs with `starlake dag-generate` — render Airflow or Dagster Python DAG files from your project metadata and Jinja2 templates to schedule loads and transforms; regenerate after schema or schedule changes
Ships in starlake-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generates orchestration DAG files (Airflow Python DAGs or Dagster jobs) from your Starlake project configuration. DAGs are generated from Jinja2 templates and can be customized per domain, table, or task.
starlake dag-generate [options]
--outputDir <value>: Output directory for generated DAG files--clean: Clean the output directory before generating--tags <value>: Generate DAGs only for tasks/tables matching these tags--tasks: Generate DAG files for transform tasks--domains: Generate DAG files for load domains--withRoles: Include role definitions in generated DAGs--reportFormat <value>: Report output format: console, json, or htmlmetadata/dags/{name}.sl.yml)Each DAG configuration specifies a template and output filename:
# metadata/dags/airflow_load_shell.sl.yml
version: 1
dag:
comment: "sample dag configuration"
template: "load/airflow__scheduled_table__shell.py.j2"
filename: "airflow_all_tables.py"
options:
sl_env_var: '{"SL_ROOT": "{{SL_ROOT}}"}'
# metadata/dags/airflow_transform_shell.sl.yml
dag:
comment: "sample dag configuration"
template: "transform/airflow__scheduled_task__shell.py.j2"
filename: "airflow_all_tasks.py"
options:
run_dependencies_first: "true"
# metadata/dags/dagster_load_shell.sl.yml
dag:
comment: "data loading for {{domain}}"
template: "load/dagster__scheduled_table__shell.py.j2"
filename: "dagster_all_load.py"
options:
sl_env_var: '{"SL_ROOT": "{{SL_ROOT}}"}'
SL_STARLAKE_PATH: "{{SL_ROOT}}/starlake"
pre_load_strategy: "ack" # pending, imported, ack, none
global_ack_file_path: "{{SL_ROOT}}/datasets/pending/starbake/GO.ack"
ack_wait_timeout: "60" # seconds
DAGs are assigned in application.sl.yml at the project level, and can be overridden at domain or table level:
# metadata/application.sl.yml
application:
dagRef:
load: "airflow_load_shell" # Default DAG for all load tasks
transform: "airflow_transform_shell" # Default DAG for all transforms
Override at domain level:
# metadata/load/starbake/_config.sl.yml
load:
metadata:
dagRef: "custom_load_dag"
Override at table/task level:
# metadata/load/starbake/orders.sl.yml
table:
metadata:
dagRef: "orders_specific_dag"
Priority (lowest to highest): project -> domain -> table/task
The DAG configuration file has exactly four keys under dag: comment, template, filename, and options — there are no top-level name, schedule, catchup, default_pool, description, or tags keys.
metadata.schedule (a cron or a schedulePresets name from application.sl.yml) for load DAGs, task-level cron for transform DAGs.catchup, start_date, end_date, or tags are options entries — valid keys are the ones documented in the header comments of the chosen template.Control how generated load DAGs check for incoming files before loading, with the pre_load_strategy option (see the Dagster example above):
| Strategy | Description |
|---|---|
imported | Check the domain incoming directory; stage (import) files before loading |
ack | Wait for the acknowledgment file at global_ack_file_path (up to ack_wait_timeout seconds) |
pending | Check the pending/stage area for files matching the table patterns |
none | No pre-load check -- load runs on schedule (default) |
Override the default Jinja2 template for full control over DAG generation — dag.template is a plain string:
dag:
template: "load/airflow__scheduled_table__custom.py.j2" # Relative to metadata/dags/templates/ or absolute
Place custom templates in metadata/dags/templates/load/ or metadata/dags/templates/transform/. Custom template names must follow the {orchestrator}__scheduled_{table|task}__{env}.py.j2 convention — the segment before the first __ selects the orchestrator.
Priority (lowest to highest):
application.dagRef.load / application.dagRef.transformload.metadata.dagRef in _config.sl.ymltable.metadata.dagRef in table.sl.ymltask.dagRef in task.sl.ymlLower levels override higher levels.
starlake dag-generate --outputDir /tmp/dags --clean
starlake dag-generate --domains --outputDir /tmp/dags
starlake dag-generate --tasks --outputDir /tmp/dags
starlake dag-generate --tags daily,critical --outputDir /tmp/dags
starlake dag-generate --outputDir /tmp/dags --withRoles --clean
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (starlake-ai/starlake-skills) — no native marketplace selected
npx claudepluginhub p/starlake-ai-starlake-skills75 skills in this plugin
/acl-dependenciesVisualize access control with `starlake acl-dependencies` — graph which users and groups can access which tables, from the ACL and RLS (row-level security) definitions in your YAML, output as SVG, PNG, or JSON/autoloadInfer schemas from files in the incoming directory and load them into the warehouse in one step with `starlake autoload`. Use for quick starts or new data files with no YAML table definitions yet; generates the table configs automatically./bootstrapCreate a new Starlake project with `starlake bootstrap` — scaffold the standard metadata/load/transform directory structure and starter config from a template (quickstart, simple). Use when initializing or setting up a new project.