feat: Add Dagster integration (to_dagster_assets, to_dagster_job)#47
Merged
feat: Add Dagster integration (to_dagster_assets, to_dagster_job)#47
Conversation
Add support for Dagster as an orchestration target: - to_dagster_assets(): Generate Dagster assets from pipeline - One asset per target table with automatic dependency wiring - Support for group names, key prefixes, compute kinds - Asset metadata with query_id and table name - to_dagster_job(): Generate Dagster job from pipeline (ops-based) - Alternative approach for job-based workflows Also improves Airflow 3.x compatibility: - Auto-detect Airflow version when generating DAGs - Support explicit version specification via airflow_version parameter Includes comprehensive test suite (tests/test_dagster_integration.py) with 16 tests covering asset generation, dependencies, and execution. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Break down large pipeline.py (~2700 lines) using delegation pattern: - Create orchestrators/ package with: - base.py: BaseOrchestrator with shared functionality - airflow.py: AirflowOrchestrator for Airflow DAG generation - dagster.py: DagsterOrchestrator for Dagster assets/jobs - Create execution.py with: - PipelineExecutor for sync/async pipeline execution - Update pipeline.py to delegate to new modules: - to_airflow_dag() → AirflowOrchestrator.to_dag() - to_dagster_assets() → DagsterOrchestrator.to_assets() - to_dagster_job() → DagsterOrchestrator.to_job() - run() → PipelineExecutor.run() - async_run() → PipelineExecutor.async_run() - Export new classes from clgraph.__init__: - AirflowOrchestrator, DagsterOrchestrator, PipelineExecutor Benefits: - Cleaner separation of concerns - Easier to test orchestrators independently - Reduced pipeline.py size (~400 lines removed) - Backward compatible - Pipeline methods still work Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
to_dagster_assets()method to generate Dagster assets from SQL pipelineto_dagster_job()method for ops-based Dagster workflowsChanges
Test plan
🤖 Generated with Claude Code