Apache PigDormant
A step-by-step scripting language, Pig Latin, that compiles to MapReduce, Tez or Spark jobs on Hadoop. Still released, but the project calls itself dormant.
- What it is
- Query engines
- Type
- Open source
- Made by
- Apache Software Foundation
- License
- Apache 2.0
- Status
- Dormant. The project described itself as dormant in its April 2026 board report: maintenance only.
- Facts checked
- 6 October 2026
What it is
You write a Pig Latin script as a sequence of named steps: LOAD a file, FILTER, GROUP, JOIN, FOREACH ... GENERATE, then STORE the result. Pig runs on the client: it parses the script into a logical plan, optimizes it, and compiles it into a chain of MapReduce jobs (the default), a Tez DAG (-x tez) or Spark jobs (-x spark) that it submits to the cluster. Data stays in plain files in HDFS; load and store functions parse and write them, and no schema is required up front. Pig’s data model is nested (tuples, bags and maps), and user-defined functions in Java or Python plug into any step. The interactive Grunt shell and -x local mode run scripts on one machine for testing.
Pig is free under Apache 2.0 and is not retired, but it is barely moving. After 0.17.0 in June 2017 there was no release for eight years, until 0.18.0 in September 2025 added support for Hadoop 3, Tez 0.10, Spark 3, Hive 3, HBase 2 and Python 3. In its April 2026 board report the project described its status as “Dormant”, in maintenance mode with bug fixes and dependency updates, and no new committer since 2018. A 0.19.0 release was targeted for May 2026 but has not appeared. Amazon EMR still offers Pig, at version 0.17.0.
Why teams pick it
- Readable dataflow scripts: each line is one transformation, which suits multi-step ETL better than one large SQL statement
- Works on raw files with no schema or loading step, and handles nested data natively
- UDFs in Java or Python plug into any step, and Pig can call Hive UDFs
- Existing scripts can move from MapReduce to Tez or Spark by changing the
-xflag
Watch out for
- Dormant: one release in eight years, no new committers since 2018, and maintenance limited to bug fixes and dependency updates
- Docs lag the code: the 0.18.0 getting-started page still lists Hadoop 2.X and Java 1.7 as requirements
- Tied to Hadoop: cluster modes need a Hadoop cluster and HDFS, and the local Tez and Spark modes are still marked experimental
- Pig Latin is its own language, not SQL: analysts and BI tools can’t query data through Pig
- Managed platforms lag too: Amazon EMR 7.14 ships Pig 0.17.0 from 2017
Alternatives
What all query engines have in common →
Amazon AthenaAWSAWS’s serverless SQL engine for data in S3: no cluster to run, and on-demand queries cost $5 per TB scanned.
Apache CalciteOpen sourceA Java framework with everything a database needs to understand a query (SQL parser, validator, relational algebra and a rule-based, cost-based optimizer) but no storage of its own, which Hive, Flink, Druid, Dremio, Beam and many other systems embed as their SQL front end and planner.
Apache ZeppelinOpen sourceA self-hosted web notebook where each paragraph runs through an interpreter: Spark, Flink, JDBC, Python and more. Maintained, but behind Jupyter and Databricks in reach.
GizmoSQLOpen sourceA database server that wraps DuckDB (or SQLite) and serves it to many clients over Arrow Flight SQL, with TLS and authentication.
HotdataCommercialA managed SQL engine for AI agents, built in Rust on Apache DataFusion and Arrow: each agent gets short-lived “instant databases” to load data into, then runs read-only SQL, vector, full-text and geospatial queries over an HTTP API or CLI.
IbisOpen sourceA Python dataframe API that compiles to SQL, so the same code runs on DuckDB on a laptop and on BigQuery, Snowflake, PostgreSQL or more than 20 other engines.
Spice.ai OSSOpen sourceA single-binary SQL engine in Rust, built on DataFusion and Arrow, that federates queries across databases, warehouses and lakes, keeps hot datasets in a local accelerated copy, and adds search and LLM APIs on top.
VeloxOpen sourceMeta’s open-source C++ execution engine library: it takes an already-optimized query plan and runs it with vectorized operators, and it is the engine inside Presto’s C++ workers (Prestissimo) and Apache Gluten’s native Spark.How it fits with other technologies
Top pages by visits with a Pig Latin script, run locally then on Tez · bash
cat > top_pages.pig <<'EOF'
visits = LOAD 'visits.tsv' USING PigStorage('\t')
AS (user:chararray, url:chararray, ms:int);
slow = FILTER visits BY ms > 100;
by_url = GROUP slow BY url;
counts = FOREACH by_url GENERATE group AS url, COUNT(slow) AS n,
AVG(slow.ms) AS avg_ms;
ranked = ORDER counts BY n DESC;
top10 = LIMIT ranked 10;
STORE top10 INTO 'top_pages' USING PigStorage(',');
EOF
# test on one machine against local files
pig -x local top_pages.pig && cat top_pages/part-*
# run the same script on the cluster as a Tez DAG instead of MapReduce jobs
pig -x tez top_pages.pigExecution modes#
The same script runs on different engines. The 0.18.0 docs list six modes:
| Mode | Flag | Needs | Status in the docs |
|---|---|---|---|
| Local | -x local | One machine and its local file system | Supported |
| MapReduce | -x mapreduce (default) | A Hadoop cluster and HDFS | Supported |
| Tez | -x tez | A Hadoop cluster and HDFS | Supported; added in 0.14.0 (2014) |
| Tez local | -x tez_local | One machine | Experimental |
| Spark | -x spark | A Spark, YARN or Mesos cluster and HDFS | Supported; added in 0.17.0 (2017) |
| Spark local | -x spark_local | One machine | Experimental |
See it in a real stack
No architecture uses Apache Pig yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2007–2025
Internet companies such as Yahoo were analyzing terabytes of web crawls, search logs and click streams every day. Parallel databases such as Teradata could do it but were prohibitively expensive at web scale, and many of the people doing the analysis were procedural programmers who found SQL unnatural. Hadoop’s MapReduce was cheap and popular, but too low-level and rigid: a one-input, two-stage model that led to lots of custom code that was hard to maintain and reuse.
Christopher Olston, Benjamin Reed, Utkarsh Srivastava, Ravi Kumar and Andrew Tomkins at Yahoo Research designed Pig Latin to sit between the two: a sequence of high-level steps, each a single relational-style transformation, compiled into MapReduce jobs. The prototype won internal users, Yahoo built a production engineering team around it, and in September 2007 Pig entered the Apache Incubator. By June 2009 roughly 60% of Yahoo’s ad-hoc Hadoop jobs and 40% of its production Hadoop jobs were submitted through Pig.
Pig became a top-level Apache project in September 2010, at the same board meeting as Hive. It added Tez in 2014 and Spark in 2017 as faster engines, then went eight years without a release until 0.18.0 in 2025.
Why it’s built this way
- A dataflow of steps instead of one declarative query
- Yahoo’s programmers preferred writing step-by-step scripts. Using relational primitives such as FILTER and GROUP for each step still let the system reorder and optimize them.
- Query raw files with no import step
- Ad-hoc analysis started from dumps of logs. Pig reads files in place through a user-supplied parsing function, so there is no loading phase, and other tools keep using the same files.
- A fully nested data model
- Programmers think in nested structures and much of the data on disk was already nested. Tuples, bags and maps avoided flattening everything into normalized tables.
- UDFs as first-class citizens
- Analysis at Yahoo needed custom logic such as spam detection or query expansion. Every Pig Latin operation can call user-defined functions, which use the same nested data model.
Timeline
- 2007
Yahoo Research’s Pig enters the Apache Incubator in September
- 2008
SIGMOD paper on Pig Latin; Pig 0.1.0; graduates as a Hadoop subproject
- 2009
About 60% of Yahoo’s ad-hoc Hadoop jobs come through Pig
- 2010
Becomes a top-level Apache project in September
- 2014
Pig 0.14.0 adds Tez as an execution engine
- 2017
Pig 0.17.0 adds Spark as an engine; then eight years without a release
- 2025
Pig 0.18.0 adds Hadoop 3, Spark 3 and Python 3 support
- Olston et al.: Pig Latin, a not-so-foreign language for data processing (SIGMOD 2008)
- Gates et al.: Building a high-level dataflow system on top of Map-Reduce, the Pig experience (VLDB 2009)
- Apache Incubator: Pig incubation status (accepted 2007, graduated October 2008)
- ASF board minutes, September 22, 2010: Establish the Apache Pig project
- Apache Pig releases (0.14.0, 0.17.0, 0.18.0)
Sources8 · facts checked 6 October 2026
- Apache Pig home page (platform description, Apache 2.0)
- Apache Pig releases (0.18.0 on September 15, 2025; 0.17.0 on June 19, 2017)
- Pig 0.18.0 docs: Getting started (execution modes, requirements)
- Olston et al.: Pig Latin (SIGMOD 2008): dataflow, nested data model, UDFs, no import step
- ASF board minutes, April 15, 2026: Pig report (status Dormant, maintenance mode, 0.19.0 targeted for May)
- Apache downloads: Pig (0.18.0 is the latest release directory)
- Apache Pig GitHub mirror (last commit to trunk September 2025)
- Amazon EMR docs: Apache Pig (emr-7.14.0 ships Pig 0.17.0)