mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Minor update for pig.md
This commit is contained in:
parent
39f161a36a
commit
5e2e222555
1 changed files with 29 additions and 17 deletions
|
|
@ -1,40 +1,52 @@
|
|||
---
|
||||
layout: page
|
||||
title: "Pig Interpreter"
|
||||
description: ""
|
||||
description: "Apache Pig is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs."
|
||||
group: manual
|
||||
---
|
||||
{% include JB/setup %}
|
||||
|
||||
|
||||
## Pig nterpreter for Apache Zeppelin
|
||||
# Pig Interpreter for Apache Zeppelin
|
||||
|
||||
<div id="toc"></div>
|
||||
|
||||
## Overview
|
||||
[Apache Pig](https://pig.apache.org/) is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs. The salient property of Pig programs is that their structure is amenable to substantial parallelization, which in turns enables them to handle very large data sets.
|
||||
|
||||
## Supported interpreter type
|
||||
- %pig.script (default) - All the pig script can run in the type of interpreter, and display type if plain text.
|
||||
- %pig.query - Almost the same as %pig.script. the only difference is that you don't need to add alias in the last statement. And the display type is table.
|
||||
|
||||
- `%pig.script` (default)
|
||||
|
||||
All the pig script can run in the type of interpreter, and display type if plain text.
|
||||
|
||||
- `%pig.query`
|
||||
|
||||
Almost the same as `%pig.script`. The only difference is that you don't need to add alias in the last statement. And the display type is table.
|
||||
|
||||
## Supported runtime mode
|
||||
- Local
|
||||
- MapReduce
|
||||
- Tez (Only Tez 0.7 is supported)
|
||||
|
||||
## How to use
|
||||
|
||||
### How to setup Pig
|
||||
|
||||
- Local Mode
|
||||
Nothing needs to be done for local mode
|
||||
|
||||
Nothing needs to be done for local mode
|
||||
|
||||
- MapReduce Mode
|
||||
HADOOP_CONF_DIR needs to be specified in `zeppelin-env.sh`
|
||||
|
||||
HADOOP\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
|
||||
|
||||
- Tez Mode
|
||||
HADOOP_CONF_DIR and TEZ_CONF_DIR needs to be specified in `zeppelin-env.sh`
|
||||
|
||||
HADOOP\_CONF\_DIR and TEZ\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
|
||||
|
||||
### How to configure interpreter
|
||||
|
||||
At the Interpreters menu, you have to create a new Pig interpreter and provide next properties:
|
||||
|
||||
At the Interpreters menu, you have to create a new Pig interpreter. Pig interpreter has below properties by default.
|
||||
|
||||
<table class="table-configuration">
|
||||
<tr>
|
||||
|
|
@ -50,18 +62,18 @@ At the Interpreters menu, you have to create a new Pig interpreter and provide n
|
|||
<tr>
|
||||
<td>zeppelin.pig.includeJobStats</td>
|
||||
<td>false</td>
|
||||
<td>whether display jobStats info in %pig</td>
|
||||
<td>whether display jobStats info in <code>%pig</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.pig.maxResult</td>
|
||||
<td>20</td>
|
||||
<td>max row number displayed in %pig.query</td>
|
||||
<td>max row number displayed in <code>%pig.query</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### How to use
|
||||
### Example
|
||||
|
||||
**pig**
|
||||
##### pig
|
||||
|
||||
```
|
||||
%pig
|
||||
|
|
@ -72,7 +84,8 @@ c = foreach b generate COUNT($1);
|
|||
dump c;
|
||||
```
|
||||
|
||||
**pig.query**
|
||||
##### pig.query
|
||||
|
||||
```
|
||||
%pig.query
|
||||
|
||||
|
|
@ -81,5 +94,4 @@ c = group b by Category;
|
|||
foreach c generate group as category, COUNT($1) as count;
|
||||
```
|
||||
|
||||
|
||||
Data is shared between %pig and %pig.query, so that you can do some common work in %pig, and do different kinds of query based on the data of %pig.
|
||||
Data is shared between `%pig` and `%pig.query`, so that you can do some common work in `%pig`, and do different kinds of query based on the data of `%pig`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue