[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-astronomer-cosmos-dbt-core":3,"mdc-phdqtq-key":53,"related-org-astronomer-cosmos-dbt-core":3501,"related-repo-astronomer-cosmos-dbt-core":3664},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":48,"sourceUrl":51,"mdContent":52},"cosmos-dbt-core","run dbt Core projects as Airflow DAGs","Turns a dbt Core project into an Airflow DAG\u002FTaskGroup using Astronomer Cosmos. Use turning a dbt Core project into an Airflow DAG or TaskGroup with Astronomer Cosmos. Before implementing, verify dbt engine, warehouse, Airflow version, execution environment, DAG vs TaskGroup, and manifest availability.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"astronomer","Astronomer","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fastronomer.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Airflow","airflow","tag",{"name":17,"slug":18,"type":15},"ETL","etl",{"name":20,"slug":21,"type":15},"Data Pipeline","data-pipeline",{"name":23,"slug":23,"type":15},"dbt",412,"https:\u002F\u002Fgithub.com\u002Fastronomer\u002Fagents","2026-04-06T18:01:55.450315",null,55,[30,31,32,33,14,34,35,36,37,38,39,23,40,41,42,43,44,45,46,47],"agentic-workflow","agents","ai","ai-agents","apache-airflow","claude","cursor","dag","data-engineering","data-pipelines","llm","mcp","orchestrator","skills","workflow-automation","workflow-management","workflow-orchestration","workflows",{"repoUrl":25,"stars":24,"forks":28,"topics":49,"description":50},[30,31,32,33,14,34,35,36,37,38,39,23,40,41,42,43,44,45,46,47],"AI agent tooling for data engineering workflows.","https:\u002F\u002Fgithub.com\u002Fastronomer\u002Fagents\u002Ftree\u002FHEAD\u002Fskills\u002Fcosmos-dbt-core","---\nname: cosmos-dbt-core\ndescription: Turns a dbt Core project into an Airflow DAG\u002FTaskGroup using Astronomer Cosmos. Use turning a dbt Core project into an Airflow DAG or TaskGroup with Astronomer Cosmos. Before implementing, verify dbt engine, warehouse, Airflow version, execution environment, DAG vs TaskGroup, and manifest availability.\n---\n\n# Cosmos + dbt Core: Implementation Checklist\n\nExecute steps in order. Prefer the simplest configuration that meets the user's constraints.\n\n> **Version note**: This skill targets Cosmos 1.11+ and Airflow 3.x. If the user is on Airflow 2.x, adjust imports accordingly (see Appendix A).\n>\n> **Reference**: Latest stable: https:\u002F\u002Fpypi.org\u002Fproject\u002Fastronomer-cosmos\u002F\n\n> **Before starting**, confirm: (1) dbt engine = Core (not Fusion → use **cosmos-dbt-fusion**), (2) warehouse type, (3) Airflow version, (4) execution environment (Airflow env \u002F venv \u002F container), (5) DbtDag vs DbtTaskGroup vs individual operators, (6) manifest availability.\n\n---\n\n## 1. Configure Project (ProjectConfig)\n\n| Approach | When to use | Required param |\n|----------|-------------|----------------|\n| Project path | Files available locally | `dbt_project_path` |\n| Manifest only | `dbt_manifest` load | `manifest_path` + `project_name` |\n\n```python\nfrom cosmos import ProjectConfig\n\n_project_config = ProjectConfig(\n    dbt_project_path=\"\u002Fpath\u002Fto\u002Fdbt\u002Fproject\",\n    # manifest_path=\"\u002Fpath\u002Fto\u002Fmanifest.json\",  # for dbt_manifest load mode\n    # project_name=\"my_project\",  # if using manifest_path without dbt_project_path\n    # install_dbt_deps=False,  # if deps precomputed in CI\n)\n```\n\n## 2. Choose Parsing Strategy (RenderConfig)\n\nPick ONE load mode based on constraints:\n\n| Load mode | When to use | Required inputs | Constraints |\n|-----------|-------------|-----------------|-------------|\n| `dbt_manifest` | Large projects; containerized execution; fastest | `ProjectConfig.manifest_path` | Remote manifest needs `manifest_conn_id` |\n| `dbt_ls` | Complex selectors; need dbt-native selection | dbt installed OR `dbt_executable_path` | Can also be used with containerized execution |\n| `dbt_ls_file` | dbt_ls selection without running dbt_ls every parse | `RenderConfig.dbt_ls_path` | `select`\u002F`exclude` won't work |\n| `automatic` (default) | Simple setups; let Cosmos pick | (none) | Falls back: manifest → dbt_ls → custom |\n\n> **CRITICAL**: Containerized execution (`DOCKER`\u002F`KUBERNETES`\u002Fetc.)\n\n```python\nfrom cosmos import RenderConfig, LoadMode\n\n_render_config = RenderConfig(\n    load_method=LoadMode.DBT_MANIFEST,  # or DBT_LS, DBT_LS_FILE, AUTOMATIC\n)\n```\n\n---\n\n## 3. Choose Execution Mode (ExecutionConfig)\n\n> **Reference**: See **[reference\u002Fcosmos-config.md](reference\u002Fcosmos-config.md#execution-modes-executionconfig)** for detailed configuration examples per mode.\n\nPick ONE execution mode:\n\n| Execution mode | When to use | Speed | Required setup |\n|----------------|-------------|-------|----------------|\n| `WATCHER` | Fastest; single `dbt build` visibility | Fastest | dbt adapter in env OR `dbt_executable_path` or dbt Fusion |\n| `WATCHER_KUBERNETES` | Fastest isolated method; single `dbt build` visibility | Fast | dbt installed in container |\n| `LOCAL` + `DBT_RUNNER` | dbt + adapter in the same Python installation as Airflow | Fast | dbt 1.5+ in `requirements.txt` |\n| `LOCAL` + `SUBPROCESS` | dbt + adapter available in the Airflow deployment, in an isolated Python installation | Medium | `dbt_executable_path` |\n| `AIRFLOW_ASYNC` | BigQuery + long-running transforms | Fast | Airflow ≥2.8; provider deps |\n| `KUBERNETES` | Isolation between Airflow and dbt | Medium | Airflow ≥2.8; provider deps |\n| `VIRTUALENV` | Can't modify image; runtime venv | Slower | `py_requirements` in operator_args |\n| Other containerized approaches | Support Airflow and dbt isolation | Medium | container config |\n\n```python\nfrom cosmos import ExecutionConfig, ExecutionMode\n\n_execution_config = ExecutionConfig(\n    execution_mode=ExecutionMode.WATCHER,  # or LOCAL, VIRTUALENV, AIRFLOW_ASYNC, KUBERNETES, etc.\n)\n```\n\n---\n\n## 4. Configure Warehouse Connection (ProfileConfig)\n\n> **Reference**: See **[reference\u002Fcosmos-config.md](reference\u002Fcosmos-config.md#profileconfig-warehouse-connection)** for detailed ProfileConfig options and all ProfileMapping classes.\n\n### Option A: Airflow Connection + ProfileMapping (Recommended)\n\n```python\nfrom cosmos import ProfileConfig\nfrom cosmos.profiles import SnowflakeUserPasswordProfileMapping\n\n_profile_config = ProfileConfig(\n    profile_name=\"default\",\n    target_name=\"dev\",\n    profile_mapping=SnowflakeUserPasswordProfileMapping(\n        conn_id=\"snowflake_default\",\n        profile_args={\"schema\": \"my_schema\"},\n    ),\n)\n```\n\n### Option B: Existing profiles.yml\n\n> **CRITICAL**: Do not hardcode secrets; use environment variables.\n\n```python\nfrom cosmos import ProfileConfig\n\n_profile_config = ProfileConfig(\n    profile_name=\"my_profile\",\n    target_name=\"dev\",\n    profiles_yml_filepath=\"\u002Fpath\u002Fto\u002Fprofiles.yml\",\n)\n```\n\n---\n\n## 5. Configure Testing Behavior (RenderConfig)\n\n> **Reference**: See **[reference\u002Fcosmos-config.md](reference\u002Fcosmos-config.md#testing-behavior-renderconfig)** for detailed testing options.\n\n| TestBehavior | Behavior |\n|--------------|----------|\n| `AFTER_EACH` (default) | Tests run immediately after each model (default) |\n| `BUILD` | Combine run + test into single `dbt build` |\n| `AFTER_ALL` | All tests after all models complete |\n| `NONE` | Skip tests |\n\n```python\nfrom cosmos import RenderConfig, TestBehavior\n\n_render_config = RenderConfig(\n    test_behavior=TestBehavior.AFTER_EACH,\n)\n```\n\n---\n\n## 6. Configure operator_args\n\n> **Reference**: See **[reference\u002Fcosmos-config.md](reference\u002Fcosmos-config.md#operator_args-configuration)** for detailed operator_args options.\n\n```python\n_operator_args = {\n    # BaseOperator params\n    \"retries\": 3,\n\n    # Cosmos-specific params\n    \"install_deps\": False,\n    \"full_refresh\": False,\n    \"quiet\": True,\n\n    # Runtime dbt vars (XCom \u002F params)\n    \"vars\": '{\"my_var\": \"{{ ti.xcom_pull(task_ids=\\'pre_dbt\\') }}\"}',\n}\n```\n\n---\n\n## 7. Assemble DAG \u002F TaskGroup\n\n### Option A: DbtDag (Standalone)\n\n```python\nfrom cosmos import DbtDag, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig\nfrom cosmos.profiles import SnowflakeUserPasswordProfileMapping\nfrom pendulum import datetime\n\n_project_config = ProjectConfig(\n    dbt_project_path=\"\u002Fusr\u002Flocal\u002Fairflow\u002Fdbt\u002Fmy_project\",\n)\n\n_profile_config = ProfileConfig(\n    profile_name=\"default\",\n    target_name=\"dev\",\n    profile_mapping=SnowflakeUserPasswordProfileMapping(\n        conn_id=\"snowflake_default\",\n    ),\n)\n\n_execution_config = ExecutionConfig()\n_render_config = RenderConfig()\n\nmy_cosmos_dag = DbtDag(\n    dag_id=\"my_cosmos_dag\",\n    project_config=_project_config,\n    profile_config=_profile_config,\n    execution_config=_execution_config,\n    render_config=_render_config,\n    operator_args={},\n    start_date=datetime(2025, 1, 1),\n    schedule=\"@daily\",\n)\n```\n\n### Option B: DbtTaskGroup (Inside Existing DAG)\n\n```python\nfrom airflow.sdk import dag, task  # Airflow 3.x\n# from airflow.decorators import dag, task  # Airflow 2.x\nfrom airflow.models.baseoperator import chain\nfrom cosmos import DbtTaskGroup, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig\nfrom pendulum import datetime\n\n_project_config = ProjectConfig(dbt_project_path=\"\u002Fusr\u002Flocal\u002Fairflow\u002Fdbt\u002Fmy_project\")\n_profile_config = ProfileConfig(profile_name=\"default\", target_name=\"dev\")\n_execution_config = ExecutionConfig()\n_render_config = RenderConfig()\n\n@dag(start_date=datetime(2025, 1, 1), schedule=\"@daily\")\ndef my_dag():\n    @task\n    def pre_dbt():\n        return \"some_value\"\n\n    dbt = DbtTaskGroup(\n        group_id=\"dbt_project\",\n        project_config=_project_config,\n        profile_config=_profile_config,\n        execution_config=_execution_config,\n        render_config=_render_config,\n    )\n\n    @task\n    def post_dbt():\n        pass\n\n    chain(pre_dbt(), dbt, post_dbt())\n\nmy_dag()\n```\n\n### Option C: Use Cosmos operators directly\n\n```python\nimport os\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Any\n\nfrom airflow import DAG\n\ntry:\n    from airflow.providers.standard.operators.python import PythonOperator\nexcept ImportError:\n    from airflow.operators.python import PythonOperator\n\nfrom cosmos import DbtCloneLocalOperator, DbtRunLocalOperator, DbtSeedLocalOperator, ProfileConfig\nfrom cosmos.io import upload_to_aws_s3\n\nDEFAULT_DBT_ROOT_PATH = Path(__file__).parent \u002F \"dbt\"\nDBT_ROOT_PATH = Path(os.getenv(\"DBT_ROOT_PATH\", DEFAULT_DBT_ROOT_PATH))\nDBT_PROJ_DIR = DBT_ROOT_PATH \u002F \"jaffle_shop\"\nDBT_PROFILE_PATH = DBT_PROJ_DIR \u002F \"profiles.yml\"\nDBT_ARTIFACT = DBT_PROJ_DIR \u002F \"target\"\n\nprofile_config = ProfileConfig(\n    profile_name=\"default\",\n    target_name=\"dev\",\n    profiles_yml_filepath=DBT_PROFILE_PATH,\n)\n\n\ndef check_s3_file(bucket_name: str, file_key: str, aws_conn_id: str = \"aws_default\", **context: Any) -> bool:\n    \"\"\"Check if a file exists in the given S3 bucket.\"\"\"\n    from airflow.providers.amazon.aws.hooks.s3 import S3Hook\n\n    s3_key = f\"{context['dag'].dag_id}\u002F{context['run_id']}\u002Fseed\u002F0\u002F{file_key}\"\n    print(f\"Checking if file {s3_key} exists in S3 bucket...\")\n    hook = S3Hook(aws_conn_id=aws_conn_id)\n    return hook.check_for_key(key=s3_key, bucket_name=bucket_name)\n\n\nwith DAG(\"example_operators\", start_date=datetime(2024, 1, 1), catchup=False) as dag:\n    seed_operator = DbtSeedLocalOperator(\n        profile_config=profile_config,\n        project_dir=DBT_PROJ_DIR,\n        task_id=\"seed\",\n        dbt_cmd_flags=[\"--select\", \"raw_customers\"],\n        install_deps=True,\n        append_env=True,\n    )\n\n    check_file_uploaded_task = PythonOperator(\n        task_id=\"check_file_uploaded_task\",\n        python_callable=check_s3_file,\n        op_kwargs={\n            \"aws_conn_id\": \"aws_s3_conn\",\n            \"bucket_name\": \"cosmos-artifacts-upload\",\n            \"file_key\": \"target\u002Frun_results.json\",\n        },\n    )\n\n    run_operator = DbtRunLocalOperator(\n        profile_config=profile_config,\n        project_dir=DBT_PROJ_DIR,\n        task_id=\"run\",\n        dbt_cmd_flags=[\"--models\", \"stg_customers\"],\n        install_deps=True,\n        append_env=True,\n    )\n\n    clone_operator = DbtCloneLocalOperator(\n        profile_config=profile_config,\n        project_dir=DBT_PROJ_DIR,\n        task_id=\"clone\",\n        dbt_cmd_flags=[\"--models\", \"stg_customers\", \"--state\", DBT_ARTIFACT],\n        install_deps=True,\n        append_env=True,\n    )\n\n    seed_operator >> run_operator >> clone_operator\n    seed_operator >> check_file_uploaded_task\n```\n\n### Setting Dependencies on Individual Cosmos Tasks\n\n```python\nfrom cosmos import DbtDag, DbtResourceType\nfrom airflow.sdk import task, chain\n\nwith DbtDag(...) as dag:\n    @task\n    def upstream_task():\n        pass\n\n    _upstream = upstream_task()\n\n    for unique_id, dbt_node in dag.dbt_graph.filtered_nodes.items():\n        if dbt_node.resource_type == DbtResourceType.SEED:\n            my_dbt_task = dag.tasks_map[unique_id]\n            chain(_upstream, my_dbt_task)\n```\n\n---\n\n## 8. Safety Checks\n\nBefore finalizing, verify:\n\n- [ ] Execution mode matches constraints (AIRFLOW_ASYNC → BigQuery only)\n- [ ] Warehouse adapter installed for chosen execution mode\n- [ ] Secrets via Airflow connections or env vars, NOT plaintext\n- [ ] Load mode matches execution (complex selectors → dbt_ls)\n- [ ] Airflow 3 asset URIs if downstream DAGs scheduled on Cosmos assets (see Appendix A)\n\n---\n\n## Appendix A: Airflow 3 Compatibility\n\n### Import Differences\n\n| Airflow 3.x | Airflow 2.x |\n|-------------|-------------|\n| `from airflow.sdk import dag, task` | `from airflow.decorators import dag, task` |\n| `from airflow.sdk import chain` | `from airflow.models.baseoperator import chain` |\n\n### Asset\u002FDataset URI Format Change\n\nCosmos ≤1.9 (Airflow 2 Datasets):\n```\npostgres:\u002F\u002F0.0.0.0:5434\u002Fpostgres.public.orders\n```\n\nCosmos ≥1.10 (Airflow 3 Assets):\n```\npostgres:\u002F\u002F0.0.0.0:5434\u002Fpostgres\u002Fpublic\u002Forders\n```\n\n> **CRITICAL**: Update asset URIs when upgrading to Airflow 3.\n\n---\n\n## Appendix B: Operational Extras\n\n### Caching\n\nCosmos caches artifacts to speed up parsing. Enabled by default.\n\nReference: https:\u002F\u002Fastronomer.github.io\u002Fastronomer-cosmos\u002Fconfiguration\u002Fcaching.html\n\n### Memory-Optimized Imports\n\n```bash\nAIRFLOW__COSMOS__ENABLE_MEMORY_OPTIMISED_IMPORTS=True\n```\n\nWhen enabled:\n```python\nfrom cosmos.airflow.dag import DbtDag  # instead of: from cosmos import DbtDag\n```\n\n### Artifact Upload to Object Storage\n\n```bash\nAIRFLOW__COSMOS__REMOTE_TARGET_PATH=s3:\u002F\u002Fbucket\u002Ftarget_dir\u002F\nAIRFLOW__COSMOS__REMOTE_TARGET_PATH_CONN_ID=aws_default\n```\n\n```python\nfrom cosmos.io import upload_to_cloud_storage\n\nmy_dag = DbtDag(\n    # ...\n    operator_args={\"callback\": upload_to_cloud_storage},\n)\n```\n\n### dbt Docs Hosting\n\nCosmos serves dbt docs in the Airflow UI. The config depends on your Airflow major\nversion (each uses a different UI plugin system) — it is not a free single-vs-multi choice:\n\n| Airflow         | Config                                                            | Scope                | Since          |\n|-----------------|------------------------------------------------------------------|----------------------|----------------|\n| 2 (FAB plugin)  | `DBT_DOCS_DIR` (+ `DBT_DOCS_CONN_ID`, `DBT_DOCS_INDEX_FILE_NAME`) | Single project       | Cosmos 1.4.0+  |\n| 3.1+ (FastAPI)  | `DBT_DOCS_PROJECTS` (JSON)                                        | One or more projects | Cosmos 1.11.0+ |\n\nAirflow 2:\n\n```bash\nAIRFLOW__COSMOS__DBT_DOCS_DIR=\"path\u002Fto\u002Fdocs\"                   # local path or S3\u002FGCS\u002FAzure\u002FHTTP URI; defaults to the dbt target\u002F folder\nAIRFLOW__COSMOS__DBT_DOCS_CONN_ID=\"my_conn_id\"                 # optional; for cloud storage\nAIRFLOW__COSMOS__DBT_DOCS_INDEX_FILE_NAME=\"static_index.html\"  # optional; only if docs built with --static\n```\n\nAirflow 3.1+:\n\n```bash\nAIRFLOW__COSMOS__DBT_DOCS_PROJECTS='{\n    \"my_project\": {\n        \"dir\": \"s3:\u002F\u002Fbucket\u002Fdocs\u002F\",\n        \"index\": \"index.html\",\n        \"conn_id\": \"aws_default\",\n        \"name\": \"My Project\"\n    }\n}'\n```\n\nPick by Airflow version, not project count. The single-project settings are the Airflow 2\npath; Cosmos publishes no deprecation notice for them — do not describe them as \"legacy\"\nor \"deprecated.\"\n\nReference: https:\u002F\u002Fastronomer.github.io\u002Fastronomer-cosmos\u002Fconfiguration\u002Fhosting-docs.html\n\n---\n\n## Related Skills\n\n- **cosmos-dbt-fusion**: For dbt Fusion projects (not dbt Core)\n- **authoring-dags**: General DAG authoring patterns\n- **testing-dags**: Testing DAGs after creation\n",{"data":54,"body":55},{"name":4,"description":6},{"type":56,"children":57},"root",[58,67,73,106,126,130,137,229,315,321,326,500,528,573,576,582,605,610,896,941,944,950,971,978,1074,1080,1092,1150,1153,1159,1180,1276,1320,1323,1329,1350,1452,1455,1461,1467,1708,1714,1970,1976,2623,2629,2743,2746,2752,2757,2812,2815,2821,2827,2891,2897,2902,2912,2917,2926,2938,2941,2947,2953,2958,2969,2975,3005,3010,3024,3030,3071,3124,3130,3135,3240,3245,3344,3349,3439,3444,3454,3457,3463,3495],{"type":59,"tag":60,"props":61,"children":63},"element","h1",{"id":62},"cosmos-dbt-core-implementation-checklist",[64],{"type":65,"value":66},"text","Cosmos + dbt Core: Implementation Checklist",{"type":59,"tag":68,"props":69,"children":70},"p",{},[71],{"type":65,"value":72},"Execute steps in order. Prefer the simplest configuration that meets the user's constraints.",{"type":59,"tag":74,"props":75,"children":76},"blockquote",{},[77,88],{"type":59,"tag":68,"props":78,"children":79},{},[80,86],{"type":59,"tag":81,"props":82,"children":83},"strong",{},[84],{"type":65,"value":85},"Version note",{"type":65,"value":87},": This skill targets Cosmos 1.11+ and Airflow 3.x. If the user is on Airflow 2.x, adjust imports accordingly (see Appendix A).",{"type":59,"tag":68,"props":89,"children":90},{},[91,96,98],{"type":59,"tag":81,"props":92,"children":93},{},[94],{"type":65,"value":95},"Reference",{"type":65,"value":97},": Latest stable: ",{"type":59,"tag":99,"props":100,"children":104},"a",{"href":101,"rel":102},"https:\u002F\u002Fpypi.org\u002Fproject\u002Fastronomer-cosmos\u002F",[103],"nofollow",[105],{"type":65,"value":101},{"type":59,"tag":74,"props":107,"children":108},{},[109],{"type":59,"tag":68,"props":110,"children":111},{},[112,117,119,124],{"type":59,"tag":81,"props":113,"children":114},{},[115],{"type":65,"value":116},"Before starting",{"type":65,"value":118},", confirm: (1) dbt engine = Core (not Fusion → use ",{"type":59,"tag":81,"props":120,"children":121},{},[122],{"type":65,"value":123},"cosmos-dbt-fusion",{"type":65,"value":125},"), (2) warehouse type, (3) Airflow version, (4) execution environment (Airflow env \u002F venv \u002F container), (5) DbtDag vs DbtTaskGroup vs individual operators, (6) manifest availability.",{"type":59,"tag":127,"props":128,"children":129},"hr",{},[],{"type":59,"tag":131,"props":132,"children":134},"h2",{"id":133},"_1-configure-project-projectconfig",[135],{"type":65,"value":136},"1. Configure Project (ProjectConfig)",{"type":59,"tag":138,"props":139,"children":140},"table",{},[141,165],{"type":59,"tag":142,"props":143,"children":144},"thead",{},[145],{"type":59,"tag":146,"props":147,"children":148},"tr",{},[149,155,160],{"type":59,"tag":150,"props":151,"children":152},"th",{},[153],{"type":65,"value":154},"Approach",{"type":59,"tag":150,"props":156,"children":157},{},[158],{"type":65,"value":159},"When to use",{"type":59,"tag":150,"props":161,"children":162},{},[163],{"type":65,"value":164},"Required param",{"type":59,"tag":166,"props":167,"children":168},"tbody",{},[169,193],{"type":59,"tag":146,"props":170,"children":171},{},[172,178,183],{"type":59,"tag":173,"props":174,"children":175},"td",{},[176],{"type":65,"value":177},"Project path",{"type":59,"tag":173,"props":179,"children":180},{},[181],{"type":65,"value":182},"Files available locally",{"type":59,"tag":173,"props":184,"children":185},{},[186],{"type":59,"tag":187,"props":188,"children":190},"code",{"className":189},[],[191],{"type":65,"value":192},"dbt_project_path",{"type":59,"tag":146,"props":194,"children":195},{},[196,201,212],{"type":59,"tag":173,"props":197,"children":198},{},[199],{"type":65,"value":200},"Manifest only",{"type":59,"tag":173,"props":202,"children":203},{},[204,210],{"type":59,"tag":187,"props":205,"children":207},{"className":206},[],[208],{"type":65,"value":209},"dbt_manifest",{"type":65,"value":211}," load",{"type":59,"tag":173,"props":213,"children":214},{},[215,221,223],{"type":59,"tag":187,"props":216,"children":218},{"className":217},[],[219],{"type":65,"value":220},"manifest_path",{"type":65,"value":222}," + ",{"type":59,"tag":187,"props":224,"children":226},{"className":225},[],[227],{"type":65,"value":228},"project_name",{"type":59,"tag":230,"props":231,"children":236},"pre",{"className":232,"code":233,"language":234,"meta":235,"style":235},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from cosmos import ProjectConfig\n\n_project_config = ProjectConfig(\n    dbt_project_path=\"\u002Fpath\u002Fto\u002Fdbt\u002Fproject\",\n    # manifest_path=\"\u002Fpath\u002Fto\u002Fmanifest.json\",  # for dbt_manifest load mode\n    # project_name=\"my_project\",  # if using manifest_path without dbt_project_path\n    # install_dbt_deps=False,  # if deps precomputed in CI\n)\n","python","",[237],{"type":59,"tag":187,"props":238,"children":239},{"__ignoreMap":235},[240,251,261,270,279,288,297,306],{"type":59,"tag":241,"props":242,"children":245},"span",{"class":243,"line":244},"line",1,[246],{"type":59,"tag":241,"props":247,"children":248},{},[249],{"type":65,"value":250},"from cosmos import ProjectConfig\n",{"type":59,"tag":241,"props":252,"children":254},{"class":243,"line":253},2,[255],{"type":59,"tag":241,"props":256,"children":258},{"emptyLinePlaceholder":257},true,[259],{"type":65,"value":260},"\n",{"type":59,"tag":241,"props":262,"children":264},{"class":243,"line":263},3,[265],{"type":59,"tag":241,"props":266,"children":267},{},[268],{"type":65,"value":269},"_project_config = ProjectConfig(\n",{"type":59,"tag":241,"props":271,"children":273},{"class":243,"line":272},4,[274],{"type":59,"tag":241,"props":275,"children":276},{},[277],{"type":65,"value":278},"    dbt_project_path=\"\u002Fpath\u002Fto\u002Fdbt\u002Fproject\",\n",{"type":59,"tag":241,"props":280,"children":282},{"class":243,"line":281},5,[283],{"type":59,"tag":241,"props":284,"children":285},{},[286],{"type":65,"value":287},"    # manifest_path=\"\u002Fpath\u002Fto\u002Fmanifest.json\",  # for dbt_manifest load mode\n",{"type":59,"tag":241,"props":289,"children":291},{"class":243,"line":290},6,[292],{"type":59,"tag":241,"props":293,"children":294},{},[295],{"type":65,"value":296},"    # project_name=\"my_project\",  # if using manifest_path without dbt_project_path\n",{"type":59,"tag":241,"props":298,"children":300},{"class":243,"line":299},7,[301],{"type":59,"tag":241,"props":302,"children":303},{},[304],{"type":65,"value":305},"    # install_dbt_deps=False,  # if deps precomputed in CI\n",{"type":59,"tag":241,"props":307,"children":309},{"class":243,"line":308},8,[310],{"type":59,"tag":241,"props":311,"children":312},{},[313],{"type":65,"value":314},")\n",{"type":59,"tag":131,"props":316,"children":318},{"id":317},"_2-choose-parsing-strategy-renderconfig",[319],{"type":65,"value":320},"2. Choose Parsing Strategy (RenderConfig)",{"type":59,"tag":68,"props":322,"children":323},{},[324],{"type":65,"value":325},"Pick ONE load mode based on constraints:",{"type":59,"tag":138,"props":327,"children":328},{},[329,354],{"type":59,"tag":142,"props":330,"children":331},{},[332],{"type":59,"tag":146,"props":333,"children":334},{},[335,340,344,349],{"type":59,"tag":150,"props":336,"children":337},{},[338],{"type":65,"value":339},"Load mode",{"type":59,"tag":150,"props":341,"children":342},{},[343],{"type":65,"value":159},{"type":59,"tag":150,"props":345,"children":346},{},[347],{"type":65,"value":348},"Required inputs",{"type":59,"tag":150,"props":350,"children":351},{},[352],{"type":65,"value":353},"Constraints",{"type":59,"tag":166,"props":355,"children":356},{},[357,393,426,471],{"type":59,"tag":146,"props":358,"children":359},{},[360,368,373,382],{"type":59,"tag":173,"props":361,"children":362},{},[363],{"type":59,"tag":187,"props":364,"children":366},{"className":365},[],[367],{"type":65,"value":209},{"type":59,"tag":173,"props":369,"children":370},{},[371],{"type":65,"value":372},"Large projects; containerized execution; fastest",{"type":59,"tag":173,"props":374,"children":375},{},[376],{"type":59,"tag":187,"props":377,"children":379},{"className":378},[],[380],{"type":65,"value":381},"ProjectConfig.manifest_path",{"type":59,"tag":173,"props":383,"children":384},{},[385,387],{"type":65,"value":386},"Remote manifest needs ",{"type":59,"tag":187,"props":388,"children":390},{"className":389},[],[391],{"type":65,"value":392},"manifest_conn_id",{"type":59,"tag":146,"props":394,"children":395},{},[396,405,410,421],{"type":59,"tag":173,"props":397,"children":398},{},[399],{"type":59,"tag":187,"props":400,"children":402},{"className":401},[],[403],{"type":65,"value":404},"dbt_ls",{"type":59,"tag":173,"props":406,"children":407},{},[408],{"type":65,"value":409},"Complex selectors; need dbt-native selection",{"type":59,"tag":173,"props":411,"children":412},{},[413,415],{"type":65,"value":414},"dbt installed OR ",{"type":59,"tag":187,"props":416,"children":418},{"className":417},[],[419],{"type":65,"value":420},"dbt_executable_path",{"type":59,"tag":173,"props":422,"children":423},{},[424],{"type":65,"value":425},"Can also be used with containerized execution",{"type":59,"tag":146,"props":427,"children":428},{},[429,438,443,452],{"type":59,"tag":173,"props":430,"children":431},{},[432],{"type":59,"tag":187,"props":433,"children":435},{"className":434},[],[436],{"type":65,"value":437},"dbt_ls_file",{"type":59,"tag":173,"props":439,"children":440},{},[441],{"type":65,"value":442},"dbt_ls selection without running dbt_ls every parse",{"type":59,"tag":173,"props":444,"children":445},{},[446],{"type":59,"tag":187,"props":447,"children":449},{"className":448},[],[450],{"type":65,"value":451},"RenderConfig.dbt_ls_path",{"type":59,"tag":173,"props":453,"children":454},{},[455,461,463,469],{"type":59,"tag":187,"props":456,"children":458},{"className":457},[],[459],{"type":65,"value":460},"select",{"type":65,"value":462},"\u002F",{"type":59,"tag":187,"props":464,"children":466},{"className":465},[],[467],{"type":65,"value":468},"exclude",{"type":65,"value":470}," won't work",{"type":59,"tag":146,"props":472,"children":473},{},[474,485,490,495],{"type":59,"tag":173,"props":475,"children":476},{},[477,483],{"type":59,"tag":187,"props":478,"children":480},{"className":479},[],[481],{"type":65,"value":482},"automatic",{"type":65,"value":484}," (default)",{"type":59,"tag":173,"props":486,"children":487},{},[488],{"type":65,"value":489},"Simple setups; let Cosmos pick",{"type":59,"tag":173,"props":491,"children":492},{},[493],{"type":65,"value":494},"(none)",{"type":59,"tag":173,"props":496,"children":497},{},[498],{"type":65,"value":499},"Falls back: manifest → dbt_ls → custom",{"type":59,"tag":74,"props":501,"children":502},{},[503],{"type":59,"tag":68,"props":504,"children":505},{},[506,511,513,519,520,526],{"type":59,"tag":81,"props":507,"children":508},{},[509],{"type":65,"value":510},"CRITICAL",{"type":65,"value":512},": Containerized execution (",{"type":59,"tag":187,"props":514,"children":516},{"className":515},[],[517],{"type":65,"value":518},"DOCKER",{"type":65,"value":462},{"type":59,"tag":187,"props":521,"children":523},{"className":522},[],[524],{"type":65,"value":525},"KUBERNETES",{"type":65,"value":527},"\u002Fetc.)",{"type":59,"tag":230,"props":529,"children":531},{"className":232,"code":530,"language":234,"meta":235,"style":235},"from cosmos import RenderConfig, LoadMode\n\n_render_config = RenderConfig(\n    load_method=LoadMode.DBT_MANIFEST,  # or DBT_LS, DBT_LS_FILE, AUTOMATIC\n)\n",[532],{"type":59,"tag":187,"props":533,"children":534},{"__ignoreMap":235},[535,543,550,558,566],{"type":59,"tag":241,"props":536,"children":537},{"class":243,"line":244},[538],{"type":59,"tag":241,"props":539,"children":540},{},[541],{"type":65,"value":542},"from cosmos import RenderConfig, LoadMode\n",{"type":59,"tag":241,"props":544,"children":545},{"class":243,"line":253},[546],{"type":59,"tag":241,"props":547,"children":548},{"emptyLinePlaceholder":257},[549],{"type":65,"value":260},{"type":59,"tag":241,"props":551,"children":552},{"class":243,"line":263},[553],{"type":59,"tag":241,"props":554,"children":555},{},[556],{"type":65,"value":557},"_render_config = RenderConfig(\n",{"type":59,"tag":241,"props":559,"children":560},{"class":243,"line":272},[561],{"type":59,"tag":241,"props":562,"children":563},{},[564],{"type":65,"value":565},"    load_method=LoadMode.DBT_MANIFEST,  # or DBT_LS, DBT_LS_FILE, AUTOMATIC\n",{"type":59,"tag":241,"props":567,"children":568},{"class":243,"line":281},[569],{"type":59,"tag":241,"props":570,"children":571},{},[572],{"type":65,"value":314},{"type":59,"tag":127,"props":574,"children":575},{},[],{"type":59,"tag":131,"props":577,"children":579},{"id":578},"_3-choose-execution-mode-executionconfig",[580],{"type":65,"value":581},"3. Choose Execution Mode (ExecutionConfig)",{"type":59,"tag":74,"props":583,"children":584},{},[585],{"type":59,"tag":68,"props":586,"children":587},{},[588,592,594,603],{"type":59,"tag":81,"props":589,"children":590},{},[591],{"type":65,"value":95},{"type":65,"value":593},": See ",{"type":59,"tag":81,"props":595,"children":596},{},[597],{"type":59,"tag":99,"props":598,"children":600},{"href":599},"reference\u002Fcosmos-config.md#execution-modes-executionconfig",[601],{"type":65,"value":602},"reference\u002Fcosmos-config.md",{"type":65,"value":604}," for detailed configuration examples per mode.",{"type":59,"tag":68,"props":606,"children":607},{},[608],{"type":65,"value":609},"Pick ONE execution mode:",{"type":59,"tag":138,"props":611,"children":612},{},[613,638],{"type":59,"tag":142,"props":614,"children":615},{},[616],{"type":59,"tag":146,"props":617,"children":618},{},[619,624,628,633],{"type":59,"tag":150,"props":620,"children":621},{},[622],{"type":65,"value":623},"Execution mode",{"type":59,"tag":150,"props":625,"children":626},{},[627],{"type":65,"value":159},{"type":59,"tag":150,"props":629,"children":630},{},[631],{"type":65,"value":632},"Speed",{"type":59,"tag":150,"props":634,"children":635},{},[636],{"type":65,"value":637},"Required setup",{"type":59,"tag":166,"props":639,"children":640},{},[641,683,716,755,791,817,841,874],{"type":59,"tag":146,"props":642,"children":643},{},[644,653,666,671],{"type":59,"tag":173,"props":645,"children":646},{},[647],{"type":59,"tag":187,"props":648,"children":650},{"className":649},[],[651],{"type":65,"value":652},"WATCHER",{"type":59,"tag":173,"props":654,"children":655},{},[656,658,664],{"type":65,"value":657},"Fastest; single ",{"type":59,"tag":187,"props":659,"children":661},{"className":660},[],[662],{"type":65,"value":663},"dbt build",{"type":65,"value":665}," visibility",{"type":59,"tag":173,"props":667,"children":668},{},[669],{"type":65,"value":670},"Fastest",{"type":59,"tag":173,"props":672,"children":673},{},[674,676,681],{"type":65,"value":675},"dbt adapter in env OR ",{"type":59,"tag":187,"props":677,"children":679},{"className":678},[],[680],{"type":65,"value":420},{"type":65,"value":682}," or dbt Fusion",{"type":59,"tag":146,"props":684,"children":685},{},[686,695,706,711],{"type":59,"tag":173,"props":687,"children":688},{},[689],{"type":59,"tag":187,"props":690,"children":692},{"className":691},[],[693],{"type":65,"value":694},"WATCHER_KUBERNETES",{"type":59,"tag":173,"props":696,"children":697},{},[698,700,705],{"type":65,"value":699},"Fastest isolated method; single ",{"type":59,"tag":187,"props":701,"children":703},{"className":702},[],[704],{"type":65,"value":663},{"type":65,"value":665},{"type":59,"tag":173,"props":707,"children":708},{},[709],{"type":65,"value":710},"Fast",{"type":59,"tag":173,"props":712,"children":713},{},[714],{"type":65,"value":715},"dbt installed in container",{"type":59,"tag":146,"props":717,"children":718},{},[719,735,740,744],{"type":59,"tag":173,"props":720,"children":721},{},[722,728,729],{"type":59,"tag":187,"props":723,"children":725},{"className":724},[],[726],{"type":65,"value":727},"LOCAL",{"type":65,"value":222},{"type":59,"tag":187,"props":730,"children":732},{"className":731},[],[733],{"type":65,"value":734},"DBT_RUNNER",{"type":59,"tag":173,"props":736,"children":737},{},[738],{"type":65,"value":739},"dbt + adapter in the same Python installation as Airflow",{"type":59,"tag":173,"props":741,"children":742},{},[743],{"type":65,"value":710},{"type":59,"tag":173,"props":745,"children":746},{},[747,749],{"type":65,"value":748},"dbt 1.5+ in ",{"type":59,"tag":187,"props":750,"children":752},{"className":751},[],[753],{"type":65,"value":754},"requirements.txt",{"type":59,"tag":146,"props":756,"children":757},{},[758,773,778,783],{"type":59,"tag":173,"props":759,"children":760},{},[761,766,767],{"type":59,"tag":187,"props":762,"children":764},{"className":763},[],[765],{"type":65,"value":727},{"type":65,"value":222},{"type":59,"tag":187,"props":768,"children":770},{"className":769},[],[771],{"type":65,"value":772},"SUBPROCESS",{"type":59,"tag":173,"props":774,"children":775},{},[776],{"type":65,"value":777},"dbt + adapter available in the Airflow deployment, in an isolated Python installation",{"type":59,"tag":173,"props":779,"children":780},{},[781],{"type":65,"value":782},"Medium",{"type":59,"tag":173,"props":784,"children":785},{},[786],{"type":59,"tag":187,"props":787,"children":789},{"className":788},[],[790],{"type":65,"value":420},{"type":59,"tag":146,"props":792,"children":793},{},[794,803,808,812],{"type":59,"tag":173,"props":795,"children":796},{},[797],{"type":59,"tag":187,"props":798,"children":800},{"className":799},[],[801],{"type":65,"value":802},"AIRFLOW_ASYNC",{"type":59,"tag":173,"props":804,"children":805},{},[806],{"type":65,"value":807},"BigQuery + long-running transforms",{"type":59,"tag":173,"props":809,"children":810},{},[811],{"type":65,"value":710},{"type":59,"tag":173,"props":813,"children":814},{},[815],{"type":65,"value":816},"Airflow ≥2.8; provider deps",{"type":59,"tag":146,"props":818,"children":819},{},[820,828,833,837],{"type":59,"tag":173,"props":821,"children":822},{},[823],{"type":59,"tag":187,"props":824,"children":826},{"className":825},[],[827],{"type":65,"value":525},{"type":59,"tag":173,"props":829,"children":830},{},[831],{"type":65,"value":832},"Isolation between Airflow and dbt",{"type":59,"tag":173,"props":834,"children":835},{},[836],{"type":65,"value":782},{"type":59,"tag":173,"props":838,"children":839},{},[840],{"type":65,"value":816},{"type":59,"tag":146,"props":842,"children":843},{},[844,853,858,863],{"type":59,"tag":173,"props":845,"children":846},{},[847],{"type":59,"tag":187,"props":848,"children":850},{"className":849},[],[851],{"type":65,"value":852},"VIRTUALENV",{"type":59,"tag":173,"props":854,"children":855},{},[856],{"type":65,"value":857},"Can't modify image; runtime venv",{"type":59,"tag":173,"props":859,"children":860},{},[861],{"type":65,"value":862},"Slower",{"type":59,"tag":173,"props":864,"children":865},{},[866,872],{"type":59,"tag":187,"props":867,"children":869},{"className":868},[],[870],{"type":65,"value":871},"py_requirements",{"type":65,"value":873}," in operator_args",{"type":59,"tag":146,"props":875,"children":876},{},[877,882,887,891],{"type":59,"tag":173,"props":878,"children":879},{},[880],{"type":65,"value":881},"Other containerized approaches",{"type":59,"tag":173,"props":883,"children":884},{},[885],{"type":65,"value":886},"Support Airflow and dbt isolation",{"type":59,"tag":173,"props":888,"children":889},{},[890],{"type":65,"value":782},{"type":59,"tag":173,"props":892,"children":893},{},[894],{"type":65,"value":895},"container config",{"type":59,"tag":230,"props":897,"children":899},{"className":232,"code":898,"language":234,"meta":235,"style":235},"from cosmos import ExecutionConfig, ExecutionMode\n\n_execution_config = ExecutionConfig(\n    execution_mode=ExecutionMode.WATCHER,  # or LOCAL, VIRTUALENV, AIRFLOW_ASYNC, KUBERNETES, etc.\n)\n",[900],{"type":59,"tag":187,"props":901,"children":902},{"__ignoreMap":235},[903,911,918,926,934],{"type":59,"tag":241,"props":904,"children":905},{"class":243,"line":244},[906],{"type":59,"tag":241,"props":907,"children":908},{},[909],{"type":65,"value":910},"from cosmos import ExecutionConfig, ExecutionMode\n",{"type":59,"tag":241,"props":912,"children":913},{"class":243,"line":253},[914],{"type":59,"tag":241,"props":915,"children":916},{"emptyLinePlaceholder":257},[917],{"type":65,"value":260},{"type":59,"tag":241,"props":919,"children":920},{"class":243,"line":263},[921],{"type":59,"tag":241,"props":922,"children":923},{},[924],{"type":65,"value":925},"_execution_config = ExecutionConfig(\n",{"type":59,"tag":241,"props":927,"children":928},{"class":243,"line":272},[929],{"type":59,"tag":241,"props":930,"children":931},{},[932],{"type":65,"value":933},"    execution_mode=ExecutionMode.WATCHER,  # or LOCAL, VIRTUALENV, AIRFLOW_ASYNC, KUBERNETES, etc.\n",{"type":59,"tag":241,"props":935,"children":936},{"class":243,"line":281},[937],{"type":59,"tag":241,"props":938,"children":939},{},[940],{"type":65,"value":314},{"type":59,"tag":127,"props":942,"children":943},{},[],{"type":59,"tag":131,"props":945,"children":947},{"id":946},"_4-configure-warehouse-connection-profileconfig",[948],{"type":65,"value":949},"4. Configure Warehouse Connection (ProfileConfig)",{"type":59,"tag":74,"props":951,"children":952},{},[953],{"type":59,"tag":68,"props":954,"children":955},{},[956,960,961,969],{"type":59,"tag":81,"props":957,"children":958},{},[959],{"type":65,"value":95},{"type":65,"value":593},{"type":59,"tag":81,"props":962,"children":963},{},[964],{"type":59,"tag":99,"props":965,"children":967},{"href":966},"reference\u002Fcosmos-config.md#profileconfig-warehouse-connection",[968],{"type":65,"value":602},{"type":65,"value":970}," for detailed ProfileConfig options and all ProfileMapping classes.",{"type":59,"tag":972,"props":973,"children":975},"h3",{"id":974},"option-a-airflow-connection-profilemapping-recommended",[976],{"type":65,"value":977},"Option A: Airflow Connection + ProfileMapping (Recommended)",{"type":59,"tag":230,"props":979,"children":981},{"className":232,"code":980,"language":234,"meta":235,"style":235},"from cosmos import ProfileConfig\nfrom cosmos.profiles import SnowflakeUserPasswordProfileMapping\n\n_profile_config = ProfileConfig(\n    profile_name=\"default\",\n    target_name=\"dev\",\n    profile_mapping=SnowflakeUserPasswordProfileMapping(\n        conn_id=\"snowflake_default\",\n        profile_args={\"schema\": \"my_schema\"},\n    ),\n)\n",[982],{"type":59,"tag":187,"props":983,"children":984},{"__ignoreMap":235},[985,993,1001,1008,1016,1024,1032,1040,1048,1057,1066],{"type":59,"tag":241,"props":986,"children":987},{"class":243,"line":244},[988],{"type":59,"tag":241,"props":989,"children":990},{},[991],{"type":65,"value":992},"from cosmos import ProfileConfig\n",{"type":59,"tag":241,"props":994,"children":995},{"class":243,"line":253},[996],{"type":59,"tag":241,"props":997,"children":998},{},[999],{"type":65,"value":1000},"from cosmos.profiles import SnowflakeUserPasswordProfileMapping\n",{"type":59,"tag":241,"props":1002,"children":1003},{"class":243,"line":263},[1004],{"type":59,"tag":241,"props":1005,"children":1006},{"emptyLinePlaceholder":257},[1007],{"type":65,"value":260},{"type":59,"tag":241,"props":1009,"children":1010},{"class":243,"line":272},[1011],{"type":59,"tag":241,"props":1012,"children":1013},{},[1014],{"type":65,"value":1015},"_profile_config = ProfileConfig(\n",{"type":59,"tag":241,"props":1017,"children":1018},{"class":243,"line":281},[1019],{"type":59,"tag":241,"props":1020,"children":1021},{},[1022],{"type":65,"value":1023},"    profile_name=\"default\",\n",{"type":59,"tag":241,"props":1025,"children":1026},{"class":243,"line":290},[1027],{"type":59,"tag":241,"props":1028,"children":1029},{},[1030],{"type":65,"value":1031},"    target_name=\"dev\",\n",{"type":59,"tag":241,"props":1033,"children":1034},{"class":243,"line":299},[1035],{"type":59,"tag":241,"props":1036,"children":1037},{},[1038],{"type":65,"value":1039},"    profile_mapping=SnowflakeUserPasswordProfileMapping(\n",{"type":59,"tag":241,"props":1041,"children":1042},{"class":243,"line":308},[1043],{"type":59,"tag":241,"props":1044,"children":1045},{},[1046],{"type":65,"value":1047},"        conn_id=\"snowflake_default\",\n",{"type":59,"tag":241,"props":1049,"children":1051},{"class":243,"line":1050},9,[1052],{"type":59,"tag":241,"props":1053,"children":1054},{},[1055],{"type":65,"value":1056},"        profile_args={\"schema\": \"my_schema\"},\n",{"type":59,"tag":241,"props":1058,"children":1060},{"class":243,"line":1059},10,[1061],{"type":59,"tag":241,"props":1062,"children":1063},{},[1064],{"type":65,"value":1065},"    ),\n",{"type":59,"tag":241,"props":1067,"children":1069},{"class":243,"line":1068},11,[1070],{"type":59,"tag":241,"props":1071,"children":1072},{},[1073],{"type":65,"value":314},{"type":59,"tag":972,"props":1075,"children":1077},{"id":1076},"option-b-existing-profilesyml",[1078],{"type":65,"value":1079},"Option B: Existing profiles.yml",{"type":59,"tag":74,"props":1081,"children":1082},{},[1083],{"type":59,"tag":68,"props":1084,"children":1085},{},[1086,1090],{"type":59,"tag":81,"props":1087,"children":1088},{},[1089],{"type":65,"value":510},{"type":65,"value":1091},": Do not hardcode secrets; use environment variables.",{"type":59,"tag":230,"props":1093,"children":1095},{"className":232,"code":1094,"language":234,"meta":235,"style":235},"from cosmos import ProfileConfig\n\n_profile_config = ProfileConfig(\n    profile_name=\"my_profile\",\n    target_name=\"dev\",\n    profiles_yml_filepath=\"\u002Fpath\u002Fto\u002Fprofiles.yml\",\n)\n",[1096],{"type":59,"tag":187,"props":1097,"children":1098},{"__ignoreMap":235},[1099,1106,1113,1120,1128,1135,1143],{"type":59,"tag":241,"props":1100,"children":1101},{"class":243,"line":244},[1102],{"type":59,"tag":241,"props":1103,"children":1104},{},[1105],{"type":65,"value":992},{"type":59,"tag":241,"props":1107,"children":1108},{"class":243,"line":253},[1109],{"type":59,"tag":241,"props":1110,"children":1111},{"emptyLinePlaceholder":257},[1112],{"type":65,"value":260},{"type":59,"tag":241,"props":1114,"children":1115},{"class":243,"line":263},[1116],{"type":59,"tag":241,"props":1117,"children":1118},{},[1119],{"type":65,"value":1015},{"type":59,"tag":241,"props":1121,"children":1122},{"class":243,"line":272},[1123],{"type":59,"tag":241,"props":1124,"children":1125},{},[1126],{"type":65,"value":1127},"    profile_name=\"my_profile\",\n",{"type":59,"tag":241,"props":1129,"children":1130},{"class":243,"line":281},[1131],{"type":59,"tag":241,"props":1132,"children":1133},{},[1134],{"type":65,"value":1031},{"type":59,"tag":241,"props":1136,"children":1137},{"class":243,"line":290},[1138],{"type":59,"tag":241,"props":1139,"children":1140},{},[1141],{"type":65,"value":1142},"    profiles_yml_filepath=\"\u002Fpath\u002Fto\u002Fprofiles.yml\",\n",{"type":59,"tag":241,"props":1144,"children":1145},{"class":243,"line":299},[1146],{"type":59,"tag":241,"props":1147,"children":1148},{},[1149],{"type":65,"value":314},{"type":59,"tag":127,"props":1151,"children":1152},{},[],{"type":59,"tag":131,"props":1154,"children":1156},{"id":1155},"_5-configure-testing-behavior-renderconfig",[1157],{"type":65,"value":1158},"5. Configure Testing Behavior (RenderConfig)",{"type":59,"tag":74,"props":1160,"children":1161},{},[1162],{"type":59,"tag":68,"props":1163,"children":1164},{},[1165,1169,1170,1178],{"type":59,"tag":81,"props":1166,"children":1167},{},[1168],{"type":65,"value":95},{"type":65,"value":593},{"type":59,"tag":81,"props":1171,"children":1172},{},[1173],{"type":59,"tag":99,"props":1174,"children":1176},{"href":1175},"reference\u002Fcosmos-config.md#testing-behavior-renderconfig",[1177],{"type":65,"value":602},{"type":65,"value":1179}," for detailed testing options.",{"type":59,"tag":138,"props":1181,"children":1182},{},[1183,1199],{"type":59,"tag":142,"props":1184,"children":1185},{},[1186],{"type":59,"tag":146,"props":1187,"children":1188},{},[1189,1194],{"type":59,"tag":150,"props":1190,"children":1191},{},[1192],{"type":65,"value":1193},"TestBehavior",{"type":59,"tag":150,"props":1195,"children":1196},{},[1197],{"type":65,"value":1198},"Behavior",{"type":59,"tag":166,"props":1200,"children":1201},{},[1202,1220,1242,1259],{"type":59,"tag":146,"props":1203,"children":1204},{},[1205,1215],{"type":59,"tag":173,"props":1206,"children":1207},{},[1208,1214],{"type":59,"tag":187,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":65,"value":1213},"AFTER_EACH",{"type":65,"value":484},{"type":59,"tag":173,"props":1216,"children":1217},{},[1218],{"type":65,"value":1219},"Tests run immediately after each model (default)",{"type":59,"tag":146,"props":1221,"children":1222},{},[1223,1232],{"type":59,"tag":173,"props":1224,"children":1225},{},[1226],{"type":59,"tag":187,"props":1227,"children":1229},{"className":1228},[],[1230],{"type":65,"value":1231},"BUILD",{"type":59,"tag":173,"props":1233,"children":1234},{},[1235,1237],{"type":65,"value":1236},"Combine run + test into single ",{"type":59,"tag":187,"props":1238,"children":1240},{"className":1239},[],[1241],{"type":65,"value":663},{"type":59,"tag":146,"props":1243,"children":1244},{},[1245,1254],{"type":59,"tag":173,"props":1246,"children":1247},{},[1248],{"type":59,"tag":187,"props":1249,"children":1251},{"className":1250},[],[1252],{"type":65,"value":1253},"AFTER_ALL",{"type":59,"tag":173,"props":1255,"children":1256},{},[1257],{"type":65,"value":1258},"All tests after all models complete",{"type":59,"tag":146,"props":1260,"children":1261},{},[1262,1271],{"type":59,"tag":173,"props":1263,"children":1264},{},[1265],{"type":59,"tag":187,"props":1266,"children":1268},{"className":1267},[],[1269],{"type":65,"value":1270},"NONE",{"type":59,"tag":173,"props":1272,"children":1273},{},[1274],{"type":65,"value":1275},"Skip tests",{"type":59,"tag":230,"props":1277,"children":1279},{"className":232,"code":1278,"language":234,"meta":235,"style":235},"from cosmos import RenderConfig, TestBehavior\n\n_render_config = RenderConfig(\n    test_behavior=TestBehavior.AFTER_EACH,\n)\n",[1280],{"type":59,"tag":187,"props":1281,"children":1282},{"__ignoreMap":235},[1283,1291,1298,1305,1313],{"type":59,"tag":241,"props":1284,"children":1285},{"class":243,"line":244},[1286],{"type":59,"tag":241,"props":1287,"children":1288},{},[1289],{"type":65,"value":1290},"from cosmos import RenderConfig, TestBehavior\n",{"type":59,"tag":241,"props":1292,"children":1293},{"class":243,"line":253},[1294],{"type":59,"tag":241,"props":1295,"children":1296},{"emptyLinePlaceholder":257},[1297],{"type":65,"value":260},{"type":59,"tag":241,"props":1299,"children":1300},{"class":243,"line":263},[1301],{"type":59,"tag":241,"props":1302,"children":1303},{},[1304],{"type":65,"value":557},{"type":59,"tag":241,"props":1306,"children":1307},{"class":243,"line":272},[1308],{"type":59,"tag":241,"props":1309,"children":1310},{},[1311],{"type":65,"value":1312},"    test_behavior=TestBehavior.AFTER_EACH,\n",{"type":59,"tag":241,"props":1314,"children":1315},{"class":243,"line":281},[1316],{"type":59,"tag":241,"props":1317,"children":1318},{},[1319],{"type":65,"value":314},{"type":59,"tag":127,"props":1321,"children":1322},{},[],{"type":59,"tag":131,"props":1324,"children":1326},{"id":1325},"_6-configure-operator_args",[1327],{"type":65,"value":1328},"6. Configure operator_args",{"type":59,"tag":74,"props":1330,"children":1331},{},[1332],{"type":59,"tag":68,"props":1333,"children":1334},{},[1335,1339,1340,1348],{"type":59,"tag":81,"props":1336,"children":1337},{},[1338],{"type":65,"value":95},{"type":65,"value":593},{"type":59,"tag":81,"props":1341,"children":1342},{},[1343],{"type":59,"tag":99,"props":1344,"children":1346},{"href":1345},"reference\u002Fcosmos-config.md#operator_args-configuration",[1347],{"type":65,"value":602},{"type":65,"value":1349}," for detailed operator_args options.",{"type":59,"tag":230,"props":1351,"children":1353},{"className":232,"code":1352,"language":234,"meta":235,"style":235},"_operator_args = {\n    # BaseOperator params\n    \"retries\": 3,\n\n    # Cosmos-specific params\n    \"install_deps\": False,\n    \"full_refresh\": False,\n    \"quiet\": True,\n\n    # Runtime dbt vars (XCom \u002F params)\n    \"vars\": '{\"my_var\": \"{{ ti.xcom_pull(task_ids=\\'pre_dbt\\') }}\"}',\n}\n",[1354],{"type":59,"tag":187,"props":1355,"children":1356},{"__ignoreMap":235},[1357,1365,1373,1381,1388,1396,1404,1412,1420,1427,1435,1443],{"type":59,"tag":241,"props":1358,"children":1359},{"class":243,"line":244},[1360],{"type":59,"tag":241,"props":1361,"children":1362},{},[1363],{"type":65,"value":1364},"_operator_args = {\n",{"type":59,"tag":241,"props":1366,"children":1367},{"class":243,"line":253},[1368],{"type":59,"tag":241,"props":1369,"children":1370},{},[1371],{"type":65,"value":1372},"    # BaseOperator params\n",{"type":59,"tag":241,"props":1374,"children":1375},{"class":243,"line":263},[1376],{"type":59,"tag":241,"props":1377,"children":1378},{},[1379],{"type":65,"value":1380},"    \"retries\": 3,\n",{"type":59,"tag":241,"props":1382,"children":1383},{"class":243,"line":272},[1384],{"type":59,"tag":241,"props":1385,"children":1386},{"emptyLinePlaceholder":257},[1387],{"type":65,"value":260},{"type":59,"tag":241,"props":1389,"children":1390},{"class":243,"line":281},[1391],{"type":59,"tag":241,"props":1392,"children":1393},{},[1394],{"type":65,"value":1395},"    # Cosmos-specific params\n",{"type":59,"tag":241,"props":1397,"children":1398},{"class":243,"line":290},[1399],{"type":59,"tag":241,"props":1400,"children":1401},{},[1402],{"type":65,"value":1403},"    \"install_deps\": False,\n",{"type":59,"tag":241,"props":1405,"children":1406},{"class":243,"line":299},[1407],{"type":59,"tag":241,"props":1408,"children":1409},{},[1410],{"type":65,"value":1411},"    \"full_refresh\": False,\n",{"type":59,"tag":241,"props":1413,"children":1414},{"class":243,"line":308},[1415],{"type":59,"tag":241,"props":1416,"children":1417},{},[1418],{"type":65,"value":1419},"    \"quiet\": True,\n",{"type":59,"tag":241,"props":1421,"children":1422},{"class":243,"line":1050},[1423],{"type":59,"tag":241,"props":1424,"children":1425},{"emptyLinePlaceholder":257},[1426],{"type":65,"value":260},{"type":59,"tag":241,"props":1428,"children":1429},{"class":243,"line":1059},[1430],{"type":59,"tag":241,"props":1431,"children":1432},{},[1433],{"type":65,"value":1434},"    # Runtime dbt vars (XCom \u002F params)\n",{"type":59,"tag":241,"props":1436,"children":1437},{"class":243,"line":1068},[1438],{"type":59,"tag":241,"props":1439,"children":1440},{},[1441],{"type":65,"value":1442},"    \"vars\": '{\"my_var\": \"{{ ti.xcom_pull(task_ids=\\'pre_dbt\\') }}\"}',\n",{"type":59,"tag":241,"props":1444,"children":1446},{"class":243,"line":1445},12,[1447],{"type":59,"tag":241,"props":1448,"children":1449},{},[1450],{"type":65,"value":1451},"}\n",{"type":59,"tag":127,"props":1453,"children":1454},{},[],{"type":59,"tag":131,"props":1456,"children":1458},{"id":1457},"_7-assemble-dag-taskgroup",[1459],{"type":65,"value":1460},"7. Assemble DAG \u002F TaskGroup",{"type":59,"tag":972,"props":1462,"children":1464},{"id":1463},"option-a-dbtdag-standalone",[1465],{"type":65,"value":1466},"Option A: DbtDag (Standalone)",{"type":59,"tag":230,"props":1468,"children":1470},{"className":232,"code":1469,"language":234,"meta":235,"style":235},"from cosmos import DbtDag, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig\nfrom cosmos.profiles import SnowflakeUserPasswordProfileMapping\nfrom pendulum import datetime\n\n_project_config = ProjectConfig(\n    dbt_project_path=\"\u002Fusr\u002Flocal\u002Fairflow\u002Fdbt\u002Fmy_project\",\n)\n\n_profile_config = ProfileConfig(\n    profile_name=\"default\",\n    target_name=\"dev\",\n    profile_mapping=SnowflakeUserPasswordProfileMapping(\n        conn_id=\"snowflake_default\",\n    ),\n)\n\n_execution_config = ExecutionConfig()\n_render_config = RenderConfig()\n\nmy_cosmos_dag = DbtDag(\n    dag_id=\"my_cosmos_dag\",\n    project_config=_project_config,\n    profile_config=_profile_config,\n    execution_config=_execution_config,\n    render_config=_render_config,\n    operator_args={},\n    start_date=datetime(2025, 1, 1),\n    schedule=\"@daily\",\n)\n",[1471],{"type":59,"tag":187,"props":1472,"children":1473},{"__ignoreMap":235},[1474,1482,1489,1497,1504,1511,1519,1526,1533,1540,1547,1554,1561,1569,1577,1585,1593,1602,1611,1619,1628,1637,1646,1655,1664,1673,1682,1691,1700],{"type":59,"tag":241,"props":1475,"children":1476},{"class":243,"line":244},[1477],{"type":59,"tag":241,"props":1478,"children":1479},{},[1480],{"type":65,"value":1481},"from cosmos import DbtDag, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig\n",{"type":59,"tag":241,"props":1483,"children":1484},{"class":243,"line":253},[1485],{"type":59,"tag":241,"props":1486,"children":1487},{},[1488],{"type":65,"value":1000},{"type":59,"tag":241,"props":1490,"children":1491},{"class":243,"line":263},[1492],{"type":59,"tag":241,"props":1493,"children":1494},{},[1495],{"type":65,"value":1496},"from pendulum import datetime\n",{"type":59,"tag":241,"props":1498,"children":1499},{"class":243,"line":272},[1500],{"type":59,"tag":241,"props":1501,"children":1502},{"emptyLinePlaceholder":257},[1503],{"type":65,"value":260},{"type":59,"tag":241,"props":1505,"children":1506},{"class":243,"line":281},[1507],{"type":59,"tag":241,"props":1508,"children":1509},{},[1510],{"type":65,"value":269},{"type":59,"tag":241,"props":1512,"children":1513},{"class":243,"line":290},[1514],{"type":59,"tag":241,"props":1515,"children":1516},{},[1517],{"type":65,"value":1518},"    dbt_project_path=\"\u002Fusr\u002Flocal\u002Fairflow\u002Fdbt\u002Fmy_project\",\n",{"type":59,"tag":241,"props":1520,"children":1521},{"class":243,"line":299},[1522],{"type":59,"tag":241,"props":1523,"children":1524},{},[1525],{"type":65,"value":314},{"type":59,"tag":241,"props":1527,"children":1528},{"class":243,"line":308},[1529],{"type":59,"tag":241,"props":1530,"children":1531},{"emptyLinePlaceholder":257},[1532],{"type":65,"value":260},{"type":59,"tag":241,"props":1534,"children":1535},{"class":243,"line":1050},[1536],{"type":59,"tag":241,"props":1537,"children":1538},{},[1539],{"type":65,"value":1015},{"type":59,"tag":241,"props":1541,"children":1542},{"class":243,"line":1059},[1543],{"type":59,"tag":241,"props":1544,"children":1545},{},[1546],{"type":65,"value":1023},{"type":59,"tag":241,"props":1548,"children":1549},{"class":243,"line":1068},[1550],{"type":59,"tag":241,"props":1551,"children":1552},{},[1553],{"type":65,"value":1031},{"type":59,"tag":241,"props":1555,"children":1556},{"class":243,"line":1445},[1557],{"type":59,"tag":241,"props":1558,"children":1559},{},[1560],{"type":65,"value":1039},{"type":59,"tag":241,"props":1562,"children":1564},{"class":243,"line":1563},13,[1565],{"type":59,"tag":241,"props":1566,"children":1567},{},[1568],{"type":65,"value":1047},{"type":59,"tag":241,"props":1570,"children":1572},{"class":243,"line":1571},14,[1573],{"type":59,"tag":241,"props":1574,"children":1575},{},[1576],{"type":65,"value":1065},{"type":59,"tag":241,"props":1578,"children":1580},{"class":243,"line":1579},15,[1581],{"type":59,"tag":241,"props":1582,"children":1583},{},[1584],{"type":65,"value":314},{"type":59,"tag":241,"props":1586,"children":1588},{"class":243,"line":1587},16,[1589],{"type":59,"tag":241,"props":1590,"children":1591},{"emptyLinePlaceholder":257},[1592],{"type":65,"value":260},{"type":59,"tag":241,"props":1594,"children":1596},{"class":243,"line":1595},17,[1597],{"type":59,"tag":241,"props":1598,"children":1599},{},[1600],{"type":65,"value":1601},"_execution_config = ExecutionConfig()\n",{"type":59,"tag":241,"props":1603,"children":1605},{"class":243,"line":1604},18,[1606],{"type":59,"tag":241,"props":1607,"children":1608},{},[1609],{"type":65,"value":1610},"_render_config = RenderConfig()\n",{"type":59,"tag":241,"props":1612,"children":1614},{"class":243,"line":1613},19,[1615],{"type":59,"tag":241,"props":1616,"children":1617},{"emptyLinePlaceholder":257},[1618],{"type":65,"value":260},{"type":59,"tag":241,"props":1620,"children":1622},{"class":243,"line":1621},20,[1623],{"type":59,"tag":241,"props":1624,"children":1625},{},[1626],{"type":65,"value":1627},"my_cosmos_dag = DbtDag(\n",{"type":59,"tag":241,"props":1629,"children":1631},{"class":243,"line":1630},21,[1632],{"type":59,"tag":241,"props":1633,"children":1634},{},[1635],{"type":65,"value":1636},"    dag_id=\"my_cosmos_dag\",\n",{"type":59,"tag":241,"props":1638,"children":1640},{"class":243,"line":1639},22,[1641],{"type":59,"tag":241,"props":1642,"children":1643},{},[1644],{"type":65,"value":1645},"    project_config=_project_config,\n",{"type":59,"tag":241,"props":1647,"children":1649},{"class":243,"line":1648},23,[1650],{"type":59,"tag":241,"props":1651,"children":1652},{},[1653],{"type":65,"value":1654},"    profile_config=_profile_config,\n",{"type":59,"tag":241,"props":1656,"children":1658},{"class":243,"line":1657},24,[1659],{"type":59,"tag":241,"props":1660,"children":1661},{},[1662],{"type":65,"value":1663},"    execution_config=_execution_config,\n",{"type":59,"tag":241,"props":1665,"children":1667},{"class":243,"line":1666},25,[1668],{"type":59,"tag":241,"props":1669,"children":1670},{},[1671],{"type":65,"value":1672},"    render_config=_render_config,\n",{"type":59,"tag":241,"props":1674,"children":1676},{"class":243,"line":1675},26,[1677],{"type":59,"tag":241,"props":1678,"children":1679},{},[1680],{"type":65,"value":1681},"    operator_args={},\n",{"type":59,"tag":241,"props":1683,"children":1685},{"class":243,"line":1684},27,[1686],{"type":59,"tag":241,"props":1687,"children":1688},{},[1689],{"type":65,"value":1690},"    start_date=datetime(2025, 1, 1),\n",{"type":59,"tag":241,"props":1692,"children":1694},{"class":243,"line":1693},28,[1695],{"type":59,"tag":241,"props":1696,"children":1697},{},[1698],{"type":65,"value":1699},"    schedule=\"@daily\",\n",{"type":59,"tag":241,"props":1701,"children":1703},{"class":243,"line":1702},29,[1704],{"type":59,"tag":241,"props":1705,"children":1706},{},[1707],{"type":65,"value":314},{"type":59,"tag":972,"props":1709,"children":1711},{"id":1710},"option-b-dbttaskgroup-inside-existing-dag",[1712],{"type":65,"value":1713},"Option B: DbtTaskGroup (Inside Existing DAG)",{"type":59,"tag":230,"props":1715,"children":1717},{"className":232,"code":1716,"language":234,"meta":235,"style":235},"from airflow.sdk import dag, task  # Airflow 3.x\n# from airflow.decorators import dag, task  # Airflow 2.x\nfrom airflow.models.baseoperator import chain\nfrom cosmos import DbtTaskGroup, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig\nfrom pendulum import datetime\n\n_project_config = ProjectConfig(dbt_project_path=\"\u002Fusr\u002Flocal\u002Fairflow\u002Fdbt\u002Fmy_project\")\n_profile_config = ProfileConfig(profile_name=\"default\", target_name=\"dev\")\n_execution_config = ExecutionConfig()\n_render_config = RenderConfig()\n\n@dag(start_date=datetime(2025, 1, 1), schedule=\"@daily\")\ndef my_dag():\n    @task\n    def pre_dbt():\n        return \"some_value\"\n\n    dbt = DbtTaskGroup(\n        group_id=\"dbt_project\",\n        project_config=_project_config,\n        profile_config=_profile_config,\n        execution_config=_execution_config,\n        render_config=_render_config,\n    )\n\n    @task\n    def post_dbt():\n        pass\n\n    chain(pre_dbt(), dbt, post_dbt())\n\nmy_dag()\n",[1718],{"type":59,"tag":187,"props":1719,"children":1720},{"__ignoreMap":235},[1721,1729,1737,1745,1753,1760,1767,1775,1783,1790,1797,1804,1812,1820,1828,1836,1844,1851,1859,1867,1875,1883,1891,1899,1907,1914,1921,1929,1937,1944,1953,1961],{"type":59,"tag":241,"props":1722,"children":1723},{"class":243,"line":244},[1724],{"type":59,"tag":241,"props":1725,"children":1726},{},[1727],{"type":65,"value":1728},"from airflow.sdk import dag, task  # Airflow 3.x\n",{"type":59,"tag":241,"props":1730,"children":1731},{"class":243,"line":253},[1732],{"type":59,"tag":241,"props":1733,"children":1734},{},[1735],{"type":65,"value":1736},"# from airflow.decorators import dag, task  # Airflow 2.x\n",{"type":59,"tag":241,"props":1738,"children":1739},{"class":243,"line":263},[1740],{"type":59,"tag":241,"props":1741,"children":1742},{},[1743],{"type":65,"value":1744},"from airflow.models.baseoperator import chain\n",{"type":59,"tag":241,"props":1746,"children":1747},{"class":243,"line":272},[1748],{"type":59,"tag":241,"props":1749,"children":1750},{},[1751],{"type":65,"value":1752},"from cosmos import DbtTaskGroup, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig\n",{"type":59,"tag":241,"props":1754,"children":1755},{"class":243,"line":281},[1756],{"type":59,"tag":241,"props":1757,"children":1758},{},[1759],{"type":65,"value":1496},{"type":59,"tag":241,"props":1761,"children":1762},{"class":243,"line":290},[1763],{"type":59,"tag":241,"props":1764,"children":1765},{"emptyLinePlaceholder":257},[1766],{"type":65,"value":260},{"type":59,"tag":241,"props":1768,"children":1769},{"class":243,"line":299},[1770],{"type":59,"tag":241,"props":1771,"children":1772},{},[1773],{"type":65,"value":1774},"_project_config = ProjectConfig(dbt_project_path=\"\u002Fusr\u002Flocal\u002Fairflow\u002Fdbt\u002Fmy_project\")\n",{"type":59,"tag":241,"props":1776,"children":1777},{"class":243,"line":308},[1778],{"type":59,"tag":241,"props":1779,"children":1780},{},[1781],{"type":65,"value":1782},"_profile_config = ProfileConfig(profile_name=\"default\", target_name=\"dev\")\n",{"type":59,"tag":241,"props":1784,"children":1785},{"class":243,"line":1050},[1786],{"type":59,"tag":241,"props":1787,"children":1788},{},[1789],{"type":65,"value":1601},{"type":59,"tag":241,"props":1791,"children":1792},{"class":243,"line":1059},[1793],{"type":59,"tag":241,"props":1794,"children":1795},{},[1796],{"type":65,"value":1610},{"type":59,"tag":241,"props":1798,"children":1799},{"class":243,"line":1068},[1800],{"type":59,"tag":241,"props":1801,"children":1802},{"emptyLinePlaceholder":257},[1803],{"type":65,"value":260},{"type":59,"tag":241,"props":1805,"children":1806},{"class":243,"line":1445},[1807],{"type":59,"tag":241,"props":1808,"children":1809},{},[1810],{"type":65,"value":1811},"@dag(start_date=datetime(2025, 1, 1), schedule=\"@daily\")\n",{"type":59,"tag":241,"props":1813,"children":1814},{"class":243,"line":1563},[1815],{"type":59,"tag":241,"props":1816,"children":1817},{},[1818],{"type":65,"value":1819},"def my_dag():\n",{"type":59,"tag":241,"props":1821,"children":1822},{"class":243,"line":1571},[1823],{"type":59,"tag":241,"props":1824,"children":1825},{},[1826],{"type":65,"value":1827},"    @task\n",{"type":59,"tag":241,"props":1829,"children":1830},{"class":243,"line":1579},[1831],{"type":59,"tag":241,"props":1832,"children":1833},{},[1834],{"type":65,"value":1835},"    def pre_dbt():\n",{"type":59,"tag":241,"props":1837,"children":1838},{"class":243,"line":1587},[1839],{"type":59,"tag":241,"props":1840,"children":1841},{},[1842],{"type":65,"value":1843},"        return \"some_value\"\n",{"type":59,"tag":241,"props":1845,"children":1846},{"class":243,"line":1595},[1847],{"type":59,"tag":241,"props":1848,"children":1849},{"emptyLinePlaceholder":257},[1850],{"type":65,"value":260},{"type":59,"tag":241,"props":1852,"children":1853},{"class":243,"line":1604},[1854],{"type":59,"tag":241,"props":1855,"children":1856},{},[1857],{"type":65,"value":1858},"    dbt = DbtTaskGroup(\n",{"type":59,"tag":241,"props":1860,"children":1861},{"class":243,"line":1613},[1862],{"type":59,"tag":241,"props":1863,"children":1864},{},[1865],{"type":65,"value":1866},"        group_id=\"dbt_project\",\n",{"type":59,"tag":241,"props":1868,"children":1869},{"class":243,"line":1621},[1870],{"type":59,"tag":241,"props":1871,"children":1872},{},[1873],{"type":65,"value":1874},"        project_config=_project_config,\n",{"type":59,"tag":241,"props":1876,"children":1877},{"class":243,"line":1630},[1878],{"type":59,"tag":241,"props":1879,"children":1880},{},[1881],{"type":65,"value":1882},"        profile_config=_profile_config,\n",{"type":59,"tag":241,"props":1884,"children":1885},{"class":243,"line":1639},[1886],{"type":59,"tag":241,"props":1887,"children":1888},{},[1889],{"type":65,"value":1890},"        execution_config=_execution_config,\n",{"type":59,"tag":241,"props":1892,"children":1893},{"class":243,"line":1648},[1894],{"type":59,"tag":241,"props":1895,"children":1896},{},[1897],{"type":65,"value":1898},"        render_config=_render_config,\n",{"type":59,"tag":241,"props":1900,"children":1901},{"class":243,"line":1657},[1902],{"type":59,"tag":241,"props":1903,"children":1904},{},[1905],{"type":65,"value":1906},"    )\n",{"type":59,"tag":241,"props":1908,"children":1909},{"class":243,"line":1666},[1910],{"type":59,"tag":241,"props":1911,"children":1912},{"emptyLinePlaceholder":257},[1913],{"type":65,"value":260},{"type":59,"tag":241,"props":1915,"children":1916},{"class":243,"line":1675},[1917],{"type":59,"tag":241,"props":1918,"children":1919},{},[1920],{"type":65,"value":1827},{"type":59,"tag":241,"props":1922,"children":1923},{"class":243,"line":1684},[1924],{"type":59,"tag":241,"props":1925,"children":1926},{},[1927],{"type":65,"value":1928},"    def post_dbt():\n",{"type":59,"tag":241,"props":1930,"children":1931},{"class":243,"line":1693},[1932],{"type":59,"tag":241,"props":1933,"children":1934},{},[1935],{"type":65,"value":1936},"        pass\n",{"type":59,"tag":241,"props":1938,"children":1939},{"class":243,"line":1702},[1940],{"type":59,"tag":241,"props":1941,"children":1942},{"emptyLinePlaceholder":257},[1943],{"type":65,"value":260},{"type":59,"tag":241,"props":1945,"children":1947},{"class":243,"line":1946},30,[1948],{"type":59,"tag":241,"props":1949,"children":1950},{},[1951],{"type":65,"value":1952},"    chain(pre_dbt(), dbt, post_dbt())\n",{"type":59,"tag":241,"props":1954,"children":1956},{"class":243,"line":1955},31,[1957],{"type":59,"tag":241,"props":1958,"children":1959},{"emptyLinePlaceholder":257},[1960],{"type":65,"value":260},{"type":59,"tag":241,"props":1962,"children":1964},{"class":243,"line":1963},32,[1965],{"type":59,"tag":241,"props":1966,"children":1967},{},[1968],{"type":65,"value":1969},"my_dag()\n",{"type":59,"tag":972,"props":1971,"children":1973},{"id":1972},"option-c-use-cosmos-operators-directly",[1974],{"type":65,"value":1975},"Option C: Use Cosmos operators directly",{"type":59,"tag":230,"props":1977,"children":1979},{"className":232,"code":1978,"language":234,"meta":235,"style":235},"import os\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Any\n\nfrom airflow import DAG\n\ntry:\n    from airflow.providers.standard.operators.python import PythonOperator\nexcept ImportError:\n    from airflow.operators.python import PythonOperator\n\nfrom cosmos import DbtCloneLocalOperator, DbtRunLocalOperator, DbtSeedLocalOperator, ProfileConfig\nfrom cosmos.io import upload_to_aws_s3\n\nDEFAULT_DBT_ROOT_PATH = Path(__file__).parent \u002F \"dbt\"\nDBT_ROOT_PATH = Path(os.getenv(\"DBT_ROOT_PATH\", DEFAULT_DBT_ROOT_PATH))\nDBT_PROJ_DIR = DBT_ROOT_PATH \u002F \"jaffle_shop\"\nDBT_PROFILE_PATH = DBT_PROJ_DIR \u002F \"profiles.yml\"\nDBT_ARTIFACT = DBT_PROJ_DIR \u002F \"target\"\n\nprofile_config = ProfileConfig(\n    profile_name=\"default\",\n    target_name=\"dev\",\n    profiles_yml_filepath=DBT_PROFILE_PATH,\n)\n\n\ndef check_s3_file(bucket_name: str, file_key: str, aws_conn_id: str = \"aws_default\", **context: Any) -> bool:\n    \"\"\"Check if a file exists in the given S3 bucket.\"\"\"\n    from airflow.providers.amazon.aws.hooks.s3 import S3Hook\n\n    s3_key = f\"{context['dag'].dag_id}\u002F{context['run_id']}\u002Fseed\u002F0\u002F{file_key}\"\n    print(f\"Checking if file {s3_key} exists in S3 bucket...\")\n    hook = S3Hook(aws_conn_id=aws_conn_id)\n    return hook.check_for_key(key=s3_key, bucket_name=bucket_name)\n\n\nwith DAG(\"example_operators\", start_date=datetime(2024, 1, 1), catchup=False) as dag:\n    seed_operator = DbtSeedLocalOperator(\n        profile_config=profile_config,\n        project_dir=DBT_PROJ_DIR,\n        task_id=\"seed\",\n        dbt_cmd_flags=[\"--select\", \"raw_customers\"],\n        install_deps=True,\n        append_env=True,\n    )\n\n    check_file_uploaded_task = PythonOperator(\n        task_id=\"check_file_uploaded_task\",\n        python_callable=check_s3_file,\n        op_kwargs={\n            \"aws_conn_id\": \"aws_s3_conn\",\n            \"bucket_name\": \"cosmos-artifacts-upload\",\n            \"file_key\": \"target\u002Frun_results.json\",\n        },\n    )\n\n    run_operator = DbtRunLocalOperator(\n        profile_config=profile_config,\n        project_dir=DBT_PROJ_DIR,\n        task_id=\"run\",\n        dbt_cmd_flags=[\"--models\", \"stg_customers\"],\n        install_deps=True,\n        append_env=True,\n    )\n\n    clone_operator = DbtCloneLocalOperator(\n        profile_config=profile_config,\n        project_dir=DBT_PROJ_DIR,\n        task_id=\"clone\",\n        dbt_cmd_flags=[\"--models\", \"stg_customers\", \"--state\", DBT_ARTIFACT],\n        install_deps=True,\n        append_env=True,\n    )\n\n    seed_operator >> run_operator >> clone_operator\n    seed_operator >> check_file_uploaded_task\n",[1980],{"type":59,"tag":187,"props":1981,"children":1982},{"__ignoreMap":235},[1983,1991,1999,2007,2015,2022,2030,2037,2045,2053,2061,2069,2076,2084,2092,2099,2107,2115,2123,2131,2139,2146,2154,2161,2168,2176,2183,2190,2197,2205,2213,2221,2228,2237,2246,2255,2264,2272,2280,2289,2298,2307,2316,2325,2334,2343,2352,2360,2368,2377,2386,2395,2404,2413,2422,2430,2439,2447,2455,2464,2472,2480,2489,2498,2506,2514,2522,2530,2539,2547,2555,2564,2573,2581,2589,2597,2605,2614],{"type":59,"tag":241,"props":1984,"children":1985},{"class":243,"line":244},[1986],{"type":59,"tag":241,"props":1987,"children":1988},{},[1989],{"type":65,"value":1990},"import os\n",{"type":59,"tag":241,"props":1992,"children":1993},{"class":243,"line":253},[1994],{"type":59,"tag":241,"props":1995,"children":1996},{},[1997],{"type":65,"value":1998},"from datetime import datetime\n",{"type":59,"tag":241,"props":2000,"children":2001},{"class":243,"line":263},[2002],{"type":59,"tag":241,"props":2003,"children":2004},{},[2005],{"type":65,"value":2006},"from pathlib import Path\n",{"type":59,"tag":241,"props":2008,"children":2009},{"class":243,"line":272},[2010],{"type":59,"tag":241,"props":2011,"children":2012},{},[2013],{"type":65,"value":2014},"from typing import Any\n",{"type":59,"tag":241,"props":2016,"children":2017},{"class":243,"line":281},[2018],{"type":59,"tag":241,"props":2019,"children":2020},{"emptyLinePlaceholder":257},[2021],{"type":65,"value":260},{"type":59,"tag":241,"props":2023,"children":2024},{"class":243,"line":290},[2025],{"type":59,"tag":241,"props":2026,"children":2027},{},[2028],{"type":65,"value":2029},"from airflow import DAG\n",{"type":59,"tag":241,"props":2031,"children":2032},{"class":243,"line":299},[2033],{"type":59,"tag":241,"props":2034,"children":2035},{"emptyLinePlaceholder":257},[2036],{"type":65,"value":260},{"type":59,"tag":241,"props":2038,"children":2039},{"class":243,"line":308},[2040],{"type":59,"tag":241,"props":2041,"children":2042},{},[2043],{"type":65,"value":2044},"try:\n",{"type":59,"tag":241,"props":2046,"children":2047},{"class":243,"line":1050},[2048],{"type":59,"tag":241,"props":2049,"children":2050},{},[2051],{"type":65,"value":2052},"    from airflow.providers.standard.operators.python import PythonOperator\n",{"type":59,"tag":241,"props":2054,"children":2055},{"class":243,"line":1059},[2056],{"type":59,"tag":241,"props":2057,"children":2058},{},[2059],{"type":65,"value":2060},"except ImportError:\n",{"type":59,"tag":241,"props":2062,"children":2063},{"class":243,"line":1068},[2064],{"type":59,"tag":241,"props":2065,"children":2066},{},[2067],{"type":65,"value":2068},"    from airflow.operators.python import PythonOperator\n",{"type":59,"tag":241,"props":2070,"children":2071},{"class":243,"line":1445},[2072],{"type":59,"tag":241,"props":2073,"children":2074},{"emptyLinePlaceholder":257},[2075],{"type":65,"value":260},{"type":59,"tag":241,"props":2077,"children":2078},{"class":243,"line":1563},[2079],{"type":59,"tag":241,"props":2080,"children":2081},{},[2082],{"type":65,"value":2083},"from cosmos import DbtCloneLocalOperator, DbtRunLocalOperator, DbtSeedLocalOperator, ProfileConfig\n",{"type":59,"tag":241,"props":2085,"children":2086},{"class":243,"line":1571},[2087],{"type":59,"tag":241,"props":2088,"children":2089},{},[2090],{"type":65,"value":2091},"from cosmos.io import upload_to_aws_s3\n",{"type":59,"tag":241,"props":2093,"children":2094},{"class":243,"line":1579},[2095],{"type":59,"tag":241,"props":2096,"children":2097},{"emptyLinePlaceholder":257},[2098],{"type":65,"value":260},{"type":59,"tag":241,"props":2100,"children":2101},{"class":243,"line":1587},[2102],{"type":59,"tag":241,"props":2103,"children":2104},{},[2105],{"type":65,"value":2106},"DEFAULT_DBT_ROOT_PATH = Path(__file__).parent \u002F \"dbt\"\n",{"type":59,"tag":241,"props":2108,"children":2109},{"class":243,"line":1595},[2110],{"type":59,"tag":241,"props":2111,"children":2112},{},[2113],{"type":65,"value":2114},"DBT_ROOT_PATH = Path(os.getenv(\"DBT_ROOT_PATH\", DEFAULT_DBT_ROOT_PATH))\n",{"type":59,"tag":241,"props":2116,"children":2117},{"class":243,"line":1604},[2118],{"type":59,"tag":241,"props":2119,"children":2120},{},[2121],{"type":65,"value":2122},"DBT_PROJ_DIR = DBT_ROOT_PATH \u002F \"jaffle_shop\"\n",{"type":59,"tag":241,"props":2124,"children":2125},{"class":243,"line":1613},[2126],{"type":59,"tag":241,"props":2127,"children":2128},{},[2129],{"type":65,"value":2130},"DBT_PROFILE_PATH = DBT_PROJ_DIR \u002F \"profiles.yml\"\n",{"type":59,"tag":241,"props":2132,"children":2133},{"class":243,"line":1621},[2134],{"type":59,"tag":241,"props":2135,"children":2136},{},[2137],{"type":65,"value":2138},"DBT_ARTIFACT = DBT_PROJ_DIR \u002F \"target\"\n",{"type":59,"tag":241,"props":2140,"children":2141},{"class":243,"line":1630},[2142],{"type":59,"tag":241,"props":2143,"children":2144},{"emptyLinePlaceholder":257},[2145],{"type":65,"value":260},{"type":59,"tag":241,"props":2147,"children":2148},{"class":243,"line":1639},[2149],{"type":59,"tag":241,"props":2150,"children":2151},{},[2152],{"type":65,"value":2153},"profile_config = ProfileConfig(\n",{"type":59,"tag":241,"props":2155,"children":2156},{"class":243,"line":1648},[2157],{"type":59,"tag":241,"props":2158,"children":2159},{},[2160],{"type":65,"value":1023},{"type":59,"tag":241,"props":2162,"children":2163},{"class":243,"line":1657},[2164],{"type":59,"tag":241,"props":2165,"children":2166},{},[2167],{"type":65,"value":1031},{"type":59,"tag":241,"props":2169,"children":2170},{"class":243,"line":1666},[2171],{"type":59,"tag":241,"props":2172,"children":2173},{},[2174],{"type":65,"value":2175},"    profiles_yml_filepath=DBT_PROFILE_PATH,\n",{"type":59,"tag":241,"props":2177,"children":2178},{"class":243,"line":1675},[2179],{"type":59,"tag":241,"props":2180,"children":2181},{},[2182],{"type":65,"value":314},{"type":59,"tag":241,"props":2184,"children":2185},{"class":243,"line":1684},[2186],{"type":59,"tag":241,"props":2187,"children":2188},{"emptyLinePlaceholder":257},[2189],{"type":65,"value":260},{"type":59,"tag":241,"props":2191,"children":2192},{"class":243,"line":1693},[2193],{"type":59,"tag":241,"props":2194,"children":2195},{"emptyLinePlaceholder":257},[2196],{"type":65,"value":260},{"type":59,"tag":241,"props":2198,"children":2199},{"class":243,"line":1702},[2200],{"type":59,"tag":241,"props":2201,"children":2202},{},[2203],{"type":65,"value":2204},"def check_s3_file(bucket_name: str, file_key: str, aws_conn_id: str = \"aws_default\", **context: Any) -> bool:\n",{"type":59,"tag":241,"props":2206,"children":2207},{"class":243,"line":1946},[2208],{"type":59,"tag":241,"props":2209,"children":2210},{},[2211],{"type":65,"value":2212},"    \"\"\"Check if a file exists in the given S3 bucket.\"\"\"\n",{"type":59,"tag":241,"props":2214,"children":2215},{"class":243,"line":1955},[2216],{"type":59,"tag":241,"props":2217,"children":2218},{},[2219],{"type":65,"value":2220},"    from airflow.providers.amazon.aws.hooks.s3 import S3Hook\n",{"type":59,"tag":241,"props":2222,"children":2223},{"class":243,"line":1963},[2224],{"type":59,"tag":241,"props":2225,"children":2226},{"emptyLinePlaceholder":257},[2227],{"type":65,"value":260},{"type":59,"tag":241,"props":2229,"children":2231},{"class":243,"line":2230},33,[2232],{"type":59,"tag":241,"props":2233,"children":2234},{},[2235],{"type":65,"value":2236},"    s3_key = f\"{context['dag'].dag_id}\u002F{context['run_id']}\u002Fseed\u002F0\u002F{file_key}\"\n",{"type":59,"tag":241,"props":2238,"children":2240},{"class":243,"line":2239},34,[2241],{"type":59,"tag":241,"props":2242,"children":2243},{},[2244],{"type":65,"value":2245},"    print(f\"Checking if file {s3_key} exists in S3 bucket...\")\n",{"type":59,"tag":241,"props":2247,"children":2249},{"class":243,"line":2248},35,[2250],{"type":59,"tag":241,"props":2251,"children":2252},{},[2253],{"type":65,"value":2254},"    hook = S3Hook(aws_conn_id=aws_conn_id)\n",{"type":59,"tag":241,"props":2256,"children":2258},{"class":243,"line":2257},36,[2259],{"type":59,"tag":241,"props":2260,"children":2261},{},[2262],{"type":65,"value":2263},"    return hook.check_for_key(key=s3_key, bucket_name=bucket_name)\n",{"type":59,"tag":241,"props":2265,"children":2267},{"class":243,"line":2266},37,[2268],{"type":59,"tag":241,"props":2269,"children":2270},{"emptyLinePlaceholder":257},[2271],{"type":65,"value":260},{"type":59,"tag":241,"props":2273,"children":2275},{"class":243,"line":2274},38,[2276],{"type":59,"tag":241,"props":2277,"children":2278},{"emptyLinePlaceholder":257},[2279],{"type":65,"value":260},{"type":59,"tag":241,"props":2281,"children":2283},{"class":243,"line":2282},39,[2284],{"type":59,"tag":241,"props":2285,"children":2286},{},[2287],{"type":65,"value":2288},"with DAG(\"example_operators\", start_date=datetime(2024, 1, 1), catchup=False) as dag:\n",{"type":59,"tag":241,"props":2290,"children":2292},{"class":243,"line":2291},40,[2293],{"type":59,"tag":241,"props":2294,"children":2295},{},[2296],{"type":65,"value":2297},"    seed_operator = DbtSeedLocalOperator(\n",{"type":59,"tag":241,"props":2299,"children":2301},{"class":243,"line":2300},41,[2302],{"type":59,"tag":241,"props":2303,"children":2304},{},[2305],{"type":65,"value":2306},"        profile_config=profile_config,\n",{"type":59,"tag":241,"props":2308,"children":2310},{"class":243,"line":2309},42,[2311],{"type":59,"tag":241,"props":2312,"children":2313},{},[2314],{"type":65,"value":2315},"        project_dir=DBT_PROJ_DIR,\n",{"type":59,"tag":241,"props":2317,"children":2319},{"class":243,"line":2318},43,[2320],{"type":59,"tag":241,"props":2321,"children":2322},{},[2323],{"type":65,"value":2324},"        task_id=\"seed\",\n",{"type":59,"tag":241,"props":2326,"children":2328},{"class":243,"line":2327},44,[2329],{"type":59,"tag":241,"props":2330,"children":2331},{},[2332],{"type":65,"value":2333},"        dbt_cmd_flags=[\"--select\", \"raw_customers\"],\n",{"type":59,"tag":241,"props":2335,"children":2337},{"class":243,"line":2336},45,[2338],{"type":59,"tag":241,"props":2339,"children":2340},{},[2341],{"type":65,"value":2342},"        install_deps=True,\n",{"type":59,"tag":241,"props":2344,"children":2346},{"class":243,"line":2345},46,[2347],{"type":59,"tag":241,"props":2348,"children":2349},{},[2350],{"type":65,"value":2351},"        append_env=True,\n",{"type":59,"tag":241,"props":2353,"children":2355},{"class":243,"line":2354},47,[2356],{"type":59,"tag":241,"props":2357,"children":2358},{},[2359],{"type":65,"value":1906},{"type":59,"tag":241,"props":2361,"children":2363},{"class":243,"line":2362},48,[2364],{"type":59,"tag":241,"props":2365,"children":2366},{"emptyLinePlaceholder":257},[2367],{"type":65,"value":260},{"type":59,"tag":241,"props":2369,"children":2371},{"class":243,"line":2370},49,[2372],{"type":59,"tag":241,"props":2373,"children":2374},{},[2375],{"type":65,"value":2376},"    check_file_uploaded_task = PythonOperator(\n",{"type":59,"tag":241,"props":2378,"children":2380},{"class":243,"line":2379},50,[2381],{"type":59,"tag":241,"props":2382,"children":2383},{},[2384],{"type":65,"value":2385},"        task_id=\"check_file_uploaded_task\",\n",{"type":59,"tag":241,"props":2387,"children":2389},{"class":243,"line":2388},51,[2390],{"type":59,"tag":241,"props":2391,"children":2392},{},[2393],{"type":65,"value":2394},"        python_callable=check_s3_file,\n",{"type":59,"tag":241,"props":2396,"children":2398},{"class":243,"line":2397},52,[2399],{"type":59,"tag":241,"props":2400,"children":2401},{},[2402],{"type":65,"value":2403},"        op_kwargs={\n",{"type":59,"tag":241,"props":2405,"children":2407},{"class":243,"line":2406},53,[2408],{"type":59,"tag":241,"props":2409,"children":2410},{},[2411],{"type":65,"value":2412},"            \"aws_conn_id\": \"aws_s3_conn\",\n",{"type":59,"tag":241,"props":2414,"children":2416},{"class":243,"line":2415},54,[2417],{"type":59,"tag":241,"props":2418,"children":2419},{},[2420],{"type":65,"value":2421},"            \"bucket_name\": \"cosmos-artifacts-upload\",\n",{"type":59,"tag":241,"props":2423,"children":2424},{"class":243,"line":28},[2425],{"type":59,"tag":241,"props":2426,"children":2427},{},[2428],{"type":65,"value":2429},"            \"file_key\": \"target\u002Frun_results.json\",\n",{"type":59,"tag":241,"props":2431,"children":2433},{"class":243,"line":2432},56,[2434],{"type":59,"tag":241,"props":2435,"children":2436},{},[2437],{"type":65,"value":2438},"        },\n",{"type":59,"tag":241,"props":2440,"children":2442},{"class":243,"line":2441},57,[2443],{"type":59,"tag":241,"props":2444,"children":2445},{},[2446],{"type":65,"value":1906},{"type":59,"tag":241,"props":2448,"children":2450},{"class":243,"line":2449},58,[2451],{"type":59,"tag":241,"props":2452,"children":2453},{"emptyLinePlaceholder":257},[2454],{"type":65,"value":260},{"type":59,"tag":241,"props":2456,"children":2458},{"class":243,"line":2457},59,[2459],{"type":59,"tag":241,"props":2460,"children":2461},{},[2462],{"type":65,"value":2463},"    run_operator = DbtRunLocalOperator(\n",{"type":59,"tag":241,"props":2465,"children":2467},{"class":243,"line":2466},60,[2468],{"type":59,"tag":241,"props":2469,"children":2470},{},[2471],{"type":65,"value":2306},{"type":59,"tag":241,"props":2473,"children":2475},{"class":243,"line":2474},61,[2476],{"type":59,"tag":241,"props":2477,"children":2478},{},[2479],{"type":65,"value":2315},{"type":59,"tag":241,"props":2481,"children":2483},{"class":243,"line":2482},62,[2484],{"type":59,"tag":241,"props":2485,"children":2486},{},[2487],{"type":65,"value":2488},"        task_id=\"run\",\n",{"type":59,"tag":241,"props":2490,"children":2492},{"class":243,"line":2491},63,[2493],{"type":59,"tag":241,"props":2494,"children":2495},{},[2496],{"type":65,"value":2497},"        dbt_cmd_flags=[\"--models\", \"stg_customers\"],\n",{"type":59,"tag":241,"props":2499,"children":2501},{"class":243,"line":2500},64,[2502],{"type":59,"tag":241,"props":2503,"children":2504},{},[2505],{"type":65,"value":2342},{"type":59,"tag":241,"props":2507,"children":2509},{"class":243,"line":2508},65,[2510],{"type":59,"tag":241,"props":2511,"children":2512},{},[2513],{"type":65,"value":2351},{"type":59,"tag":241,"props":2515,"children":2517},{"class":243,"line":2516},66,[2518],{"type":59,"tag":241,"props":2519,"children":2520},{},[2521],{"type":65,"value":1906},{"type":59,"tag":241,"props":2523,"children":2525},{"class":243,"line":2524},67,[2526],{"type":59,"tag":241,"props":2527,"children":2528},{"emptyLinePlaceholder":257},[2529],{"type":65,"value":260},{"type":59,"tag":241,"props":2531,"children":2533},{"class":243,"line":2532},68,[2534],{"type":59,"tag":241,"props":2535,"children":2536},{},[2537],{"type":65,"value":2538},"    clone_operator = DbtCloneLocalOperator(\n",{"type":59,"tag":241,"props":2540,"children":2542},{"class":243,"line":2541},69,[2543],{"type":59,"tag":241,"props":2544,"children":2545},{},[2546],{"type":65,"value":2306},{"type":59,"tag":241,"props":2548,"children":2550},{"class":243,"line":2549},70,[2551],{"type":59,"tag":241,"props":2552,"children":2553},{},[2554],{"type":65,"value":2315},{"type":59,"tag":241,"props":2556,"children":2558},{"class":243,"line":2557},71,[2559],{"type":59,"tag":241,"props":2560,"children":2561},{},[2562],{"type":65,"value":2563},"        task_id=\"clone\",\n",{"type":59,"tag":241,"props":2565,"children":2567},{"class":243,"line":2566},72,[2568],{"type":59,"tag":241,"props":2569,"children":2570},{},[2571],{"type":65,"value":2572},"        dbt_cmd_flags=[\"--models\", \"stg_customers\", \"--state\", DBT_ARTIFACT],\n",{"type":59,"tag":241,"props":2574,"children":2576},{"class":243,"line":2575},73,[2577],{"type":59,"tag":241,"props":2578,"children":2579},{},[2580],{"type":65,"value":2342},{"type":59,"tag":241,"props":2582,"children":2584},{"class":243,"line":2583},74,[2585],{"type":59,"tag":241,"props":2586,"children":2587},{},[2588],{"type":65,"value":2351},{"type":59,"tag":241,"props":2590,"children":2592},{"class":243,"line":2591},75,[2593],{"type":59,"tag":241,"props":2594,"children":2595},{},[2596],{"type":65,"value":1906},{"type":59,"tag":241,"props":2598,"children":2600},{"class":243,"line":2599},76,[2601],{"type":59,"tag":241,"props":2602,"children":2603},{"emptyLinePlaceholder":257},[2604],{"type":65,"value":260},{"type":59,"tag":241,"props":2606,"children":2608},{"class":243,"line":2607},77,[2609],{"type":59,"tag":241,"props":2610,"children":2611},{},[2612],{"type":65,"value":2613},"    seed_operator >> run_operator >> clone_operator\n",{"type":59,"tag":241,"props":2615,"children":2617},{"class":243,"line":2616},78,[2618],{"type":59,"tag":241,"props":2619,"children":2620},{},[2621],{"type":65,"value":2622},"    seed_operator >> check_file_uploaded_task\n",{"type":59,"tag":972,"props":2624,"children":2626},{"id":2625},"setting-dependencies-on-individual-cosmos-tasks",[2627],{"type":65,"value":2628},"Setting Dependencies on Individual Cosmos Tasks",{"type":59,"tag":230,"props":2630,"children":2632},{"className":232,"code":2631,"language":234,"meta":235,"style":235},"from cosmos import DbtDag, DbtResourceType\nfrom airflow.sdk import task, chain\n\nwith DbtDag(...) as dag:\n    @task\n    def upstream_task():\n        pass\n\n    _upstream = upstream_task()\n\n    for unique_id, dbt_node in dag.dbt_graph.filtered_nodes.items():\n        if dbt_node.resource_type == DbtResourceType.SEED:\n            my_dbt_task = dag.tasks_map[unique_id]\n            chain(_upstream, my_dbt_task)\n",[2633],{"type":59,"tag":187,"props":2634,"children":2635},{"__ignoreMap":235},[2636,2644,2652,2659,2667,2674,2682,2689,2696,2704,2711,2719,2727,2735],{"type":59,"tag":241,"props":2637,"children":2638},{"class":243,"line":244},[2639],{"type":59,"tag":241,"props":2640,"children":2641},{},[2642],{"type":65,"value":2643},"from cosmos import DbtDag, DbtResourceType\n",{"type":59,"tag":241,"props":2645,"children":2646},{"class":243,"line":253},[2647],{"type":59,"tag":241,"props":2648,"children":2649},{},[2650],{"type":65,"value":2651},"from airflow.sdk import task, chain\n",{"type":59,"tag":241,"props":2653,"children":2654},{"class":243,"line":263},[2655],{"type":59,"tag":241,"props":2656,"children":2657},{"emptyLinePlaceholder":257},[2658],{"type":65,"value":260},{"type":59,"tag":241,"props":2660,"children":2661},{"class":243,"line":272},[2662],{"type":59,"tag":241,"props":2663,"children":2664},{},[2665],{"type":65,"value":2666},"with DbtDag(...) as dag:\n",{"type":59,"tag":241,"props":2668,"children":2669},{"class":243,"line":281},[2670],{"type":59,"tag":241,"props":2671,"children":2672},{},[2673],{"type":65,"value":1827},{"type":59,"tag":241,"props":2675,"children":2676},{"class":243,"line":290},[2677],{"type":59,"tag":241,"props":2678,"children":2679},{},[2680],{"type":65,"value":2681},"    def upstream_task():\n",{"type":59,"tag":241,"props":2683,"children":2684},{"class":243,"line":299},[2685],{"type":59,"tag":241,"props":2686,"children":2687},{},[2688],{"type":65,"value":1936},{"type":59,"tag":241,"props":2690,"children":2691},{"class":243,"line":308},[2692],{"type":59,"tag":241,"props":2693,"children":2694},{"emptyLinePlaceholder":257},[2695],{"type":65,"value":260},{"type":59,"tag":241,"props":2697,"children":2698},{"class":243,"line":1050},[2699],{"type":59,"tag":241,"props":2700,"children":2701},{},[2702],{"type":65,"value":2703},"    _upstream = upstream_task()\n",{"type":59,"tag":241,"props":2705,"children":2706},{"class":243,"line":1059},[2707],{"type":59,"tag":241,"props":2708,"children":2709},{"emptyLinePlaceholder":257},[2710],{"type":65,"value":260},{"type":59,"tag":241,"props":2712,"children":2713},{"class":243,"line":1068},[2714],{"type":59,"tag":241,"props":2715,"children":2716},{},[2717],{"type":65,"value":2718},"    for unique_id, dbt_node in dag.dbt_graph.filtered_nodes.items():\n",{"type":59,"tag":241,"props":2720,"children":2721},{"class":243,"line":1445},[2722],{"type":59,"tag":241,"props":2723,"children":2724},{},[2725],{"type":65,"value":2726},"        if dbt_node.resource_type == DbtResourceType.SEED:\n",{"type":59,"tag":241,"props":2728,"children":2729},{"class":243,"line":1563},[2730],{"type":59,"tag":241,"props":2731,"children":2732},{},[2733],{"type":65,"value":2734},"            my_dbt_task = dag.tasks_map[unique_id]\n",{"type":59,"tag":241,"props":2736,"children":2737},{"class":243,"line":1571},[2738],{"type":59,"tag":241,"props":2739,"children":2740},{},[2741],{"type":65,"value":2742},"            chain(_upstream, my_dbt_task)\n",{"type":59,"tag":127,"props":2744,"children":2745},{},[],{"type":59,"tag":131,"props":2747,"children":2749},{"id":2748},"_8-safety-checks",[2750],{"type":65,"value":2751},"8. Safety Checks",{"type":59,"tag":68,"props":2753,"children":2754},{},[2755],{"type":65,"value":2756},"Before finalizing, verify:",{"type":59,"tag":2758,"props":2759,"children":2762},"ul",{"className":2760},[2761],"contains-task-list",[2763,2776,2785,2794,2803],{"type":59,"tag":2764,"props":2765,"children":2768},"li",{"className":2766},[2767],"task-list-item",[2769,2774],{"type":59,"tag":2770,"props":2771,"children":2773},"input",{"disabled":257,"type":2772},"checkbox",[],{"type":65,"value":2775}," Execution mode matches constraints (AIRFLOW_ASYNC → BigQuery only)",{"type":59,"tag":2764,"props":2777,"children":2779},{"className":2778},[2767],[2780,2783],{"type":59,"tag":2770,"props":2781,"children":2782},{"disabled":257,"type":2772},[],{"type":65,"value":2784}," Warehouse adapter installed for chosen execution mode",{"type":59,"tag":2764,"props":2786,"children":2788},{"className":2787},[2767],[2789,2792],{"type":59,"tag":2770,"props":2790,"children":2791},{"disabled":257,"type":2772},[],{"type":65,"value":2793}," Secrets via Airflow connections or env vars, NOT plaintext",{"type":59,"tag":2764,"props":2795,"children":2797},{"className":2796},[2767],[2798,2801],{"type":59,"tag":2770,"props":2799,"children":2800},{"disabled":257,"type":2772},[],{"type":65,"value":2802}," Load mode matches execution (complex selectors → dbt_ls)",{"type":59,"tag":2764,"props":2804,"children":2806},{"className":2805},[2767],[2807,2810],{"type":59,"tag":2770,"props":2808,"children":2809},{"disabled":257,"type":2772},[],{"type":65,"value":2811}," Airflow 3 asset URIs if downstream DAGs scheduled on Cosmos assets (see Appendix A)",{"type":59,"tag":127,"props":2813,"children":2814},{},[],{"type":59,"tag":131,"props":2816,"children":2818},{"id":2817},"appendix-a-airflow-3-compatibility",[2819],{"type":65,"value":2820},"Appendix A: Airflow 3 Compatibility",{"type":59,"tag":972,"props":2822,"children":2824},{"id":2823},"import-differences",[2825],{"type":65,"value":2826},"Import Differences",{"type":59,"tag":138,"props":2828,"children":2829},{},[2830,2846],{"type":59,"tag":142,"props":2831,"children":2832},{},[2833],{"type":59,"tag":146,"props":2834,"children":2835},{},[2836,2841],{"type":59,"tag":150,"props":2837,"children":2838},{},[2839],{"type":65,"value":2840},"Airflow 3.x",{"type":59,"tag":150,"props":2842,"children":2843},{},[2844],{"type":65,"value":2845},"Airflow 2.x",{"type":59,"tag":166,"props":2847,"children":2848},{},[2849,2870],{"type":59,"tag":146,"props":2850,"children":2851},{},[2852,2861],{"type":59,"tag":173,"props":2853,"children":2854},{},[2855],{"type":59,"tag":187,"props":2856,"children":2858},{"className":2857},[],[2859],{"type":65,"value":2860},"from airflow.sdk import dag, task",{"type":59,"tag":173,"props":2862,"children":2863},{},[2864],{"type":59,"tag":187,"props":2865,"children":2867},{"className":2866},[],[2868],{"type":65,"value":2869},"from airflow.decorators import dag, task",{"type":59,"tag":146,"props":2871,"children":2872},{},[2873,2882],{"type":59,"tag":173,"props":2874,"children":2875},{},[2876],{"type":59,"tag":187,"props":2877,"children":2879},{"className":2878},[],[2880],{"type":65,"value":2881},"from airflow.sdk import chain",{"type":59,"tag":173,"props":2883,"children":2884},{},[2885],{"type":59,"tag":187,"props":2886,"children":2888},{"className":2887},[],[2889],{"type":65,"value":2890},"from airflow.models.baseoperator import chain",{"type":59,"tag":972,"props":2892,"children":2894},{"id":2893},"assetdataset-uri-format-change",[2895],{"type":65,"value":2896},"Asset\u002FDataset URI Format Change",{"type":59,"tag":68,"props":2898,"children":2899},{},[2900],{"type":65,"value":2901},"Cosmos ≤1.9 (Airflow 2 Datasets):",{"type":59,"tag":230,"props":2903,"children":2907},{"className":2904,"code":2906,"language":65},[2905],"language-text","postgres:\u002F\u002F0.0.0.0:5434\u002Fpostgres.public.orders\n",[2908],{"type":59,"tag":187,"props":2909,"children":2910},{"__ignoreMap":235},[2911],{"type":65,"value":2906},{"type":59,"tag":68,"props":2913,"children":2914},{},[2915],{"type":65,"value":2916},"Cosmos ≥1.10 (Airflow 3 Assets):",{"type":59,"tag":230,"props":2918,"children":2921},{"className":2919,"code":2920,"language":65},[2905],"postgres:\u002F\u002F0.0.0.0:5434\u002Fpostgres\u002Fpublic\u002Forders\n",[2922],{"type":59,"tag":187,"props":2923,"children":2924},{"__ignoreMap":235},[2925],{"type":65,"value":2920},{"type":59,"tag":74,"props":2927,"children":2928},{},[2929],{"type":59,"tag":68,"props":2930,"children":2931},{},[2932,2936],{"type":59,"tag":81,"props":2933,"children":2934},{},[2935],{"type":65,"value":510},{"type":65,"value":2937},": Update asset URIs when upgrading to Airflow 3.",{"type":59,"tag":127,"props":2939,"children":2940},{},[],{"type":59,"tag":131,"props":2942,"children":2944},{"id":2943},"appendix-b-operational-extras",[2945],{"type":65,"value":2946},"Appendix B: Operational Extras",{"type":59,"tag":972,"props":2948,"children":2950},{"id":2949},"caching",[2951],{"type":65,"value":2952},"Caching",{"type":59,"tag":68,"props":2954,"children":2955},{},[2956],{"type":65,"value":2957},"Cosmos caches artifacts to speed up parsing. Enabled by default.",{"type":59,"tag":68,"props":2959,"children":2960},{},[2961,2963],{"type":65,"value":2962},"Reference: ",{"type":59,"tag":99,"props":2964,"children":2967},{"href":2965,"rel":2966},"https:\u002F\u002Fastronomer.github.io\u002Fastronomer-cosmos\u002Fconfiguration\u002Fcaching.html",[103],[2968],{"type":65,"value":2965},{"type":59,"tag":972,"props":2970,"children":2972},{"id":2971},"memory-optimized-imports",[2973],{"type":65,"value":2974},"Memory-Optimized Imports",{"type":59,"tag":230,"props":2976,"children":2980},{"className":2977,"code":2978,"language":2979,"meta":235,"style":235},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","AIRFLOW__COSMOS__ENABLE_MEMORY_OPTIMISED_IMPORTS=True\n","bash",[2981],{"type":59,"tag":187,"props":2982,"children":2983},{"__ignoreMap":235},[2984],{"type":59,"tag":241,"props":2985,"children":2986},{"class":243,"line":244},[2987,2993,2999],{"type":59,"tag":241,"props":2988,"children":2990},{"style":2989},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[2991],{"type":65,"value":2992},"AIRFLOW__COSMOS__ENABLE_MEMORY_OPTIMISED_IMPORTS",{"type":59,"tag":241,"props":2994,"children":2996},{"style":2995},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[2997],{"type":65,"value":2998},"=",{"type":59,"tag":241,"props":3000,"children":3002},{"style":3001},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[3003],{"type":65,"value":3004},"True\n",{"type":59,"tag":68,"props":3006,"children":3007},{},[3008],{"type":65,"value":3009},"When enabled:",{"type":59,"tag":230,"props":3011,"children":3013},{"className":232,"code":3012,"language":234,"meta":235,"style":235},"from cosmos.airflow.dag import DbtDag  # instead of: from cosmos import DbtDag\n",[3014],{"type":59,"tag":187,"props":3015,"children":3016},{"__ignoreMap":235},[3017],{"type":59,"tag":241,"props":3018,"children":3019},{"class":243,"line":244},[3020],{"type":59,"tag":241,"props":3021,"children":3022},{},[3023],{"type":65,"value":3012},{"type":59,"tag":972,"props":3025,"children":3027},{"id":3026},"artifact-upload-to-object-storage",[3028],{"type":65,"value":3029},"Artifact Upload to Object Storage",{"type":59,"tag":230,"props":3031,"children":3033},{"className":2977,"code":3032,"language":2979,"meta":235,"style":235},"AIRFLOW__COSMOS__REMOTE_TARGET_PATH=s3:\u002F\u002Fbucket\u002Ftarget_dir\u002F\nAIRFLOW__COSMOS__REMOTE_TARGET_PATH_CONN_ID=aws_default\n",[3034],{"type":59,"tag":187,"props":3035,"children":3036},{"__ignoreMap":235},[3037,3054],{"type":59,"tag":241,"props":3038,"children":3039},{"class":243,"line":244},[3040,3045,3049],{"type":59,"tag":241,"props":3041,"children":3042},{"style":2989},[3043],{"type":65,"value":3044},"AIRFLOW__COSMOS__REMOTE_TARGET_PATH",{"type":59,"tag":241,"props":3046,"children":3047},{"style":2995},[3048],{"type":65,"value":2998},{"type":59,"tag":241,"props":3050,"children":3051},{"style":3001},[3052],{"type":65,"value":3053},"s3:\u002F\u002Fbucket\u002Ftarget_dir\u002F\n",{"type":59,"tag":241,"props":3055,"children":3056},{"class":243,"line":253},[3057,3062,3066],{"type":59,"tag":241,"props":3058,"children":3059},{"style":2989},[3060],{"type":65,"value":3061},"AIRFLOW__COSMOS__REMOTE_TARGET_PATH_CONN_ID",{"type":59,"tag":241,"props":3063,"children":3064},{"style":2995},[3065],{"type":65,"value":2998},{"type":59,"tag":241,"props":3067,"children":3068},{"style":3001},[3069],{"type":65,"value":3070},"aws_default\n",{"type":59,"tag":230,"props":3072,"children":3074},{"className":232,"code":3073,"language":234,"meta":235,"style":235},"from cosmos.io import upload_to_cloud_storage\n\nmy_dag = DbtDag(\n    # ...\n    operator_args={\"callback\": upload_to_cloud_storage},\n)\n",[3075],{"type":59,"tag":187,"props":3076,"children":3077},{"__ignoreMap":235},[3078,3086,3093,3101,3109,3117],{"type":59,"tag":241,"props":3079,"children":3080},{"class":243,"line":244},[3081],{"type":59,"tag":241,"props":3082,"children":3083},{},[3084],{"type":65,"value":3085},"from cosmos.io import upload_to_cloud_storage\n",{"type":59,"tag":241,"props":3087,"children":3088},{"class":243,"line":253},[3089],{"type":59,"tag":241,"props":3090,"children":3091},{"emptyLinePlaceholder":257},[3092],{"type":65,"value":260},{"type":59,"tag":241,"props":3094,"children":3095},{"class":243,"line":263},[3096],{"type":59,"tag":241,"props":3097,"children":3098},{},[3099],{"type":65,"value":3100},"my_dag = DbtDag(\n",{"type":59,"tag":241,"props":3102,"children":3103},{"class":243,"line":272},[3104],{"type":59,"tag":241,"props":3105,"children":3106},{},[3107],{"type":65,"value":3108},"    # ...\n",{"type":59,"tag":241,"props":3110,"children":3111},{"class":243,"line":281},[3112],{"type":59,"tag":241,"props":3113,"children":3114},{},[3115],{"type":65,"value":3116},"    operator_args={\"callback\": upload_to_cloud_storage},\n",{"type":59,"tag":241,"props":3118,"children":3119},{"class":243,"line":290},[3120],{"type":59,"tag":241,"props":3121,"children":3122},{},[3123],{"type":65,"value":314},{"type":59,"tag":972,"props":3125,"children":3127},{"id":3126},"dbt-docs-hosting",[3128],{"type":65,"value":3129},"dbt Docs Hosting",{"type":59,"tag":68,"props":3131,"children":3132},{},[3133],{"type":65,"value":3134},"Cosmos serves dbt docs in the Airflow UI. The config depends on your Airflow major\nversion (each uses a different UI plugin system) — it is not a free single-vs-multi choice:",{"type":59,"tag":138,"props":3136,"children":3137},{},[3138,3163],{"type":59,"tag":142,"props":3139,"children":3140},{},[3141],{"type":59,"tag":146,"props":3142,"children":3143},{},[3144,3148,3153,3158],{"type":59,"tag":150,"props":3145,"children":3146},{},[3147],{"type":65,"value":13},{"type":59,"tag":150,"props":3149,"children":3150},{},[3151],{"type":65,"value":3152},"Config",{"type":59,"tag":150,"props":3154,"children":3155},{},[3156],{"type":65,"value":3157},"Scope",{"type":59,"tag":150,"props":3159,"children":3160},{},[3161],{"type":65,"value":3162},"Since",{"type":59,"tag":166,"props":3164,"children":3165},{},[3166,3211],{"type":59,"tag":146,"props":3167,"children":3168},{},[3169,3174,3201,3206],{"type":59,"tag":173,"props":3170,"children":3171},{},[3172],{"type":65,"value":3173},"2 (FAB plugin)",{"type":59,"tag":173,"props":3175,"children":3176},{},[3177,3183,3185,3191,3193,3199],{"type":59,"tag":187,"props":3178,"children":3180},{"className":3179},[],[3181],{"type":65,"value":3182},"DBT_DOCS_DIR",{"type":65,"value":3184}," (+ ",{"type":59,"tag":187,"props":3186,"children":3188},{"className":3187},[],[3189],{"type":65,"value":3190},"DBT_DOCS_CONN_ID",{"type":65,"value":3192},", ",{"type":59,"tag":187,"props":3194,"children":3196},{"className":3195},[],[3197],{"type":65,"value":3198},"DBT_DOCS_INDEX_FILE_NAME",{"type":65,"value":3200},")",{"type":59,"tag":173,"props":3202,"children":3203},{},[3204],{"type":65,"value":3205},"Single project",{"type":59,"tag":173,"props":3207,"children":3208},{},[3209],{"type":65,"value":3210},"Cosmos 1.4.0+",{"type":59,"tag":146,"props":3212,"children":3213},{},[3214,3219,3230,3235],{"type":59,"tag":173,"props":3215,"children":3216},{},[3217],{"type":65,"value":3218},"3.1+ (FastAPI)",{"type":59,"tag":173,"props":3220,"children":3221},{},[3222,3228],{"type":59,"tag":187,"props":3223,"children":3225},{"className":3224},[],[3226],{"type":65,"value":3227},"DBT_DOCS_PROJECTS",{"type":65,"value":3229}," (JSON)",{"type":59,"tag":173,"props":3231,"children":3232},{},[3233],{"type":65,"value":3234},"One or more projects",{"type":59,"tag":173,"props":3236,"children":3237},{},[3238],{"type":65,"value":3239},"Cosmos 1.11.0+",{"type":59,"tag":68,"props":3241,"children":3242},{},[3243],{"type":65,"value":3244},"Airflow 2:",{"type":59,"tag":230,"props":3246,"children":3248},{"className":2977,"code":3247,"language":2979,"meta":235,"style":235},"AIRFLOW__COSMOS__DBT_DOCS_DIR=\"path\u002Fto\u002Fdocs\"                   # local path or S3\u002FGCS\u002FAzure\u002FHTTP URI; defaults to the dbt target\u002F folder\nAIRFLOW__COSMOS__DBT_DOCS_CONN_ID=\"my_conn_id\"                 # optional; for cloud storage\nAIRFLOW__COSMOS__DBT_DOCS_INDEX_FILE_NAME=\"static_index.html\"  # optional; only if docs built with --static\n",[3249],{"type":59,"tag":187,"props":3250,"children":3251},{"__ignoreMap":235},[3252,3284,3314],{"type":59,"tag":241,"props":3253,"children":3254},{"class":243,"line":244},[3255,3260,3264,3269,3274,3278],{"type":59,"tag":241,"props":3256,"children":3257},{"style":2989},[3258],{"type":65,"value":3259},"AIRFLOW__COSMOS__DBT_DOCS_DIR",{"type":59,"tag":241,"props":3261,"children":3262},{"style":2995},[3263],{"type":65,"value":2998},{"type":59,"tag":241,"props":3265,"children":3266},{"style":2995},[3267],{"type":65,"value":3268},"\"",{"type":59,"tag":241,"props":3270,"children":3271},{"style":3001},[3272],{"type":65,"value":3273},"path\u002Fto\u002Fdocs",{"type":59,"tag":241,"props":3275,"children":3276},{"style":2995},[3277],{"type":65,"value":3268},{"type":59,"tag":241,"props":3279,"children":3281},{"style":3280},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[3282],{"type":65,"value":3283},"                   # local path or S3\u002FGCS\u002FAzure\u002FHTTP URI; defaults to the dbt target\u002F folder\n",{"type":59,"tag":241,"props":3285,"children":3286},{"class":243,"line":253},[3287,3292,3296,3300,3305,3309],{"type":59,"tag":241,"props":3288,"children":3289},{"style":2989},[3290],{"type":65,"value":3291},"AIRFLOW__COSMOS__DBT_DOCS_CONN_ID",{"type":59,"tag":241,"props":3293,"children":3294},{"style":2995},[3295],{"type":65,"value":2998},{"type":59,"tag":241,"props":3297,"children":3298},{"style":2995},[3299],{"type":65,"value":3268},{"type":59,"tag":241,"props":3301,"children":3302},{"style":3001},[3303],{"type":65,"value":3304},"my_conn_id",{"type":59,"tag":241,"props":3306,"children":3307},{"style":2995},[3308],{"type":65,"value":3268},{"type":59,"tag":241,"props":3310,"children":3311},{"style":3280},[3312],{"type":65,"value":3313},"                 # optional; for cloud storage\n",{"type":59,"tag":241,"props":3315,"children":3316},{"class":243,"line":263},[3317,3322,3326,3330,3335,3339],{"type":59,"tag":241,"props":3318,"children":3319},{"style":2989},[3320],{"type":65,"value":3321},"AIRFLOW__COSMOS__DBT_DOCS_INDEX_FILE_NAME",{"type":59,"tag":241,"props":3323,"children":3324},{"style":2995},[3325],{"type":65,"value":2998},{"type":59,"tag":241,"props":3327,"children":3328},{"style":2995},[3329],{"type":65,"value":3268},{"type":59,"tag":241,"props":3331,"children":3332},{"style":3001},[3333],{"type":65,"value":3334},"static_index.html",{"type":59,"tag":241,"props":3336,"children":3337},{"style":2995},[3338],{"type":65,"value":3268},{"type":59,"tag":241,"props":3340,"children":3341},{"style":3280},[3342],{"type":65,"value":3343},"  # optional; only if docs built with --static\n",{"type":59,"tag":68,"props":3345,"children":3346},{},[3347],{"type":65,"value":3348},"Airflow 3.1+:",{"type":59,"tag":230,"props":3350,"children":3352},{"className":2977,"code":3351,"language":2979,"meta":235,"style":235},"AIRFLOW__COSMOS__DBT_DOCS_PROJECTS='{\n    \"my_project\": {\n        \"dir\": \"s3:\u002F\u002Fbucket\u002Fdocs\u002F\",\n        \"index\": \"index.html\",\n        \"conn_id\": \"aws_default\",\n        \"name\": \"My Project\"\n    }\n}'\n",[3353],{"type":59,"tag":187,"props":3354,"children":3355},{"__ignoreMap":235},[3356,3378,3386,3394,3402,3410,3418,3426],{"type":59,"tag":241,"props":3357,"children":3358},{"class":243,"line":244},[3359,3364,3368,3373],{"type":59,"tag":241,"props":3360,"children":3361},{"style":2989},[3362],{"type":65,"value":3363},"AIRFLOW__COSMOS__DBT_DOCS_PROJECTS",{"type":59,"tag":241,"props":3365,"children":3366},{"style":2995},[3367],{"type":65,"value":2998},{"type":59,"tag":241,"props":3369,"children":3370},{"style":2995},[3371],{"type":65,"value":3372},"'",{"type":59,"tag":241,"props":3374,"children":3375},{"style":3001},[3376],{"type":65,"value":3377},"{\n",{"type":59,"tag":241,"props":3379,"children":3380},{"class":243,"line":253},[3381],{"type":59,"tag":241,"props":3382,"children":3383},{"style":3001},[3384],{"type":65,"value":3385},"    \"my_project\": {\n",{"type":59,"tag":241,"props":3387,"children":3388},{"class":243,"line":263},[3389],{"type":59,"tag":241,"props":3390,"children":3391},{"style":3001},[3392],{"type":65,"value":3393},"        \"dir\": \"s3:\u002F\u002Fbucket\u002Fdocs\u002F\",\n",{"type":59,"tag":241,"props":3395,"children":3396},{"class":243,"line":272},[3397],{"type":59,"tag":241,"props":3398,"children":3399},{"style":3001},[3400],{"type":65,"value":3401},"        \"index\": \"index.html\",\n",{"type":59,"tag":241,"props":3403,"children":3404},{"class":243,"line":281},[3405],{"type":59,"tag":241,"props":3406,"children":3407},{"style":3001},[3408],{"type":65,"value":3409},"        \"conn_id\": \"aws_default\",\n",{"type":59,"tag":241,"props":3411,"children":3412},{"class":243,"line":290},[3413],{"type":59,"tag":241,"props":3414,"children":3415},{"style":3001},[3416],{"type":65,"value":3417},"        \"name\": \"My Project\"\n",{"type":59,"tag":241,"props":3419,"children":3420},{"class":243,"line":299},[3421],{"type":59,"tag":241,"props":3422,"children":3423},{"style":3001},[3424],{"type":65,"value":3425},"    }\n",{"type":59,"tag":241,"props":3427,"children":3428},{"class":243,"line":308},[3429,3434],{"type":59,"tag":241,"props":3430,"children":3431},{"style":3001},[3432],{"type":65,"value":3433},"}",{"type":59,"tag":241,"props":3435,"children":3436},{"style":2995},[3437],{"type":65,"value":3438},"'\n",{"type":59,"tag":68,"props":3440,"children":3441},{},[3442],{"type":65,"value":3443},"Pick by Airflow version, not project count. The single-project settings are the Airflow 2\npath; Cosmos publishes no deprecation notice for them — do not describe them as \"legacy\"\nor \"deprecated.\"",{"type":59,"tag":68,"props":3445,"children":3446},{},[3447,3448],{"type":65,"value":2962},{"type":59,"tag":99,"props":3449,"children":3452},{"href":3450,"rel":3451},"https:\u002F\u002Fastronomer.github.io\u002Fastronomer-cosmos\u002Fconfiguration\u002Fhosting-docs.html",[103],[3453],{"type":65,"value":3450},{"type":59,"tag":127,"props":3455,"children":3456},{},[],{"type":59,"tag":131,"props":3458,"children":3460},{"id":3459},"related-skills",[3461],{"type":65,"value":3462},"Related Skills",{"type":59,"tag":2758,"props":3464,"children":3465},{},[3466,3475,3485],{"type":59,"tag":2764,"props":3467,"children":3468},{},[3469,3473],{"type":59,"tag":81,"props":3470,"children":3471},{},[3472],{"type":65,"value":123},{"type":65,"value":3474},": For dbt Fusion projects (not dbt Core)",{"type":59,"tag":2764,"props":3476,"children":3477},{},[3478,3483],{"type":59,"tag":81,"props":3479,"children":3480},{},[3481],{"type":65,"value":3482},"authoring-dags",{"type":65,"value":3484},": General DAG authoring patterns",{"type":59,"tag":2764,"props":3486,"children":3487},{},[3488,3493],{"type":59,"tag":81,"props":3489,"children":3490},{},[3491],{"type":65,"value":3492},"testing-dags",{"type":65,"value":3494},": Testing DAGs after creation",{"type":59,"tag":3496,"props":3497,"children":3498},"style",{},[3499],{"type":65,"value":3500},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3502,"total":2239},[3503,3517,3529,3545,3559,3576,3589,3599,3614,3628,3638,3651],{"slug":14,"name":14,"fn":3504,"description":3505,"org":3506,"tags":3507,"stars":24,"repoUrl":25,"updatedAt":3516},"manage and troubleshoot Airflow via CLI","Queries, manages, and troubleshoots Apache Airflow using the `af` CLI. Use when working with anything related to Airflow - a DAG, a DAG run, a task log, an import or parse error, a broken DAG, or any Airflow operation. Covers listing and triggering DAGs, retrying runs, reading task logs, diagnosing failures, debugging import and parse errors, checking connections, variables and pools, exploring the REST API, and monitoring health (for example \"trigger a pipeline\", \"retry a run\", \"list connections\", \"check Airflow health\", \"why did my DAG fail\"). This is the entrypoint that routes to sibling skills for authoring, testing, deploying, and migrating Airflow 2 to 3. Not for warehouse\u002FSQL analytics on Airflow metadata tables (use analyzing-data); for deep root-cause reports use debugging-dags or airflow-investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3508,3509,3512,3513],{"name":13,"slug":14,"type":15},{"name":3510,"slug":3511,"type":15},"CLI","cli",{"name":20,"slug":21,"type":15},{"name":3514,"slug":3515,"type":15},"Debugging","debugging","2026-04-06T18:01:43.992997",{"slug":3518,"name":3518,"fn":3519,"description":3520,"org":3521,"tags":3522,"stars":24,"repoUrl":25,"updatedAt":3528},"airflow-hitl","add human-in-the-loop steps to Airflow DAGs","Builds human-in-the-loop (HITL) Airflow workflows - approval gates, form input, and human-driven branching. Use when a DAG needs a human in the loop - an approval or reject step, sign-off before a task runs, a decision or approval UI, branching on a human choice, or collecting form input mid-run; also on mentions of ApprovalOperator, HITLOperator, HITLBranchOperator, HITLEntryOperator, or HITLTrigger. Requires Airflow 3.1+. Not for AI\u002FLLM task calls (see migrating-ai-sdk-to-common-ai).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3523,3524,3527],{"name":13,"slug":14,"type":15},{"name":3525,"slug":3526,"type":15},"Approvals","approvals",{"name":20,"slug":21,"type":15},"2026-04-06T18:01:46.758548",{"slug":3530,"name":3530,"fn":3531,"description":3532,"org":3533,"tags":3534,"stars":24,"repoUrl":25,"updatedAt":3544},"airflow-plugins","build Airflow UI plugins","Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use when building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface - creating an Airflow plugin, adding a custom UI page or nav entry, building FastAPI-backed endpoints inside Airflow, serving static assets from a plugin, embedding a React app, adding middleware to the API server, creating custom operator extra links, or calling the Airflow REST API from inside a plugin; also when AirflowPlugin, fastapi_apps, external_views, react_apps, or plugin registration come up.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3535,3536,3539,3541],{"name":13,"slug":14,"type":15},{"name":3537,"slug":3538,"type":15},"Plugin Development","plugin-development",{"name":3540,"slug":234,"type":15},"Python",{"name":3542,"slug":3543,"type":15},"UI Components","ui-components","2026-04-06T18:01:56.827891",{"slug":3546,"name":3546,"fn":3547,"description":3548,"org":3549,"tags":3550,"stars":24,"repoUrl":25,"updatedAt":3558},"airflow-state-store","persist Airflow task and asset state","Persists task and asset state across retries and DAG runs using Airflow 3.3's AIP-103 key\u002Fvalue stores (`task_state_store`, `asset_state_store`) and the crash-safe `ResumableJobMixin`. Use when the user asks about task state store, checkpointing in tasks, persisting state across retries, job IDs surviving worker crashes, watermarks, asset metadata, resumable tasks, crash-safe operators, or \"what's new in Airflow 3.3\". Also use proactively when reading a DAG that uses Variables or XCom for intra-task coordination state — flag the anti-pattern and recommend task_state_store or asset_state_store instead. Requires Airflow 3.3+.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3551,3552,3554,3555],{"name":13,"slug":14,"type":15},{"name":3553,"slug":38,"type":15},"Data Engineering",{"name":20,"slug":21,"type":15},{"name":3556,"slug":3557,"type":15},"Operations","operations","2026-07-07T06:43:11.160671",{"slug":3560,"name":3560,"fn":3561,"description":3562,"org":3563,"tags":3564,"stars":24,"repoUrl":25,"updatedAt":3575},"analyzing-data","query data warehouses for business questions","Queries the data warehouse with SQL and answers business questions about data. Use when answering anything that needs warehouse data - counts, metrics, trends, aggregations, joins across tables, data lookups, or ad-hoc SQL analysis (for example \"who uses X\", \"how many Y\", \"show me Z\", \"find customers\", \"what is the count\").",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3565,3568,3571,3572],{"name":3566,"slug":3567,"type":15},"Analytics","analytics",{"name":3569,"slug":3570,"type":15},"Data Analysis","data-analysis",{"name":3553,"slug":38,"type":15},{"name":3573,"slug":3574,"type":15},"SQL","sql","2026-04-06T18:01:49.599775",{"slug":3577,"name":3577,"fn":3578,"description":3579,"org":3580,"tags":3581,"stars":24,"repoUrl":25,"updatedAt":3588},"annotating-task-lineage","annotate Airflow tasks with data lineage","Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input\u002Foutput datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3582,3583,3584,3585],{"name":13,"slug":14,"type":15},{"name":3553,"slug":38,"type":15},{"name":20,"slug":21,"type":15},{"name":3586,"slug":3587,"type":15},"Observability","observability","2026-04-06T18:02:03.487365",{"slug":3482,"name":3482,"fn":3590,"description":3591,"org":3592,"tags":3593,"stars":24,"repoUrl":25,"updatedAt":3598},"author Airflow DAGs","Workflow and best practices for writing Apache Airflow DAGs. Use when creating a new DAG, write pipeline code, handling questions about DAG patterns and conventions or extending an existing DAG with a follow-up\u002Fdownstream task. ANY request shaped like 'add a DAG named X', 'write a pipeline', 'add a task that runs after Y', or 'extend the DAG'. For testing and debugging DAGs, see the testing-dags skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3594,3595,3596,3597],{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":3540,"slug":234,"type":15},"2026-04-06T18:01:52.679888",{"slug":3600,"name":3600,"fn":3601,"description":3602,"org":3603,"tags":3604,"stars":24,"repoUrl":25,"updatedAt":3613},"authoring-go-sdk-tasks","implement Airflow tasks in Go","Writes Airflow task logic in Go using the Airflow Go SDK. Use when the user wants to implement Airflow tasks in Go, asks about `BundleProvider`\u002F`RegisterDags`, the `bundlev1` Registry\u002FDag interfaces, registering Go tasks (`AddTask`\u002F`AddTaskWithName`), dependency injection by parameter type (`context.Context`, `sdk.TIRunContext`, `*slog.Logger`, `sdk.Client`), or reading connections\u002Fvariables\u002FXComs from Go. This skill covers the Go-specific native API; the shared Python-stub pattern and conceptual model live in authoring-language-sdk-tasks. For building\u002Fpacking\u002Fshipping the bundle see deploying-go-sdk-bundles; for coordinator config see configuring-airflow-language-sdks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3605,3606,3609,3610],{"name":13,"slug":14,"type":15},{"name":3607,"slug":3608,"type":15},"API Development","api-development",{"name":20,"slug":21,"type":15},{"name":3611,"slug":3612,"type":15},"Go","go","2026-07-11T05:39:13.552213",{"slug":3615,"name":3615,"fn":3616,"description":3617,"org":3618,"tags":3619,"stars":24,"repoUrl":25,"updatedAt":3627},"authoring-java-sdk-tasks","implement Airflow tasks in Java","Writes Airflow task logic in Java, Kotlin, or any JVM language using the Airflow Java SDK. Use when the user wants to implement Airflow tasks in Java\u002FJVM, asks about `@Builder.Dag`\u002F`@Builder.Task`\u002F`@Builder.XCom`, the `Task`\u002F`BundleBuilder` interfaces, reading connections\u002Fvariables\u002FXComs from Java, the JSON-to-Java type mapping, or logging from Java tasks. This skill covers the Java-specific native API; the shared Python-stub pattern and conceptual model live in authoring-language-sdk-tasks. For building\u002Fshipping the bundle see deploying-java-sdk-bundles; for coordinator config see configuring-airflow-language-sdks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3620,3621,3624],{"name":20,"slug":21,"type":15},{"name":3622,"slug":3623,"type":15},"Engineering","engineering",{"name":3625,"slug":3626,"type":15},"Java","java","2026-07-18T05:48:13.374003",{"slug":3629,"name":3629,"fn":3630,"description":3631,"org":3632,"tags":3633,"stars":24,"repoUrl":25,"updatedAt":3637},"authoring-language-sdk-tasks","implement non-Python Airflow tasks","The language-neutral foundation for Airflow language SDKs — implement task logic in a non-Python language while the DAG stays in Python. Use when the user wants to run an Airflow task in another language (Java, Kotlin, Go, or other JVM\u002Fnative languages), asks how the Python `@task.stub` pairs with native task code, how task\u002FDAG IDs must match across the two sides, how data passes via XCom as JSON, or which language SDKs exist. This skill owns the shared Python-stub pattern and conceptual model; for a specific language's native API, build, and runtime, use that language's skill (e.g. authoring-java-sdk-tasks, authoring-go-sdk-tasks).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3634,3635,3636],{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},{"name":3622,"slug":3623,"type":15},"2026-07-18T05:11:54.496539",{"slug":3639,"name":3639,"fn":3640,"description":3641,"org":3642,"tags":3643,"stars":24,"repoUrl":25,"updatedAt":3650},"blueprint","build reusable Airflow task group templates","Define reusable Airflow task group templates with Pydantic validation and compose DAGs from YAML. Use when creating blueprint templates, composing DAGs from YAML, validating configurations, or enabling no-code DAG authoring for non-engineers.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3644,3645,3646,3647],{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":3648,"slug":3649,"type":15},"Templates","templates","2026-04-06T18:01:45.361425",{"slug":3652,"name":3652,"fn":3653,"description":3654,"org":3655,"tags":3656,"stars":24,"repoUrl":25,"updatedAt":3663},"checking-freshness","check data freshness in warehouses","Quick data freshness check. Use when the user asks if data is up to date, when a table was last updated, if data is stale, or needs to verify data currency before using it.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3657,3658,3659,3662],{"name":13,"slug":14,"type":15},{"name":3553,"slug":38,"type":15},{"name":3660,"slug":3661,"type":15},"Data Quality","data-quality",{"name":17,"slug":18,"type":15},"2026-04-06T18:02:02.138565",{"items":3665,"total":2239},[3666,3673,3679,3686,3693,3700,3707],{"slug":14,"name":14,"fn":3504,"description":3505,"org":3667,"tags":3668,"stars":24,"repoUrl":25,"updatedAt":3516},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3669,3670,3671,3672],{"name":13,"slug":14,"type":15},{"name":3510,"slug":3511,"type":15},{"name":20,"slug":21,"type":15},{"name":3514,"slug":3515,"type":15},{"slug":3518,"name":3518,"fn":3519,"description":3520,"org":3674,"tags":3675,"stars":24,"repoUrl":25,"updatedAt":3528},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3676,3677,3678],{"name":13,"slug":14,"type":15},{"name":3525,"slug":3526,"type":15},{"name":20,"slug":21,"type":15},{"slug":3530,"name":3530,"fn":3531,"description":3532,"org":3680,"tags":3681,"stars":24,"repoUrl":25,"updatedAt":3544},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3682,3683,3684,3685],{"name":13,"slug":14,"type":15},{"name":3537,"slug":3538,"type":15},{"name":3540,"slug":234,"type":15},{"name":3542,"slug":3543,"type":15},{"slug":3546,"name":3546,"fn":3547,"description":3548,"org":3687,"tags":3688,"stars":24,"repoUrl":25,"updatedAt":3558},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3689,3690,3691,3692],{"name":13,"slug":14,"type":15},{"name":3553,"slug":38,"type":15},{"name":20,"slug":21,"type":15},{"name":3556,"slug":3557,"type":15},{"slug":3560,"name":3560,"fn":3561,"description":3562,"org":3694,"tags":3695,"stars":24,"repoUrl":25,"updatedAt":3575},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3696,3697,3698,3699],{"name":3566,"slug":3567,"type":15},{"name":3569,"slug":3570,"type":15},{"name":3553,"slug":38,"type":15},{"name":3573,"slug":3574,"type":15},{"slug":3577,"name":3577,"fn":3578,"description":3579,"org":3701,"tags":3702,"stars":24,"repoUrl":25,"updatedAt":3588},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3703,3704,3705,3706],{"name":13,"slug":14,"type":15},{"name":3553,"slug":38,"type":15},{"name":20,"slug":21,"type":15},{"name":3586,"slug":3587,"type":15},{"slug":3482,"name":3482,"fn":3590,"description":3591,"org":3708,"tags":3709,"stars":24,"repoUrl":25,"updatedAt":3598},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3710,3711,3712,3713],{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":3540,"slug":234,"type":15}]