Skip to content

Commit

Permalink
AIP-47 - Migrate drill DAGs to new design apache#22439
Browse files Browse the repository at this point in the history
  • Loading branch information
chethanuk committed Jun 5, 2022
1 parent acf8951 commit 0e00be3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
16 changes: 0 additions & 16 deletions airflow/providers/apache/drill/example_dags/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-apache-drill/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Content
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/main/airflow/providers/apache/drill/example_dags>
Example DAGs <https://github.com/apache/airflow/tree/main/tests/system/providers/apache/drill>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-apache-drill/>
Installing from sources <installing-providers-from-sources>

Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-apache-drill/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Executes one or more SQL queries on an Apache Drill server. The ``sql`` paramet
Using the operator
""""""""""""""""""

.. exampleinclude:: /../../airflow/providers/apache/drill/example_dags/example_drill_dag.py
.. exampleinclude:: /../../tests/system/providers/apache/drill/example_drill_dag.py
:language: python
:dedent: 4
:start-after: [START howto_operator_drill]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
"""
Example Airflow DAG to execute SQL in an Apache Drill environment using the `DrillOperator`.
"""

import os
from datetime import datetime

from airflow.models import DAG
from airflow.providers.apache.drill.operators.drill import DrillOperator

ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
DAG_ID = "example_drill_dag"

with DAG(
dag_id='example_drill_dag',
dag_id=DAG_ID,
schedule_interval=None,
start_date=datetime(2021, 1, 1),
catchup=False,
Expand All @@ -40,3 +45,8 @@
''',
)
# [END howto_operator_drill]

from tests.system.utils import get_test_run # noqa: E402

# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)

0 comments on commit 0e00be3

Please sign in to comment.