Apache Pig 101 Quiz Answers – Cognitive Class

Get Apache Pig 101 Quiz Answers

Learn about the two major components of Apache Pig: the first is the language itself, which is called PigLatin, and the second is the runtime environment where PigLatin programs are executed.

Apache Pig was initially developed at Yahoo! to allow people using Hadoop® to focus more on analyzing large data sets and spend less time having to write mapper and reducer programs. Like actual pigs, who eat almost anything, the Pig programming language is designed to handle any kind of data—hence the name!

  • Get an overview of Pig’s data structures supported and how to access data using the LOAD operator.
  • Learn Pig’s relational operators.
  • Learn Pig’s evaluation functions, as well as math and string functions.

Enroll on Cognitive Class

Module 1: Pig Basics

Question: What are the five ways to invoke Pig?

  • Script, Interactive Mode, Java Command, Interactive Local Mode, Interactive MapReduce Mode
  • Interactive External Mode, Interactive Mode, Script, Java Command, Interactive MapReduce Mode
  • Interactive Service Mode, Interactive Local Mode, Interactive External Mode, Interactive MapReduce Mode, Java Command
  • Interactive Local Mode, Interactive MapReduce Mode, Interactive External Mode, Interactive Mode, Script

Question: Bags are groups of tuples, tuples are groups of fields, and fields are composed of scalar data types. True or false?

  • True
  • False

Question: Which of the following statements is true?

  • Names of relations and fields, as well as keywords and operators, are case sensitive. However, function names are case insensitive.
  • Keywords and operator names are case sensitive.
  • Function names are case sensitive.
  • Names of relations are case sensitive, but names of fields are case insensitive.

Module 2: Pig Relational Operators

Question: For the tuples (3,5,2) (5,2,1) (3,7,3) (3,6,1), using the GROUP operator on the third field produces the following: (2,{(3,5,2)}), (1,{(5,2,1),(3,6,1)}), (3,{(3,7,3)}). True or false? Disregard order when answering.

  • True
  • False

Question: UNION, GROUP, and COGROUP can be used interchangeably without creating different outputs. True or false?

  • True
  • False

Question: Which operators can be used within a nested FOREACH block?

  • LIKE, COUNT, LIMIT, ORDER BY
  • COUNT, ORDER BY, AVG, DISTINCT
  • AVG, LIMIT, FILTER, LIKE
  • LIMIT, DISTINCT, ORDER BY, FILTER

Module 3: Pig Evaluation Functions

Question: The COUNT operator does NOT require the use of the GROUP BY operator. True or false?

  • True
  • False

Question: The TOKENIZE() function splits a string and outputs a bag of words. True or false?

  • True
  • False

Question: The two types of UDFs are DEFINE and REGISTER. True or false?

  • True
  • False

Final Exam

Question: What is the primary purpose of Pig in the Hadoop architecture?

  • To provide logging support for Hadoop jobs
  • To support the execution of workflows consisting of a collection of actions
  • To provide a high-level programming language so that developers can simplify the task of writing MapReduce applications
  • To move data into HDFS

Question: When executing Pig in local mode, the process runs locally, but all of the data files are accessed via HDFS. True or false?

  • True
  • False

Question: Data can be loaded into Pig with or without defining a schema. True or false?

  • True
  • False

Question: In Pig, you can specify the delimiter used to load data by

  • doing nothing. Pig can automatically detect the delimiter used in your data file
  • adding a schema definition to your LOAD statement
  • adding ‘using PigStorage(delimiter)’ to your LOAD statement
  • All of the above

Question: Which of the following can be used to pass parameters into a Pig Script? Select all that apply.

  • Command line parameters
  • A parameter file
  • JSON
  • Web Services

Question: Which Pig Operator is used to save data into a file?

  • SAVE
  • LOAD
  • STORE
  • DUMP

Question: In Pig, all tuples in a relation must have the same number of fields. True or false?

  • True
  • False

Question: Which Pig relational operator is used to select tuples from a relation based on some criteria?

  • transform
  • filter
  • group
  • order by

Question: Which Pig relational operator is used to combine all the tuples in a relation that have the same key?

  • union
  • transform
  • filter
  • group
  • join

Question: Which Pig relational operator is used to combine two or more relations using one or more common field values?

  • union
  • transform
  • filter
  • group
  • join

Question: The Pig Tokenize evaluation operator splits a string and outputs a bag of words. True or false?

  • True
  • False

Question: When using the Pig Count evaluation operator, you must also use either the Group All or the Group By operator. True or false?

  • True
  • False

Question: Which of the following Pig operators can be used to review the logical, physical, and MapReduce execution plans?

  • Verbose
  • Dump
  • Store
  • Explain

Question: Which of the following is a valid Pig evaluation operator?

  • isempty
  • count_star
  • diff
  • count
  • All of the Above

Question: You can extend Pig via user defined functions. True or false?

  • True
  • False

Conclusion:

We hope you know the correct answers to Apache Pig 101 If Queslers helped you to find out the correct answers then make sure to bookmark our site for more Course Quiz Answers.

If the options are not the same then make sure to let us know by leaving it in the comments below.

Course Review:

In our experience, we suggest you enroll in this and gain some new skills from Professionals completely free and we assure you will be worth it.

This course is available on Cognitive Class for free, if you are stuck anywhere between quiz or graded assessment quiz, just visit Queslers to get all Quiz Answers and Coding Solutions.

More Courses Quiz Answers >>

Building Cloud Native and Multicloud Applications Quiz Answers

Accelerating Deep Learning with GPUs Quiz Answers

Blockchain Essentials Cognitive Class Quiz Answers

Deep Learning Fundamentals Cognitive Class Quiz Answers

Hadoop 101 Cognitive Class Answers

Machine Learning With R Cognitive Class Answers

Machine Learning with Python Cognitive Class Answers

Leave a Reply

Your email address will not be published.