How astronomer/astronomer-cosmos works
Main Components
a) Core Integration Layer
• Core/graph and core/airflow components
• How it bridges Airflow and dbt
b) Execution Components
• Multiple operator types (shown in cosmos/operators/):
• Local
• Docker
• Kubernetes
• AWS EKS
• Azure Container Instance
• GCP Cloud Run Job
• VirtualEnv
c) Database Connection Layer
• Profile handlers for various databases:
• Snowflake
• BigQuery
• Postgres
• Redshift
• Databricks
• And others from the profiles/ directory
d) dbt Integration Components
• Project parser
• Graph handler
• Executable manager
• Selector system
e) Airflow Integration Points
• DAG generation
• Task Group handling
• Graph transformation
• Listeners and hooks
Relationship Flows
• User Input → Project Configuration
• Project Configuration → dbt Parser
• dbt Parser → Graph Generator
• Graph Generator → Airflow DAG Constructor
• Profile Configuration → Database Connections
• Operator Selection → Execution Environment
Component Grouping
• Execution Layer (containing all operators)
• Database Connection Layer (containing all profiles)
• Core Processing Layer (containing parser and graph components)
• Airflow Integration Layer (containing DAG and task group handlers)
Technical Details
Annotations for:
• Supported Python versions
• Key dependencies
• Configuration options
• Execution modes
Implementation Notes
• Maintain consistent spacing and alignment
• Version information
• Notes about scalability and deployment options
This architecture should be represented in a way that shows both the simplicity of use for end-users and the sophisticated internal architecture that makes it possible.