Skip to content

Commit

Permalink
Doc: Fix incorrect filename references (#20277)
Browse files Browse the repository at this point in the history
Minor typo corrections. I changed the filenames in the example folder structure instead of the later references to be consistent with the other examples in the documentation.
  • Loading branch information
robertoea authored Dec 16, 2021
1 parent 2409760 commit d11087c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/apache-airflow/modules_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ This is an example structure that you might have in your ``dags`` folder:
|
| my_custom_dags
| __init__.py
| my_dag_1.py
| my_dag_2.py
| my_dag1.py
| my_dag2.py
| base_dag.py
In the case above, there are the ways you could import the python files:
Expand All @@ -123,7 +123,7 @@ shared code in the other folders, not the actual DAGs).

In the example above the dags are only in ``my_custom_dags`` folder, the ``common_package`` should not be
scanned by scheduler when searching for DAGS, so we should ignore ``common_package`` folder. You also
want to ignore the ``base_dag`` if you keep a base DAG there that ``my_dag1.py`` and ``my_dag1.py`` derives
want to ignore the ``base_dag.py`` if you keep a base DAG there that ``my_dag1.py`` and ``my_dag2.py`` derives
from. Your ``.airflowignore`` should look then like this:

.. code-block:: none
Expand Down Expand Up @@ -186,7 +186,7 @@ You should import such shared dag using full path (starting from the directory w
The relative imports are counter-intuitive, and depending on how you start your python code, they can behave
differently. In Airflow the same DAG file might be parsed in different contexts (by schedulers, by workers
or during tests) and in those cases, relatives imports might behave differently. Always use full
or during tests) and in those cases, relative imports might behave differently. Always use full
python package paths when you import anything in Airflow DAGs, this will save you a lot of troubles.
You can read more about relative import caveats in
`this Stack Overflow thread <https://stackoverflow.com/q/16981921/516701>`_.
Expand Down

0 comments on commit d11087c

Please sign in to comment.