The Pig adapter allows you to write queries in SQL and execute them using
Apache Pig.
A simple example
Let’s start with a simple example. First, we need a
model definition,
as follows.
Now, if you write the SQL query
the Pig adapter will generate the Pig Latin script
which is then executed using Pig’s runtime, typically MapReduce on
Apache Hadoop.
Relationship to Piglet
Calcite has another component called
Piglet.
It allows you to write queries in a subset of Pig Latin,
and execute them using any applicable Calcite adapter.
So, Piglet is basically the opposite of the Pig adapter.