Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIP-47 - Migrate apache pig DAGs to new design #22439 #24212

Merged
merged 1 commit into from
Jun 5, 2022
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
17 changes: 0 additions & 17 deletions airflow/providers/apache/pig/example_dags/__init__.py

This file was deleted.

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

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

Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-apache-pig/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Pig programs are amenable to substantial parallelization, which in turns enables

use the PigOperator to execute a pig script

.. exampleinclude:: /../../airflow/providers/apache/pig/example_dags/example_pig.py
.. exampleinclude:: /../../tests/system/providers/apache/pig/example_pig.py
:language: python
:start-after: [START create_pig]
:end-before: [END create_pig]
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,34 @@
# under the License.

"""Example DAG demonstrating the usage of the PigOperator."""

import os
from datetime import datetime

from airflow import DAG
from airflow.providers.apache.pig.operators.pig import PigOperator

dag = DAG(
ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
DAG_ID = "example_adf_run_pipeline"

with DAG(
dag_id='example_pig_operator',
schedule_interval=None,
start_date=datetime(2021, 1, 1),
catchup=False,
tags=['example'],
)

# [START create_pig]
run_this = PigOperator(
task_id="run_example_pig_script",
pig="ls /;",
pig_opts="-x local",
dag=dag,
)
# [END create_pig]
) as dag:

# [START create_pig]
run_this = PigOperator(
task_id="run_example_pig_script",
pig="ls /;",
pig_opts="-x local",
)
# [END create_pig]


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)