Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions airflow/providers/presto/example_dags/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-presto/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/presto/example_dags>
Example DAGs <https://github.com/apache/airflow/tree/main/tests/system/providers/presto>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-presto/>
Installing from sources <installing-providers-from-sources>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This operator assumes that CSV does not have headers and the data is correspondi
pre-existing presto table. Optionally, you can provide schema as tuple/list of strings or as a path to a
JSON file in the same bucket as the CSV file.

.. exampleinclude:: /../../airflow/providers/presto/example_dags/example_gcs_to_presto.py
.. exampleinclude:: /../../tests/system/providers/presto/example_gcs_to_presto.py
:language: python
:dedent: 4
:start-after: [START gcs_csv_to_presto_table]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
BUCKET = os.environ.get("GCP_GCS_BUCKET", "test28397yeo")
PATH_TO_FILE = os.environ.get("GCP_PATH", "path/to/file")
PRESTO_TABLE = os.environ.get("PRESTO_TABLE", "test_table")
ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
DAG_ID = "example_gcs_to_presto"

with models.DAG(
dag_id="example_gcs_to_presto",
dag_id=DAG_ID,
schedule_interval='@once', # Override to match your needs
start_date=datetime(2022, 1, 1),
catchup=False,
Expand All @@ -44,3 +46,9 @@
presto_table=PRESTO_TABLE,
)
# [END gcs_csv_to_presto_table]


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)