Operators#

Cosmos exposes individual operators that correspond to specific dbt commands, which can be used just like traditional Apache Airflow® operators. Cosmos names these operators using the format Dbt<dbt-command><execution-mode>Operator. For example, DbtBuildLocalOperator.

Clone#

Requirement

  • Cosmos >= 1.8.0

  • dbt-core >= 1.6.0

The DbtCloneLocalOperator implement dbt clone command.

Example of how to use

    clone_operator = DbtCloneLocalOperator(
        profile_config=profile_config,
        project_dir=DBT_PROJ_DIR,
        task_id="clone",
        dbt_cmd_flags=["--models", "stg_customers", "--state", DBT_ARTIFACT],
        install_deps=True,
        append_env=True,
    )