Registry /
workflow / apache-airflow-providers-apache-pig
Apache Airflow provider for Apache Pig. Version 4.8.4 requires Airflow >=2.9.0 and Python >=3.10. This provider allows Airflow to run Pig jobs via the PigOperator. Release cadence follows Airflow's provider release cycle (monthly).
Install & Compatibility
Where this runs
tested against v4.8.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 5.232s · 250.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 23.3s · import 4.816s · 248MB
250MB installed
● package 250MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PigOperator
✓ from airflow.providers.apache.pig.operators.pig import PigOperator
Correct import path after provider restructuring (Airflow 2.0+).
Basic DAG using PigOperator. Note: 'pig_cli_conn_id' must be set to a connection with your Pig CLI environment.
from datetime import datetime
from airflow import DAG
from airflow.providers.apache.pig.operators.pig import PigOperator
with DAG(dag_id='example_pig', start_date=datetime(2025,1,1), schedule='@once', catchup=False) as dag:
run_pig = PigOperator(
task_id='run_pig',
pig='ls /user/hadoop;',
pig_opts='-x local',
pig_cli_conn_id='pig_default'
)
run_pig
airflow --version
Errors
Common errors & fixes
airflow.exceptions.AirflowException: The conn_id `pig_default` isn't defined
Connection 'pig_default' is not set up in Airflow.
fixCreate a connection in Airflow UI (Admin -> Connections) with Conn Id: pig_default, Conn Type: Pig, Host: localhost (or appropriate).
TypeError: __init__() got an unexpected keyword argument 'pig_conn_id'
Using deprecated parameter 'pig_conn_id' in provider 4.0.0+.
fixReplace 'pig_conn_id' with 'pig_cli_conn_id'.
Audit
Dependencies
apache-airflowrequiredRequired: Airflow >=2.9.0 is needed for this provider version.