当前位置:K88软件开发文章中心大数据Apache Pig → 文章内容

Apache Pig illustrate运算符

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-26 10:03:38

由 jarodhu 创建,youj 最后一次修改 2016-12-28 illustrate 运算符为你提供了一系列语句的逐步执行。语法下面给出了illustrate运算符的语法。grunt> illustrate Relation_name;例假设在HDFS中有一个包含以下内容的文件 student_data.txt 。001,Rajiv,Reddy,9848022337,Hyderabad002,siddarth,Battacharya,9848022338,Kolkata 003,Rajesh,Khanna,9848022339,Delhi004,Preethi,Agarwal,9848022330,Pune 005,Trupthi,Mohanthy,9848022336,Bhuwaneshwar006,Archana,Mishra,9848022335,Chennai.使用LOAD运算符将它读入关系 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 );现在,让我们说明如下所示的名为student的关系。grunt> illustrate student;输出在执行上面的语句时,将获得以下输出。grunt> illustrate student;INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$M ap - Aliasesbeing 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 |---------------------------------------------------------------------------------------------

Apache Pig illustrate运算符