ZEPPELIN-1985. Remove user from pig tutorial note

This commit is contained in:
Jeff Zhang 2017-01-18 15:10:07 +08:00
parent 26808e3a07
commit c92b8f3ac8

View file

@ -2,7 +2,6 @@
"paragraphs": [
{
"text": "%md\n\n\n### [Apache Pig](http://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.\n\nPig\u0027s language layer currently consists of a textual language called Pig Latin, which has the following key properties:\n\n* Ease of programming. It is trivial to achieve parallel execution of simple, \"embarrassingly parallel\" data analysis tasks. Complex tasks comprised of multiple interrelated data transformations are explicitly encoded as data flow sequences, making them easy to write, understand, and maintain.\n* Optimization opportunities. The way in which tasks are encoded permits the system to optimize their execution automatically, allowing the user to focus on semantics rather than efficiency.\n* Extensibility. Users can create their own functions to do special-purpose processing.\n",
"user": "user1",
"dateUpdated": "Jan 6, 2017 3:55:03 PM",
"config": {
"colWidth": 12.0,
@ -40,7 +39,6 @@
},
{
"text": "%md\n\nThis pig tutorial use pig to do the same thing as spark tutorial. The default mode is mapreduce, you can also use other modes like local/tez_local/tez. For mapreduce mode, you need to have hadoop installed and export `HADOOP_CONF_DIR` in `zeppelin-env.sh`\n\nThe tutorial consists of 3 steps.\n\n* Use shell interpreter to download bank.csv and upload it to hdfs\n* use `%pig` to process the data\n* use `%pig.query` to query the data",
"user": "user1",
"dateUpdated": "Jan 6, 2017 3:55:18 PM",
"config": {
"colWidth": 12.0,
@ -78,7 +76,6 @@
},
{
"text": "%pig\n\nbankText \u003d load \u0027bank.csv\u0027 using PigStorage(\u0027;\u0027);\nbank \u003d foreach bankText generate $0 as age, $1 as job, $2 as marital, $3 as education, $5 as balance; \nbank \u003d filter bank by age !\u003d \u0027\"age\"\u0027;\nbank \u003d foreach bank generate (int)age, REPLACE(job,\u0027\"\u0027,\u0027\u0027) as job, REPLACE(marital, \u0027\"\u0027, \u0027\u0027) as marital, (int)(REPLACE(balance, \u0027\"\u0027, \u0027\u0027)) as balance;\n\n-- The following statement is optional, it depends on whether your needs.\n-- store bank into \u0027clean_bank.csv\u0027 using PigStorage(\u0027;\u0027);\n\n\n",
"user": "user1",
"dateUpdated": "Jan 6, 2017 3:57:11 PM",
"config": {
"colWidth": 12.0,
@ -109,7 +106,6 @@
},
{
"text": "%pig.query\n\nbank_data \u003d filter bank by age \u003c 30;\nb \u003d group bank_data by age;\nforeach b generate group, COUNT($1);\n\n",
"user": "user1",
"dateUpdated": "Jan 6, 2017 3:57:15 PM",
"config": {
"colWidth": 4.0,
@ -154,7 +150,6 @@
},
{
"text": "%pig.query\n\nbank_data \u003d filter bank by age \u003c ${maxAge\u003d40};\nb \u003d group bank_data by age;\nforeach b generate group, COUNT($1);",
"user": "user1",
"dateUpdated": "Jan 6, 2017 3:57:18 PM",
"config": {
"colWidth": 4.0,
@ -207,7 +202,6 @@
},
{
"text": "%pig.query\n\nbank_data \u003d filter bank by marital\u003d\u003d\u0027${marital\u003dsingle,single|divorced|married}\u0027;\nb \u003d group bank_data by age;\nforeach b generate group, COUNT($1) as c;\n\n\n",
"user": "user1",
"dateUpdated": "Jan 6, 2017 3:57:24 PM",
"config": {
"colWidth": 4.0,