ashb commented on a change in pull request #3939: [AIRFLOW-3104] Add
.airflowignore info into doc
URL: https://github.com/apache/incubator-airflow/pull/3939#discussion_r220855874
##########
File path: docs/concepts.rst
##########
@@ -863,3 +863,30 @@ do the same, but then it is more to use a virtualenv and
pip.
to be available on the system if a module needs those. In other words only
pure python modules can be packaged.
+
+.airflowignore
+''''''''''''''
+
+A ``.airflowignore`` file specifies the directories or files in ``DAG_FOLDER``
+that Airflow should intentionally ignore. Each line in ``.airflowignore``
+specifies a regular expression pattern, and directories or files whose names
+(not DAG id) match any of the patterns would be ignored (under the hood,
+``re.findall()`` is used to match the pattern). Overall it works like a
+``.gitignore`` file.
+
+``.airflowignore`` file should be put in your ``DAG_FOLDER``.
+For example, you can prepare a ``.airflowignore`` file with contents
+
+.. code::
+
+ project_a
+ tenant_[\d]
+
+
+Then files like "project_a_dag_1.py", "TESTING_project_a.py", "tenant_1.py",
+"project_a/dag_1.py", and "tenant_1/dag_1.py" in your ``DAG_FOLDER`` would be
ignored.
Review comment:
One small clarification here (that maybe doesn't matter) but if a directory
matches a pattern then Airflow doesn't look at any files or sub-directories in
it either - this is useful to exclude whole directories with a large number of
files which can slow down airflow DAG finding.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services