新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)ApachePig教程:ApachePigillustrate運算符
illustrate 運算符為你提供了一系列語句的逐步執(zhí)行。

成都創(chuàng)新互聯(lián)是專業(yè)的武都網(wǎng)站建設(shè)公司,武都接單;提供做網(wǎng)站、成都做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進行武都網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
語法
下面給出了illustrate運算符的語法。
grunt> illustrate Relation_name;
例
假設(shè)在HDFS中有一個包含以下內(nèi)容的文件 student_data.txt 。
001,Rajiv,Reddy,9848022337,Hyderabad 002,siddarth,Battacharya,9848022338,Kolkata 003,Rajesh,Khanna,9848022339,Delhi 004,Preethi,Agarwal,9848022330,Pune 005,Trupthi,Mohanthy,9848022336,Bhuwaneshwar 006,Archana,Mishra,9848022335,Chennai.
使用LOAD運算符將它讀入關(guān)系 student ,如下所示。
grunt> student = LOAD 'hdfs://localhost:9000/pig_data/student_data.txt' USING PigStorage(',')
as ( id:int, firstname:chararray, lastname:chararray, phone:chararray, city:chararray );
現(xiàn)在,讓我們說明如下所示的名為student的關(guān)系。
grunt> illustrate student;
輸出
在執(zhí)行上面的語句時,將獲得以下輸出。
grunt> illustrate student; INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$M ap - Aliases being processed per job phase (AliasName[line,offset]): M: student[1,10] C: R: --------------------------------------------------------------------------------------------- |student | id:int | firstname:chararray | lastname:chararray | phone:chararray | city:chararray | --------------------------------------------------------------------------------------------- | | 002 | siddarth | Battacharya | 9848022338 | Kolkata | ---------------------------------------------------------------------------------------------
網(wǎng)頁名稱:創(chuàng)新互聯(lián)ApachePig教程:ApachePigillustrate運算符
網(wǎng)頁網(wǎng)址:http://www.fisionsoft.com.cn/article/cohshio.html


咨詢
建站咨詢
