Pig Describe , Explain , Illustrate Operators : Some useful development tools in Pig
Official Website: http://bigdataelearning.com
In this module, you will learn how to use Describe operator, Explain operator and Illustrate operator. These are Pig Latin’s diagnostic operators and using these will you enable to write better code
Describe operator
-----------------------------
Describe operator can be used to view the schema of a relation or alias. For e.g. to view the schema of a alias A, we can give DESCRIBE A;
A = LOAD 'input.txt' USING PigStorage('\t') AS (name:chararray, age:int, salary:int);
DESCRIBE A;
A: {name: chararray,age: int,salary: int}
B = LOAD 'input.txt' USING PigStorage('\t') AS (name, age, salary);
DESCRIBE B;
B: {name: bytearray,age: bytearray,salary: bytearray}
C = LOAD 'input.txt' USING PigStorage('\t');
DESCRIBE C;
Schema for C unknown.
Explain operator
---------------------------
Explain operator is used to display the logical, physical, mapreduce execution plans of an alias or a script. This is helpful to know how pig is compiling each pig commands into mapreduce scripts.
i)The logical plan contains the pipeline of the operators that needs to be executed. It also shows some of the optimizations such as applying filter transformations on the top level are shown.
ii)The physical plan display how the logical operators are converted into backend specific physical operators.
iii)The mapreduce execution plan shows how the physical operators are grouped together to form the mapreduce jobs.
For e.g. to find how these execution plans are laid out, we can type in Explain A;
Illustrate operator
-----------------------------
Illustrate operator is used to display the step by step execution of an alias or a pig script. It is used to debug a code with some small sample of data.
For e.g. Illustrate A, gives step by step execution of the alias A.
If you need to test a script with some small sample of data, then you can give the Illustrate -script PigScript1.pig where PigScript1.pig is the name of the pig script
Видео Pig Describe , Explain , Illustrate Operators : Some useful development tools in Pig канала BigDataElearning
In this module, you will learn how to use Describe operator, Explain operator and Illustrate operator. These are Pig Latin’s diagnostic operators and using these will you enable to write better code
Describe operator
-----------------------------
Describe operator can be used to view the schema of a relation or alias. For e.g. to view the schema of a alias A, we can give DESCRIBE A;
A = LOAD 'input.txt' USING PigStorage('\t') AS (name:chararray, age:int, salary:int);
DESCRIBE A;
A: {name: chararray,age: int,salary: int}
B = LOAD 'input.txt' USING PigStorage('\t') AS (name, age, salary);
DESCRIBE B;
B: {name: bytearray,age: bytearray,salary: bytearray}
C = LOAD 'input.txt' USING PigStorage('\t');
DESCRIBE C;
Schema for C unknown.
Explain operator
---------------------------
Explain operator is used to display the logical, physical, mapreduce execution plans of an alias or a script. This is helpful to know how pig is compiling each pig commands into mapreduce scripts.
i)The logical plan contains the pipeline of the operators that needs to be executed. It also shows some of the optimizations such as applying filter transformations on the top level are shown.
ii)The physical plan display how the logical operators are converted into backend specific physical operators.
iii)The mapreduce execution plan shows how the physical operators are grouped together to form the mapreduce jobs.
For e.g. to find how these execution plans are laid out, we can type in Explain A;
Illustrate operator
-----------------------------
Illustrate operator is used to display the step by step execution of an alias or a pig script. It is used to debug a code with some small sample of data.
For e.g. Illustrate A, gives step by step execution of the alias A.
If you need to test a script with some small sample of data, then you can give the Illustrate -script PigScript1.pig where PigScript1.pig is the name of the pig script
Видео Pig Describe , Explain , Illustrate Operators : Some useful development tools in Pig канала BigDataElearning
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![How to programmatically specify a schema?](https://i.ytimg.com/vi/4GQm2VmcKZE/default.jpg)
![Actions on pair RDDs](https://i.ytimg.com/vi/8gD6UnMpntw/default.jpg)
![Transformations on one pair RDD](https://i.ytimg.com/vi/5oO98Ql73IA/default.jpg)
![How to Create Pair RDDs: Convert regular RDD to pair RDD: Create pair RDD from in-memory collection](https://i.ytimg.com/vi/J9CKgJvnWM8/default.jpg)
![How to create partitions in RDD](https://i.ytimg.com/vi/FV3L7n1AejQ/default.jpg)
![Persistence and storage levels](https://i.ytimg.com/vi/oCZbhSdu2jI/default.jpg)
![Get familiarized with Scala and Python shells](https://i.ytimg.com/vi/j22J3XGxzl8/default.jpg)
![How to create a dataframe from a CSV file](https://i.ytimg.com/vi/DW8_yiSfSZY/default.jpg)
![What is a Dataset: 3 specific features that Dataset provides](https://i.ytimg.com/vi/icxGs_OjJl8/default.jpg)
![How to install Java : How to install IntelliJ : How to create Hello World program in Java](https://i.ytimg.com/vi/gXG1Wu5S7Ko/default.jpg)
![Transformations on multi pair RDDs](https://i.ytimg.com/vi/exBYfbpJ6F0/default.jpg)
![HIVE data types: Hive data model](https://i.ytimg.com/vi/ekFAGB5Fpm4/default.jpg)
![Apache Spark Components : Different Components in Spark Framework](https://i.ytimg.com/vi/m4pYYnY4_gU/default.jpg)
![JVM Architecture](https://i.ytimg.com/vi/QHIWkwxs0AI/default.jpg)
![Apache Spark : Commonly used Transformations : Map, Filter, Flatmap Transformations](https://i.ytimg.com/vi/HS8Cx-l9Vhg/default.jpg)
![Apache Spark RDD operations : Transformations and Actions](https://i.ytimg.com/vi/9MeMWdILl5Q/default.jpg)
![Apache Spark Architecture : Run Time Architecture of Spark Application](https://i.ytimg.com/vi/rJFg2i_auAg/default.jpg)
![Class Structure and components - Part I](https://i.ytimg.com/vi/fmobr_9bi_E/default.jpg)
![What is Apache Hive? : Understanding Hive](https://i.ytimg.com/vi/cMziv1iYt28/default.jpg)
![Determining the number of partitions](https://i.ytimg.com/vi/WGNcy4yKTRo/default.jpg)