dbt-dagsterizer 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dbt_dagsterizer-0.1.0/.gitignore +36 -0
- dbt_dagsterizer-0.1.0/PKG-INFO +35 -0
- dbt_dagsterizer-0.1.0/README.md +20 -0
- dbt_dagsterizer-0.1.0/docs/README.md +25 -0
- dbt_dagsterizer-0.1.0/docs/concepts/cli.md +239 -0
- dbt_dagsterizer-0.1.0/docs/concepts/dagster-dbt-code-location-template.md +122 -0
- dbt_dagsterizer-0.1.0/docs/concepts/overview.md +34 -0
- dbt_dagsterizer-0.1.0/docs/dagster/concepts/dagster-dbt-code-location-template.md +5 -0
- dbt_dagsterizer-0.1.0/docs/dagster/concepts/dbt-dagsterizer-cli.md +5 -0
- dbt_dagsterizer-0.1.0/docs/dagster/concepts/dbt-dagsterizer.md +5 -0
- dbt_dagsterizer-0.1.0/docs/dagster/templates/dagster-dbt-starrocks-code-location/README.md +5 -0
- dbt_dagsterizer-0.1.0/docs/dagster/templates/dagster-dbt-starrocks-code-location/developer_workflow.md +255 -0
- dbt_dagsterizer-0.1.0/docs/dagster/templates/dagster-dbt-starrocks-code-location/local_development.md +83 -0
- dbt_dagsterizer-0.1.0/docs/dagster/templates/dagster-dbt-starrocks-code-location/template_usage.md +5 -0
- dbt_dagsterizer-0.1.0/docs/development/codebase-tour.md +34 -0
- dbt_dagsterizer-0.1.0/docs/development/package-development.md +43 -0
- dbt_dagsterizer-0.1.0/docs/getting-started.md +46 -0
- dbt_dagsterizer-0.1.0/docs/templates/dagster-dbt-starrocks-code-location/README.md +34 -0
- dbt_dagsterizer-0.1.0/docs/templates/dagster-dbt-starrocks-code-location/developer_workflow.md +191 -0
- dbt_dagsterizer-0.1.0/docs/templates/dagster-dbt-starrocks-code-location/local_development.md +83 -0
- dbt_dagsterizer-0.1.0/docs/templates/dagster-dbt-starrocks-code-location/template_usage.md +74 -0
- dbt_dagsterizer-0.1.0/pyproject.toml +46 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/__init__.py +4 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/__main__.py +6 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/api.py +72 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/__init__.py +12 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/dbt/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/dbt/assets.py +80 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/dbt/prepare.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/dbt/translator.py +71 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/dbt/vars.py +28 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/sources/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/sources/automation.py +45 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/assets/sources/factory.py +74 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli.py +6 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli_parts/app.py +18 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli_parts/common.py +62 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli_parts/macros.py +45 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli_parts/meta.py +600 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli_parts/project.py +127 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/cli_parts/validation.py +308 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/dbt/__init__.py +10 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/dbt/manifest.py +87 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/dbt/manifest_prepare.py +60 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/env_utils.py +77 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/__init__.py +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/dbt/__init__.py +3 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/dbt/auto_config.py +78 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/dbt/factory.py +105 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/dbt/jobs.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/dbt/presets.py +50 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/dbt_config.py +2 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/sources/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/jobs/sources/jobs.py +20 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/macro_templates/generate_schema_name.sql +23 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/macro_templates/partition_vars.sql +18 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/macro_templates/row_count_greater_than.sql +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/macro_templates/starrocks_layer_schema.sql +15 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/macro_templates/starrocks_overrides.sql +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/manifest_inputs.py +91 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/orchestration_config.py +367 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/cookiecutter.json +24 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/hooks/post_gen_project.py +87 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/hooks/pre_gen_project.py +16 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/.env.example +51 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/.gitignore +15 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/.python-version +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/Makefile +118 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/README.md +29 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/analyses/sample_customer_counts.sql +4 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/dagsterization.yml +47 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/dbt_project.yml +34 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/macros/generate_schema_name.sql +22 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/macros/partition_vars.sql +18 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/macros/row_count_greater_than.sql +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/macros/starrocks_layer_schema.sql +14 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/macros/starrocks_overrides.sql +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dwd/customers.sql +19 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dwd/orders.sql +21 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dwd/schema.yml +48 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dwd/sources.yml +57 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dws/dim_customer.sql +20 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dws/fact_customer_orders_daily.sql +19 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dws/fact_orders_daily.sql +18 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/dws/schema.yml +56 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/ods_test/ods_test_customers.sql +169 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/ods_test/ods_test_orders.sql +118 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/models/ods_test/schema.yml +25 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/packages.yml +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/profiles.yml +47 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/snapshots/customers_snapshot.sql +18 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/dbt_project/tests/assert_customers_unique_customer_id.sql +5 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/docker/docker-compose.yml +94 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/pyproject.toml +46 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/__init__.py +4 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/__main__.py +6 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/api.py +72 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/__init__.py +12 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/dbt/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/dbt/assets.py +80 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/dbt/prepare.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/dbt/translator.py +71 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/dbt/vars.py +28 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/sources/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/sources/automation.py +45 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/assets/sources/factory.py +74 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/cli.py +6 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/cli_parts/app.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/cli_parts/common.py +62 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/cli_parts/macros.py +45 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/cli_parts/meta.py +600 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/cli_parts/validation.py +308 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/dbt/__init__.py +10 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/dbt/manifest.py +87 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/dbt/manifest_prepare.py +60 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/env_utils.py +77 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/__init__.py +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/dbt/__init__.py +3 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/dbt/auto_config.py +78 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/dbt/factory.py +105 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/dbt/jobs.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/dbt/presets.py +50 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/dbt_config.py +2 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/sources/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/jobs/sources/jobs.py +20 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/macro_templates/generate_schema_name.sql +23 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/macro_templates/partition_vars.sql +18 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/macro_templates/row_count_greater_than.sql +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/macro_templates/starrocks_layer_schema.sql +15 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/macro_templates/starrocks_overrides.sql +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/manifest_inputs.py +91 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/orchestration_config.py +371 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/resources/__init__.py +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/resources/dbt.py +47 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/resources/starrocks.py +66 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/__init__.py +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/dbt/__init__.py +3 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/dbt/auto_config.py +78 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/dbt/factory.py +98 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/dbt/presets.py +35 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/dbt/schedules.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/dbt_config.py +2 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/sources/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/schedules/sources/schedules.py +16 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/__init__.py +34 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/dbt_config.py +5 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/auto_config.py +148 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/detector/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/detector/dbt_manifest.py +63 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/detector/factory.py +116 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/detector/presets.py +35 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/detector/sparse_lookback.py +169 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/propagator/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/propagator/factory.py +119 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/dbt_dagsterizer/sensors/partition_change/propagator/presets.py +25 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/{{cookiecutter.package_name}}/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/src/{{cookiecutter.package_name}}/definitions.py +8 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/tests/test_definitions.py +40 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/tests/test_partition_vars.py +35 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/project_templates/luban-dagster-dbt-starrocks-code-location-source-template/{{cookiecutter.app_name}}/tests/test_schedule_specs.py +28 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/resources/__init__.py +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/resources/dbt.py +47 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/resources/starrocks.py +66 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/__init__.py +9 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/dbt/__init__.py +3 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/dbt/auto_config.py +78 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/dbt/factory.py +98 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/dbt/presets.py +35 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/dbt/schedules.py +17 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/dbt_config.py +2 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/sources/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/schedules/sources/schedules.py +16 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/__init__.py +34 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/dbt_config.py +5 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/auto_config.py +148 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/detector/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/detector/dbt_manifest.py +63 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/detector/factory.py +116 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/detector/presets.py +35 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/detector/sparse_lookback.py +169 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/propagator/__init__.py +1 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/propagator/factory.py +119 -0
- dbt_dagsterizer-0.1.0/src/dbt_dagsterizer/sensors/partition_change/propagator/presets.py +25 -0
- dbt_dagsterizer-0.1.0/tests/test_api.py +20 -0
- dbt_dagsterizer-0.1.0/tests/test_cli.py +47 -0
- dbt_dagsterizer-0.1.0/tests/test_cli_dotenv_loading.py +110 -0
- dbt_dagsterizer-0.1.0/tests/test_cli_meta_generation.py +195 -0
- dbt_dagsterizer-0.1.0/tests/test_cli_schema_yml_update.py +47 -0
- dbt_dagsterizer-0.1.0/tests/test_integration_minimal.py +35 -0
- dbt_dagsterizer-0.1.0/tests/test_manifest_inputs.py +51 -0
- dbt_dagsterizer-0.1.0/tests/test_observe_sources_schedule.py +17 -0
- dbt_dagsterizer-0.1.0/tests/test_partition_change_sensor_missing_relation.py +65 -0
- dbt_dagsterizer-0.1.0/tests/test_prepare_manifest_dotenv_loading.py +39 -0
- dbt_dagsterizer-0.1.0/tests/test_project_init.py +38 -0
- dbt_dagsterizer-0.1.0/uv.lock +1873 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.ruff_cache/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
.coverage
|
|
9
|
+
.coverage.*
|
|
10
|
+
htmlcov/
|
|
11
|
+
coverage.xml
|
|
12
|
+
pytestdebug.log
|
|
13
|
+
|
|
14
|
+
.tox/
|
|
15
|
+
.nox/
|
|
16
|
+
|
|
17
|
+
.venv/
|
|
18
|
+
venv/
|
|
19
|
+
ENV/
|
|
20
|
+
env/
|
|
21
|
+
|
|
22
|
+
build/
|
|
23
|
+
dist/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.eggs/
|
|
26
|
+
*.egg
|
|
27
|
+
|
|
28
|
+
.env
|
|
29
|
+
.env.*
|
|
30
|
+
!.env.example
|
|
31
|
+
|
|
32
|
+
.DS_Store
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.iml
|
|
36
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dbt-dagsterizer
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Dagster automation driven by dbt metadata (Luban CI)
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Requires-Dist: click>=8.3.1
|
|
7
|
+
Requires-Dist: cookiecutter>=2.6.0
|
|
8
|
+
Requires-Dist: dagster-dbt<1,>=0.26
|
|
9
|
+
Requires-Dist: dagster<2,>=1.12
|
|
10
|
+
Requires-Dist: dbt-core<2,>=1.9
|
|
11
|
+
Requires-Dist: dbt-starrocks<2,>=1.9
|
|
12
|
+
Requires-Dist: pymysql>=1.1.0
|
|
13
|
+
Requires-Dist: ruamel-yaml>=0.19.1
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# dbt-dagsterizer
|
|
17
|
+
|
|
18
|
+
`dbt-dagsterizer` is a Python package that will host the reusable Dagster automation currently embedded in the Dagster+dbt+StarRocks code-location template.
|
|
19
|
+
|
|
20
|
+
This package is being introduced incrementally. The first step is to provide a stable CLI entrypoint and a minimal, always-loadable Dagster Definitions builder for empty/skeleton projects.
|
|
21
|
+
|
|
22
|
+
## CLI
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
dbt-dagsterizer --help
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Python
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from dbt_dagsterizer.api import build_definitions
|
|
32
|
+
|
|
33
|
+
defs = build_definitions(dbt_project_dir="./dbt_project")
|
|
34
|
+
```
|
|
35
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# dbt-dagsterizer
|
|
2
|
+
|
|
3
|
+
`dbt-dagsterizer` is a Python package that will host the reusable Dagster automation currently embedded in the Dagster+dbt+StarRocks code-location template.
|
|
4
|
+
|
|
5
|
+
This package is being introduced incrementally. The first step is to provide a stable CLI entrypoint and a minimal, always-loadable Dagster Definitions builder for empty/skeleton projects.
|
|
6
|
+
|
|
7
|
+
## CLI
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
dbt-dagsterizer --help
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Python
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from dbt_dagsterizer.api import build_definitions
|
|
17
|
+
|
|
18
|
+
defs = build_definitions(dbt_project_dir="./dbt_project")
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# dbt-dagsterizer docs
|
|
2
|
+
|
|
3
|
+
This directory contains developer-facing documentation for `dbt-dagsterizer`.
|
|
4
|
+
|
|
5
|
+
## Start here
|
|
6
|
+
|
|
7
|
+
- Getting started: `getting-started.md`
|
|
8
|
+
- Concepts overview: `concepts/overview.md`
|
|
9
|
+
- CLI reference: `concepts/cli.md`
|
|
10
|
+
|
|
11
|
+
## Template docs (Dagster + dbt + StarRocks code location)
|
|
12
|
+
|
|
13
|
+
- Template overview: `templates/dagster-dbt-starrocks-code-location/README.md`
|
|
14
|
+
- Usage and architecture: `templates/dagster-dbt-starrocks-code-location/template_usage.md`
|
|
15
|
+
- Developer workflow (jobs/schedules/sensors via `dagsterization.yml`): `templates/dagster-dbt-starrocks-code-location/developer_workflow.md`
|
|
16
|
+
- Local development (render + run): `templates/dagster-dbt-starrocks-code-location/local_development.md`
|
|
17
|
+
|
|
18
|
+
## Developing this repo
|
|
19
|
+
|
|
20
|
+
- Package development: `development/package-development.md`
|
|
21
|
+
- Codebase tour: `development/codebase-tour.md`
|
|
22
|
+
|
|
23
|
+
## Legacy paths
|
|
24
|
+
|
|
25
|
+
Some older docs links may still point under `docs/dagster/**`. Those pages now redirect to the canonical locations above.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# dbt-dagsterizer CLI
|
|
2
|
+
|
|
3
|
+
This document describes the `dbt-dagsterizer` CLI.
|
|
4
|
+
|
|
5
|
+
The CLI exists to:
|
|
6
|
+
|
|
7
|
+
- Keep the Dagster code location mostly static.
|
|
8
|
+
- Let developers declare orchestration intent close to dbt models, in a reviewable YAML file.
|
|
9
|
+
- Validate that intent early (before Dagster fails at import/runtime).
|
|
10
|
+
|
|
11
|
+
## Entry points
|
|
12
|
+
|
|
13
|
+
- `dbt-dagsterizer ...`
|
|
14
|
+
- `python -m dbt_dagsterizer ...`
|
|
15
|
+
|
|
16
|
+
## Environment
|
|
17
|
+
|
|
18
|
+
Some dbt configs (e.g. sources) use `env_var(...)`. To make CLI behavior match Dagster runtime behavior, the CLI loads dotenv files before running `dbt parse`:
|
|
19
|
+
|
|
20
|
+
- `<repo>/.env`
|
|
21
|
+
- `dbt_project/.env`
|
|
22
|
+
|
|
23
|
+
Existing process environment variables are not overridden.
|
|
24
|
+
|
|
25
|
+
When `--prepare` is enabled, the CLI may run `dbt parse` to refresh `dbt_project/target/manifest.json`. It writes a sidecar file `dbt_project/target/.luban_manifest_inputs.json` so future runs can detect when a refresh is needed (for example dotenv mtime or dbt target changes).
|
|
26
|
+
|
|
27
|
+
Current refresh rules when `--prepare` is enabled:
|
|
28
|
+
|
|
29
|
+
- Manifest missing
|
|
30
|
+
- Dbt target changed
|
|
31
|
+
- Dotenv inputs changed (dotenv paths changed, dotenv removed, or dotenv mtime increased)
|
|
32
|
+
|
|
33
|
+
## Orchestration file
|
|
34
|
+
|
|
35
|
+
The CLI reads and writes orchestration intent in a single file:
|
|
36
|
+
|
|
37
|
+
- `dbt_project/dagsterization.yml`
|
|
38
|
+
|
|
39
|
+
This file is not a dbt schema YAML, and is intentionally kept outside `dbt_project/models/` so dbt will not parse it.
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
### `project init`
|
|
44
|
+
|
|
45
|
+
Renders a runnable Dagster + dbt (StarRocks) code-location repo using the embedded cookiecutter template.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
dbt-dagsterizer project init \
|
|
49
|
+
--output-dir . \
|
|
50
|
+
--app-name my_app \
|
|
51
|
+
--package-name my_app \
|
|
52
|
+
--project-name "My App" \
|
|
53
|
+
--author-name "You" \
|
|
54
|
+
--author-email "you@example.com"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Notes:
|
|
58
|
+
|
|
59
|
+
- `--output-dir` controls where the project directory is created.
|
|
60
|
+
- `--force` overwrites an existing output directory.
|
|
61
|
+
- By default the generated dbt project is minimal; use `--include-sample-dbt-project` to include sample models.
|
|
62
|
+
|
|
63
|
+
### `meta validate`
|
|
64
|
+
|
|
65
|
+
Validates `dagsterization.yml` against `dbt_project/target/manifest.json`.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
dbt-dagsterizer meta validate --dbt-project-dir dbt_project --prepare
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Flags:
|
|
72
|
+
|
|
73
|
+
- `--prepare/--no-prepare`: when enabled, runs `dbt parse` if the manifest is missing or stale.
|
|
74
|
+
|
|
75
|
+
### `meta init`
|
|
76
|
+
|
|
77
|
+
Creates the orchestration YAML file if it does not exist.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
dbt-dagsterizer meta init --dbt-project-dir dbt_project
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Flags:
|
|
84
|
+
|
|
85
|
+
- `--path`: relative to the dbt project dir (default `dagsterization.yml`)
|
|
86
|
+
- `--force`: overwrite an existing file
|
|
87
|
+
- `--parse`: run `dbt parse` after writing
|
|
88
|
+
|
|
89
|
+
### `meta job`
|
|
90
|
+
|
|
91
|
+
Creates/updates a grouped asset job in `dagsterization.yml`.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
dbt-dagsterizer meta job \
|
|
95
|
+
--dbt-project-dir dbt_project \
|
|
96
|
+
--models fact_orders_daily,fact_customer_orders_daily \
|
|
97
|
+
--name daily_facts_job \
|
|
98
|
+
--include-upstream \
|
|
99
|
+
--partitions daily
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Selection:
|
|
103
|
+
|
|
104
|
+
- `--models`: comma-separated model names
|
|
105
|
+
- `--tag`: select all models in the manifest that already have a dbt tag
|
|
106
|
+
|
|
107
|
+
Flags:
|
|
108
|
+
|
|
109
|
+
- `--partitions`: `daily|unpartitioned|none`
|
|
110
|
+
- `--prepare`: only used when selecting by `--tag` (needs the manifest)
|
|
111
|
+
- `--parse`: run `dbt parse` after writing
|
|
112
|
+
|
|
113
|
+
### `meta schedule`
|
|
114
|
+
|
|
115
|
+
Creates/updates a schedule in `dagsterization.yml`.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
dbt-dagsterizer meta schedule \
|
|
119
|
+
--dbt-project-dir dbt_project \
|
|
120
|
+
--models orders \
|
|
121
|
+
--name orders_daily_schedule \
|
|
122
|
+
--hour 2 \
|
|
123
|
+
--minute 0 \
|
|
124
|
+
--lookback-days 3 \
|
|
125
|
+
--enabled
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Flags:
|
|
129
|
+
|
|
130
|
+
- `--parse`: run `dbt parse` after writing
|
|
131
|
+
|
|
132
|
+
### `meta partition`
|
|
133
|
+
|
|
134
|
+
Sets partitioning for selected models in `dagsterization.yml`.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
dbt-dagsterizer meta partition \
|
|
138
|
+
--dbt-project-dir dbt_project \
|
|
139
|
+
--models fact_orders_daily,fact_customer_orders_daily \
|
|
140
|
+
--type daily
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Flags:
|
|
144
|
+
|
|
145
|
+
- `--type`: `daily|unpartitioned|none` (`none` removes the model from `partitions.*`)
|
|
146
|
+
- `--parse`: run `dbt parse` after writing
|
|
147
|
+
|
|
148
|
+
### `meta asset-job`
|
|
149
|
+
|
|
150
|
+
Creates/deletes per-model asset jobs for selected models. When present, the derived job name becomes `dbt_<model>_asset_job`.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
dbt-dagsterizer meta asset-job \
|
|
154
|
+
--dbt-project-dir dbt_project \
|
|
155
|
+
--models orders \
|
|
156
|
+
--no-parse
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Flags:
|
|
160
|
+
|
|
161
|
+
- Adds selected models to `asset_jobs`
|
|
162
|
+
- `--parse`: run `dbt parse` after writing
|
|
163
|
+
|
|
164
|
+
### `meta asset-job-delete`
|
|
165
|
+
|
|
166
|
+
Deletes per-model asset jobs for selected models.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
dbt-dagsterizer meta asset-job-delete \
|
|
170
|
+
--dbt-project-dir dbt_project \
|
|
171
|
+
--models orders
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Flags:
|
|
175
|
+
|
|
176
|
+
- `--force`: also remove referencing schedules
|
|
177
|
+
|
|
178
|
+
### `meta job-delete`
|
|
179
|
+
|
|
180
|
+
Deletes a grouped job by name.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
dbt-dagsterizer meta job-delete \
|
|
184
|
+
--dbt-project-dir dbt_project \
|
|
185
|
+
--name daily_facts_job
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Flags:
|
|
189
|
+
|
|
190
|
+
- `--force`: also remove references from schedules/propagators
|
|
191
|
+
|
|
192
|
+
### `meta partition-change detector`
|
|
193
|
+
|
|
194
|
+
Creates/updates a partition-change detector entry for a model.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
dbt-dagsterizer meta partition-change detector \
|
|
198
|
+
--dbt-project-dir dbt_project \
|
|
199
|
+
--model orders \
|
|
200
|
+
--enabled \
|
|
201
|
+
--detect-source ods.orders \
|
|
202
|
+
--partition-date-expr order_date \
|
|
203
|
+
--updated-at-expr updated_at \
|
|
204
|
+
--lookback-days 7 \
|
|
205
|
+
--offset-days 1
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Notes:
|
|
209
|
+
|
|
210
|
+
- Specify exactly one of `--detect-relation` or `--detect-source`.
|
|
211
|
+
- `--detect-source` uses `source.table` format.
|
|
212
|
+
|
|
213
|
+
### `meta partition-change propagator`
|
|
214
|
+
|
|
215
|
+
Creates/updates a partition-change propagation entry for a model.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
dbt-dagsterizer meta partition-change propagator \
|
|
219
|
+
--dbt-project-dir dbt_project \
|
|
220
|
+
--model orders \
|
|
221
|
+
--enabled \
|
|
222
|
+
--targets daily_facts_job
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### `macros install`
|
|
226
|
+
|
|
227
|
+
Installs the macro templates shipped with `dbt-dagsterizer` into a dbt project.
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
dbt-dagsterizer macros install --dbt-project-dir dbt_project
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Flags:
|
|
234
|
+
|
|
235
|
+
- `--force`: overwrite files if they exist with different content
|
|
236
|
+
|
|
237
|
+
## Why `--parse` exists
|
|
238
|
+
|
|
239
|
+
Dagster reads orchestration intent from the dbt manifest. If you update YAML but do not rebuild `target/manifest.json`, Dagster will not see the change. `--parse` updates the manifest immediately.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Dagster + dbt (StarRocks) Code Location Template
|
|
2
|
+
|
|
3
|
+
For the end-to-end developer workflow (template + local validation), start with:
|
|
4
|
+
|
|
5
|
+
- `../templates/dagster-dbt-starrocks-code-location/README.md`
|
|
6
|
+
|
|
7
|
+
Dagster deployments commonly use two layers:
|
|
8
|
+
|
|
9
|
+
- **Dagster Platform**: Webserver + Daemon + Dagster instance storage.
|
|
10
|
+
- **Dagster Code Location**: User code served by `dagster code-server` (gRPC).
|
|
11
|
+
|
|
12
|
+
This document describes the standard **Dagster + dbt (StarRocks) code location** source template intended for data transformation teams.
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
Provide a runnable, opinionated skeleton that:
|
|
17
|
+
|
|
18
|
+
- Keeps the Dagster platform and code locations decoupled.
|
|
19
|
+
- Uses **dbt** as the transformation engine (SQL/models/tests).
|
|
20
|
+
- Uses **Dagster** for orchestration, scheduling, observability, and dependency management.
|
|
21
|
+
- Standardizes folder structure and wiring so teams focus on datasets and models.
|
|
22
|
+
|
|
23
|
+
## When to use this template
|
|
24
|
+
|
|
25
|
+
Use this template when:
|
|
26
|
+
|
|
27
|
+
- You want a new Dagster code location that primarily materializes dbt assets.
|
|
28
|
+
- You want consistent conventions across teams (layout, naming, local run, CI expectations).
|
|
29
|
+
|
|
30
|
+
Do not use this template when:
|
|
31
|
+
|
|
32
|
+
- You need a Dagster platform.
|
|
33
|
+
- Your pipeline is mostly non-dbt (pure Python ops, Spark jobs, etc.).
|
|
34
|
+
|
|
35
|
+
## Boundary: Dagster vs dbt
|
|
36
|
+
|
|
37
|
+
### dbt owns
|
|
38
|
+
|
|
39
|
+
- Model definitions (SQL in `models/`).
|
|
40
|
+
- Data tests (schema tests, custom tests).
|
|
41
|
+
- Sources/exposures/macros/packages.
|
|
42
|
+
- Model selection semantics (`--select`, tags, state).
|
|
43
|
+
|
|
44
|
+
### Dagster owns
|
|
45
|
+
|
|
46
|
+
- Asset orchestration (when/what to run).
|
|
47
|
+
- Observability (asset-level logs, lineage view, run history).
|
|
48
|
+
- Scheduling, sensors, retries, alerting.
|
|
49
|
+
- Coordination with non-dbt assets (ingestion, external tables, ML training).
|
|
50
|
+
|
|
51
|
+
## Repository layout
|
|
52
|
+
|
|
53
|
+
The template is a single Git repo representing one code location.
|
|
54
|
+
|
|
55
|
+
- `src/<package_name>/` Dagster code location module
|
|
56
|
+
- `definitions.py` exports `defs` (Dagster entrypoint)
|
|
57
|
+
- `assets/dbt.py` defines how dbt is exposed as Dagster assets
|
|
58
|
+
- `dbt_project/` dbt project
|
|
59
|
+
- `dbt_project.yml`
|
|
60
|
+
- `models/` (standard dbt structure)
|
|
61
|
+
- `profiles.yml` (local-safe default)
|
|
62
|
+
|
|
63
|
+
## Runtime contract (Luban CI + Dagster)
|
|
64
|
+
|
|
65
|
+
Luban CI deploys code locations as a Kubernetes Deployment that runs:
|
|
66
|
+
|
|
67
|
+
`dagster code-server start -h 0.0.0.0 -p <port> -m <package_name>`
|
|
68
|
+
|
|
69
|
+
This implies:
|
|
70
|
+
|
|
71
|
+
- The Python module `<package_name>` must import successfully.
|
|
72
|
+
- The module must expose `defs` (via `__init__.py`).
|
|
73
|
+
|
|
74
|
+
## Local development
|
|
75
|
+
|
|
76
|
+
For the end-to-end local workflow (render template, start StarRocks, run Dagster), see:
|
|
77
|
+
|
|
78
|
+
- `../templates/dagster-dbt-starrocks-code-location/local_development.md`
|
|
79
|
+
|
|
80
|
+
## Production configuration guidance
|
|
81
|
+
|
|
82
|
+
- Keep secrets out of Git.
|
|
83
|
+
- Prefer configuring warehouse credentials via environment variables and/or mounted Secrets.
|
|
84
|
+
- For production adapters (for example Snowflake, BigQuery, Postgres, StarRocks), update `dbt_project/profiles.yml` to reference credentials via `env_var()`.
|
|
85
|
+
|
|
86
|
+
## Environments
|
|
87
|
+
|
|
88
|
+
This template supports configuring the default dbt environment via Cookiecutter (`default_env`).
|
|
89
|
+
|
|
90
|
+
Common mapping:
|
|
91
|
+
|
|
92
|
+
- `sandbox`: developer environment and Luban CI `snd` deployment
|
|
93
|
+
- `production`: Luban CI `prd` deployment
|
|
94
|
+
|
|
95
|
+
Set `DBT_TARGET` to one of the configured environments. In GitOps deployments, you typically keep env var names the same and just provide different values per environment.
|
|
96
|
+
|
|
97
|
+
## Layers as separate databases (StarRocks)
|
|
98
|
+
|
|
99
|
+
In many StarRocks deployments, `ods`, `dwd`, and `dws` are separate databases on the same cluster.
|
|
100
|
+
|
|
101
|
+
The template centralizes layer mapping in `dbt_project.yml` using env-var-driven dbt `vars`.
|
|
102
|
+
|
|
103
|
+
Convention: ODS source table `name` matches the physical table name. If you need a different physical name, set `identifier` in `dwd/sources.yml`.
|
|
104
|
+
|
|
105
|
+
## Recommended conventions
|
|
106
|
+
|
|
107
|
+
- One code location per domain.
|
|
108
|
+
- Shared dimensions as a producer.
|
|
109
|
+
- dbt-first transformations.
|
|
110
|
+
- Stable selection semantics (tags/groups) declared in dbt and consumed by Dagster.
|
|
111
|
+
|
|
112
|
+
For the supported orchestration config schema (`dbt_project/dagsterization.yml`) and the intended developer workflow, see:
|
|
113
|
+
|
|
114
|
+
- `../templates/dagster-dbt-starrocks-code-location/developer_workflow.md`
|
|
115
|
+
|
|
116
|
+
## Extending the skeleton
|
|
117
|
+
|
|
118
|
+
Common extensions that keep the boundary clean:
|
|
119
|
+
|
|
120
|
+
- Add ingestion assets in Dagster that produce dbt sources, then make dbt depend on them.
|
|
121
|
+
- Add partitioning in Dagster for incremental models, passing partition ranges into dbt via `--vars`.
|
|
122
|
+
- Add asset checks for dbt tests to show failures at the asset level.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# dbt-dagsterizer
|
|
2
|
+
|
|
3
|
+
`dbt-dagsterizer` is the home for reusable Dagster automation driven by dbt metadata.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- Keep dbt projects and Dagster code locations decoupled (BYO dbt project).
|
|
8
|
+
- Generate Dagster assets/jobs/schedules/sensors/resources from dbt `manifest.json` plus a small orchestration intent file.
|
|
9
|
+
- Provide a CLI to author and validate orchestration intent with a low learning curve.
|
|
10
|
+
|
|
11
|
+
## Core concepts
|
|
12
|
+
|
|
13
|
+
### Manifest-driven
|
|
14
|
+
|
|
15
|
+
The dbt manifest (`dbt_project/target/manifest.json`) is the stable interface between dbt and Dagster.
|
|
16
|
+
|
|
17
|
+
### Orchestration intent
|
|
18
|
+
|
|
19
|
+
Orchestration intent is stored in a single, reviewable YAML file:
|
|
20
|
+
|
|
21
|
+
- `dbt_project/dagsterization.yml`
|
|
22
|
+
|
|
23
|
+
This file is not a dbt schema YAML and is intentionally kept outside `dbt_project/models/` so dbt will not parse it.
|
|
24
|
+
|
|
25
|
+
### Always-loadable definitions
|
|
26
|
+
|
|
27
|
+
Code locations often need to import successfully even before the dbt project is “real”.
|
|
28
|
+
|
|
29
|
+
`dbt_dagsterizer.api.build_definitions()` returns a minimal Dagster `Definitions` when there are no dbt models yet, so skeleton repos remain runnable.
|
|
30
|
+
|
|
31
|
+
## See also
|
|
32
|
+
|
|
33
|
+
- CLI reference: `cli.md`
|
|
34
|
+
- Code location template concept: `dagster-dbt-code-location-template.md`
|