You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection of [Airflow](https://airflow.apache.org/) operators, hooks, and utilities to execute [`dbt`](https://pypi.org/project/dbt-core/) commands.
9
+
A collection of [*Airflow*](https://airflow.apache.org/) operators, hooks, and utilities to execute [*dbt*](https://pypi.org/project/dbt-core/) commands.
10
10
11
11
Read the [documentation](https://airflow-dbt-python.readthedocs.io) for examples, installation instructions, and more details.
12
12
@@ -16,20 +16,20 @@ Read the [documentation](https://airflow-dbt-python.readthedocs.io) for examples
16
16
17
17
Before using *airflow-dbt-python*, ensure you meet the following requirements:
18
18
* A *dbt* project using [dbt-core](https://pypi.org/project/dbt-core/) version 1.8 or later.
19
-
* An Airflow environment using version 2.8 or later.
19
+
* An *Airflow* deployment using version 3.0 or later.
20
20
21
-
* If using any managed service, like AWS MWAA or GCP Cloud Composer 2/3, ensure your environment is created with a supported version of Airflow.
22
-
* If self-hosting, Airflow installation instructions can be found in their [official documentation](https://airflow.apache.org/docs/apache-airflow/stable/installation/index.html).
21
+
* If using any managed *Airflow*service, like [AWS MWAA](https://aws.amazon.com/managed-workflows-for-apache-airflow/) or [GCP Cloud Composer](https://cloud.google.com/composer), ensure your environment is created with a supported version of *Airflow*.
22
+
* If self-hosting, *Airflow* installation instructions can be found in their [official documentation](https://airflow.apache.org/docs/apache-airflow/stable/installation/index.html).
23
23
24
-
*Running Python 3.9 or later in your Airflow environment.
24
+
* Python 3.10 or later.
25
25
26
26
> **Warning**
27
27
>
28
-
> Even though we don't impose any upper limits on versions of Airflow and *dbt*, it's possible that new versions are not supported immediately after release, particularly for*dbt*. We recommend testing the latest versions before upgrading and [reporting any issues](https://github.com/tomasfarias/airflow-dbt-python/issues/new/choose).
28
+
> New versions of *Airflow* and *dbt* may introduce breaking changes. We recommend testing any new versions of *Airflow* and*dbt*before upgrading production systems; Please [report any issues](https://github.com/tomasfarias/airflow-dbt-python/issues/new/choose) that may arise during testing so they can be addressed.
29
29
30
30
> **Note**
31
31
>
32
-
> Older versions of Airflow and *dbt* may work with *airflow-dbt-python*, although we cannot guarantee this. Our testing pipeline runs the latest *dbt-core* with the latest Airflow release, and the latest version supported by [AWS MWAA](https://aws.amazon.com/managed-workflows-for-apache-airflow/) and [GCP Cloud Composer 2/3](https://aws.amazon.com/managed-workflows-for-apache-airflow/).
32
+
> We only test *airflow-dbt-python* against a limited set of versions of *Airflow* and *dbt*, and try to keep up with the latest releases. For *Airflow*, our policy is to cover with tests the latest release of *Airflow*, the latest version available in [GCP Cloud Composer](https://docs.cloud.google.com/composer/docs/composer-versions), and the latest version available in [AWS MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions). For *dbt*, our policy is to cover the last two minor versions.
33
33
34
34
## From PyPI
35
35
@@ -45,7 +45,7 @@ As a convenience, some *dbt* adapters can be installed by specifying extras. For
45
45
pip install airflow-dbt-python[redshift]
46
46
```
47
47
48
-
## From this repo
48
+
## Building from source
49
49
50
50
*airflow-dbt-python* can also be built from source by cloning this GitHub repository:
@@ -70,7 +70,7 @@ Read the [documentation](https://airflow-dbt-python.readthedocs.io/en/latest/get
70
70
71
71
Add *airflow-dbt-python* to your PyPI packages list.
72
72
73
-
Read the [documentation](https://cloud.google.com/composer/docs/composer-2/install-python-dependencies#install-pypi)for more a more detailed GCP Cloud Composer 2 installation breakdown.
73
+
Refer to the [GCP Cloud Composer documentation](https://cloud.google.com/composer/docs/composer-3/install-python-dependencies#install-pypi)on how to do this.
Copy file name to clipboardExpand all lines: docs/development.rst
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,16 +41,18 @@ The additional extras install dependencies required for testing. If testing a sp
41
41
Support for different versions of *Airflow*
42
42
-------------------------------------------
43
43
44
-
*airflow-dbt-python* supports and is tested with multiple versions of Airflow; as a general rule, besides the latest version of Airflow, we test *airflow-dbt-python* against the latest version available in `AWS MWAA <https://aws.amazon.com/managed-workflows-for-apache-airflow/>`_, which usually lags behind a few minor versions. We are open to patches to improve backwards compatibility as long as they don't increase maintenance load significantly.
44
+
*airflow-dbt-python* is tested against against multiple versions of *Airflow*; as a general rule, besides the latest version of Airflow, we test *airflow-dbt-python* against the latest version available in `AWS MWAA <https://aws.amazon.com/managed-workflows-for-apache-airflow/>`_, which usually lags behind a few minor versions.
45
45
46
-
If you wish to install a different version of Airflow for testing you may skip the *airflow-providers* extras of the previous section and use *pip* instead to install any versions of *apache-airflow* and required providers.
46
+
We are open to patches to improve backwards compatibility as long as they don't increase maintenance load significantly.
47
+
48
+
If you wish to install a different version of *Airflow* for testing you may skip the *airflow-providers* extras of the previous section and use *pip* instead to install any versions of *apache-airflow* and required providers.
47
49
48
50
Modifying dependencies
49
51
----------------------
50
52
51
-
Apache Airflow is a package of significant size that requires a lot of dependencies. Together with *dbt-core*, it's common to find dependency conflicts all over the place. Ultimately, we allow users to figure these issues out themselves, as most of the dependency conflicts are harmless: We do not interact with the *dbt* CLI, so any conflicts with CLI-specific packages can be safely ignored, but these requirements are not optional for *dbt-core*.
53
+
*Apache Airflow* is a package of significant size that requires a lot of dependencies. Together with *dbt-core*, it's common to find dependency conflicts all over the place. Ultimately, we allow users to figure these issues out themselves, as most of the dependency conflicts are harmless: We do not interact with the *dbt* CLI, so any conflicts with CLI-specific packages can be safely ignored, but these requirements are not optional for *dbt-core*.
52
54
53
-
All being said, this presents a problem when we try to add dependencies or modify existing ones. Grabbing a constraints file from `Airflow <https://github.com/apache/airflow>`_ and adding it as an optional group in ``pyproject.toml`` can be a useful strategy.
55
+
All being said, this presents a problem when we try to add dependencies or modify existing ones. Grabbing a constraints file from `*Airflow*<https://github.com/apache/airflow>`_ and adding it as an optional group in ``pyproject.toml`` can be a useful strategy.
54
56
55
57
Pre-commit hooks
56
58
----------------
@@ -86,12 +88,12 @@ Tests are available for all operators, hooks, and utilities. That being said, on
86
88
.. note::
87
89
Unit tests (and *airflow-dbt-python*) assume *dbt* works correctly and do not assert the behavior of the *dbt* commands in depth.
88
90
89
-
Testing specific requirements
90
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91
+
Requirements
92
+
^^^^^^^^^^^^
91
93
92
94
Unit tests interact with a `PostgreSQL <https://www.postgresql.org/>`_ database as a target to run dbt commands. This requires *PostgreSQL* to be installed in your local environment. Installation instructions for all major platforms can be found `here <https://www.postgresql.org/download/>`_.
93
95
94
-
An Airflow database needs to be initialized in your local environment. This requires choosing a location for it, via the ``AIRFLOW_HOME`` environment variable. The same directory where *airflow-dbt-python* was cloned to can be used for this:
96
+
An *Airflow* database needs to be initialized in your local environment. This requires choosing a location for it, via the ``AIRFLOW_HOME`` environment variable. The same directory where *airflow-dbt-python* was cloned to can be used for this:
Copy file name to clipboardExpand all lines: docs/example_dags.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Example DAGs
4
4
This section contains a few DAGs showing off some dbt pipelines to get you going.
5
5
6
6
.. warning::
7
-
All example DAGs are tested against against ``apache-airflow==2.2.5``. Some changes, like modifying ``import`` statements or changing types, may be required for them to work in environments running other versions of Airflow.
7
+
All example DAGs are tested against a subset of *Airflow* versions. Some changes, like modifying ``import`` statements or changing types, may be required for them to work in environments running other versions of *Airflow*.
Copy file name to clipboardExpand all lines: docs/getting_started.rst
+28-19Lines changed: 28 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,23 @@ Requirements
10
10
11
11
Before using *airflow-dbt-python*, ensure you meet the following requirements:
12
12
* A *dbt* project using `dbt-core <https://pypi.org/project/dbt-core/>`_ version 1.8 or later.
13
-
* An Airflow environment using version 2.8 or later.
13
+
* An *Airflow* environment using version 3.0 or later.
14
14
15
-
* If using any managed service, like AWS MWAA or GCP Cloud Composer 2/3, ensure your environment is created with a supported version of Airflow.
16
-
* If self-hosting, Airflow installation instructions can be found in their `official documentation <https://airflow.apache.org/docs/apache-airflow/stable/installation/index.html>`_.
15
+
* If using any managed *Airflow* service, like `AWS MWAA <https://aws.amazon.com/managed-workflows-for-apache-airflow/>`_ or `GCP Cloud Composer <https://cloud.google.com/composer>`_, ensure your environment is created with a supported version of *Airflow*.
16
+
* If self-hosting, *Airflow* installation instructions can be found in their `official documentation <https://airflow.apache.org/docs/apache-airflow/stable/installation/index.html>`_.
17
17
18
-
* Running Python 3.9 or later in your Airflow environment.
18
+
* Python 3.10 or later.
19
19
20
20
.. warning::
21
-
Even though we don't impose any upper limits on versions of Airflow and *dbt*, it's possible that new versions are not supported immediately after release, particularly for *dbt*. We recommend testing the latest versions before upgrading and `reporting any issues <https://github.com/tomasfarias/airflow-dbt-python/issues/new/choose>`_.
21
+
New versions of *Airflow* and *dbt* may introduce breaking changes. We recommend testing any new versions of *Airflow* and *dbt*before upgrading production systems; Please `report any issues <https://github.com/tomasfarias/airflow-dbt-python/issues/new/choose>`_ that may arise during testing so they can be addressed.
22
22
23
23
.. note::
24
-
Older versions of Airflow and *dbt* may work with *airflow-dbt-python*, although we cannot guarantee this. Our testing pipeline runs the latest *dbt-core* with the latest Airflow release, and the latest version supported by `AWS MWAA <https://aws.amazon.com/managed-workflows-for-apache-airflow/>`_ and `GCP Cloud Composer 2/3 <https://aws.amazon.com/managed-workflows-for-apache-airflow/>`_.
24
+
We only test *airflow-dbt-python* against a limited set of versions of *Airflow* and *dbt*, and try to keep up with the latest releases. For *Airflow*, our policy is to cover with tests the latest release of *Airflow*, the latest version available in `GCP Cloud Composer <https://docs.cloud.google.com/composer/docs/composer-versions>`_, and the latest version available in `AWS MWAA <https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions>`_. For *dbt*, our policy is to cover the last two minor versions.
25
25
26
26
Installation
27
27
------------
28
28
29
-
Your installation will vary according to your specific Airflow environment setup. These instructions cover a general approach by installing from PyPI or the GitHub repository, and how to install it in AWS MWAA. Other serviced offerings may require different steps, check the documentation of your managed service.
29
+
Your installation will vary according to your specific Airflow environment setup. These instructions cover installing from PyPI, building the GitHub repository directly, installing in AWS MWAA, and installing in GCP Cloud Composer. Other serviced offerings may require different steps, check the documentation of your managed service.
Add *airflow-dbt-python* to your ``requirements.txt`` file and edit your *Airflow* environment to use this new ``requirements.txt`` file, or upload it as a plugin.
79
75
80
-
*airflow-dbt-python* can be installed in an Airflow environment managed by AWS via their `Managed Workflows for Apache Airflow <https://aws.amazon.com/managed-workflows-for-apache-airflow/>`_ service.
81
-
82
-
To do so, include *airflow-dbt-python* in the *requirements.txt* file provided to MWAA, for example:
76
+
To do so, include *airflow-dbt-python* in the ``requirements.txt`` file provided to AWS MWAA, for example:
83
77
84
78
.. code-block:: shell
85
79
:caption: requirements.txt
@@ -110,6 +104,21 @@ The wheel file can now be added to your *plugins.zip*, and the requirements can
Add *airflow-dbt-python* to your PyPI packages list.
111
+
112
+
Refer to the `GCP Cloud Composer documentation <https://cloud.google.com/composer/docs/composer-3/install-python-dependencies#install-pypi>`_ on how to do this.
113
+
114
+
In other managed services
115
+
^^^^^^^^^^^^^^^^^^^^^^^^^
116
+
117
+
*airflow-dbt-python* should be compatible with most or all *Airflow* managed services. Consult the documentation specific to your provider.
118
+
119
+
If you notice an issue when installing *airflow-dbt-python* in a specific managed service, please open an `issue <https://github.com/tomasfarias/airflow-dbt-python/issues/new/choose>`_.
0 commit comments