Static vs Dynamic Pipelines
Static Pipelines
In static pipelines, the complete execution graph is known before any step runs:Dynamic Pipelines
Dynamic pipelines determine which steps to run based on runtime conditions:How Dynamic Pipelines Work
Orchestration Container
For dynamic pipelines, orchestrators launch an orchestration container that:- Runs the pipeline function to determine the execution graph
- Submits discovered steps to the orchestration backend
- Monitors step execution and handles failures
Database Schema
Dynamic pipelines use a different database schema than static pipelines. Theis_dynamic flag on pipeline snapshots indicates this:
Orchestrator Support
Not all orchestrators support dynamic pipelines. Check thesupports_dynamic_pipelines property:
Implementing Dynamic Pipeline Support
To support dynamic pipelines in your custom orchestrator:Advanced Dynamic Patterns
Conditional Branching
Execute different step sequences based on data characteristics:Dynamic Parallelism
Scale parallelism based on data characteristics:External Input Integration
Make decisions based on external services:Resource Requirements
Orchestration Container Resources
The orchestration container typically needs minimal resources since it only coordinates execution:Step Resources
Individual steps can have their own resource requirements:The get_orchestrator_run_id() Challenge
For dynamic pipelines,get_orchestrator_run_id() has simpler requirements than static pipelines:
Best Practices
Minimize Orchestration Logic
Keep the orchestration container lightweight. Move heavy computation to steps.
Handle Failures Gracefully
Dynamic pipelines can fail during step discovery. Add error handling.
Document Decision Logic
Make it clear what runtime conditions trigger different execution paths.
Test Edge Cases
Test with boundary conditions that trigger different execution paths.
Testing Dynamic Pipelines
Common Pitfalls
Non-Deterministic Pipelines
Avoid randomness in branching logic. Pipeline reruns should produce the same execution graph for the same inputs.
Expensive Orchestration
Don’t do heavy computation in the orchestration container. Move it to dedicated steps.
Assuming All Orchestrators Support Dynamic Pipelines
Always check orchestrator.supports_dynamic_pipelines before using dynamic features.
Next Steps
Custom Orchestrators
Build your own orchestrator with dynamic pipeline support
Resource Configuration
Configure CPU, memory, and GPU for dynamic steps
Containerization
Understand Docker image building for dynamic pipelines
Custom Materializers
Handle custom data types between dynamic steps
