2 Comments
Oct 7, 2023ยทedited Oct 7, 2023

Upon closer examination, it becomes evident that orchestrating dbt models can be done similarly in Airflow and Dagster. In Dagster, models are orchestrated as software assets, while in Airflow, they are orchestrated as tasks.

(1 dbt DAG=1 Airflow task or 1 dbt model=1 Airflow task).

Simply recreate your dbt DAG in your Airflow and you are done! This approach is similar to Dagster.

Essentially, both tools follow comparable approaches. The core concept remains fundamentally the same. It's akin to what Shakespeare famously said: "A rose by any other name would smell as sweet."

Regarding errors, in Airflow, you typically debug at the task level .You can view task logs, inspect task dependencies, and rerun individual tasks if needed. This approach is conceptually similar but uses different terminology. An entire dbt DAG run can be triggered by a single Airflow task. This approach is akin to representing the entire dbt DAG as a 'black box'. Alternatively, you can map each dbt model to an individual Airflow task. While this introduces complexity, especially in larger projects, it provides finer-grained control over tasks, including handling failures and reruns.

Expand full comment
author
Oct 9, 2023ยทedited Oct 9, 2023Author

Hi Gul Saeed Khattak,

Thanks for your reply.

While it is technically possible to map your DBT DAG with Airflow with one model = one task, it's not really practical:

- It involves a significant amount of manual work to set up.

- It adds additional overhead in terms of maintenance, as you would need to manually add new tasks to Airflow every time you introduce new models in your DBT DAG.

- you miss out on leveraging model dependencies (downstream/upstream) when running subsets of your DAG.

As mentioned in the article, on top of that, Dagster provides additional functionalities for backfilling that would not be possible with Airflow as well.

Expand full comment