Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Big Data Pig Assessment Test

Topics Covered

  • Pig Commands
  • Optimization in Pig
  • Pig Scripts

Useful for hiring

  • Big Data Developer - Pig
  • Big Data Developer

Start hiring job-fit candidates using this assessment

GET A DEMO

"Finding quality talent is a challenge more so when you consider the sheer number of resumes we get each year. To top this, the time we spent on our recruitment process was humongous. Interview Mocha helped us to cut down on our candidate filtration time by 40%, making it our preferred assessment tool."

Pedro Furtado, Altran,
Capacity Manager
Question

Assume we use datafu lib in pig:

DEFINE EmptyBagToNullFields datafu.pig.bags.EmptyBagToNullFields();
data = FOREACH (COGROUP input1 BY key, input2 BY key, input3 BY key) GENERATE
    FLATTEN(input1),
      FLATTEN(EmptyBagToNullFields(input2)),
      FLATTEN(EmptyBagToNullFields(input3));

 Which script will define macro similar to above script?

Answer
    • DEFINE myFunction(relation1, key1, relation2, key2, relation3, key3) returns result 
      {
          A = GROUP $relation1 BY $key1, $relation2 BY $key2, $relation3 BY $key3;
          $result = FOREACH A GENERATE
              FLATTEN($relation1),
              FLATTEN(EmptyBagToNullFields($relation2)),
              FLATTEN(EmptyBagToNullFields($relation3));
      }

    • DEFINE myFunction(relation1, key1, relation2, key2, relation3, key3) returns result 
      {
          A = JOIN $relation1 BY $key1, $relation2 BY $key2, $relation3 BY $key3;
          $result = FOREACH A GENERATE
              FLATTEN($relation1),
              FLATTEN(EmptyBagToNullFields($relation2)),
              FLATTEN(EmptyBagToNullFields($relation3));
      }

    • Cannot replace to have same logic with above script

    • DEFINE myFunction(relation1, key1, relation2, key2, relation3, key3) returns result 
      {
          A = COGROUP $relation1 BY $key1, $relation2 BY $key2, $relation3 BY $key3;
          $result = FOREACH A GENERATE
              FLATTEN($relation1),
              FLATTEN(EmptyBagToNullFields($relation2)),
              FLATTEN(EmptyBagToNullFields($relation3));
      }

Question

A = load 'Data1' as (name:chararray, team:chararray, position:bag{t:(p:chararray)}, bat:map[]);
B = foreach A generate name, team, position, bat#'batting_average' as batavg;
C = group B by team;
avgC  = foreach C generate group, AVG(B.batavg);
store avgC into 'by_team';
flattenData = foreach B generate name, team, flatten(position) as position, batavg;
D = group flattenData by position parallel 100;
avgD = foreach D generate group, AVG(flattenData.batavg);
store avgD into 'Rank';

How many reduce will run at D relation?

Answer
    • 100

    • Not enough information

    • Depend on Data1 file

    • Depend on flattenData relation

Question

A = COGROUP input1 BY key, input2 BY key, input3 BY key;
B = FOREACH A GENERATE
    FLATTEN(input1), -- left join on this
     FLATTEN((IsEmpty(input2) ? TOBAG(TOTUPLE((int)null,(int),null)) : input2))
       AS (input2::key,input2::val),
    FLATTEN((IsEmpty(input3) ? TOBAG(TOTUPLE((int)null,(int),null)) : input3))
       AS (input3::key,input3::val);
   
Which script is similar with above script?

Answer
    • A = JOIN input1 BY key LEFT, input2 BY key;
      B = JOIN A BY input1::key LEFT, input3 BY key;

    • A = JOIN input1 BY key LEFT, input3 BY key;
      B = JOIN A BY input1::key LEFT, input2 BY key;

    • Cannot replace to have same logic with above script

    • A = JOIN input1 BY key, input3 BY key;
      B = JOIN A BY input1::key, input2 BY key; 

Test details:

Apache Pig Knowledge Test enables employers and recruiters to identify potential Big Data-Pig developers by evaluating working skills and job readiness. For this reason, the emphasis is laid upon evaluating the knowledge of applied skills gained through real work experience, rather than theoretical knowledge.

Test Details: 20 minutes 

15 Application Questions

05 Theory Questions 


The combination of Application and Theory questions helps to evaluate Technical as well as practical Skills of Candidates

Test description:

Big Data Pig Online Test assists Recruiters and Hiring Manager to evaluate the Pig skills of Big data-Pig developer before an interview. Big Data Pig is a platform used for analyzing large data sets which enable for expressing data analysis programs. Pig enables to write complex data and is a simple SQL-like scripting language. Pig consists of two components - first is the language and second is the runtime environment. Big data Pig Programming Skills Test is specially designed to check application, practical skills of a Big Data - Pig developer – as per Industry Standards.

Pig Big Data Assessment Test contains questions on following Topics:
 

  • Pig Commands

  • Optimization in Pig

  • Pig Scripts

 
Apache Pig Coding Test is designed by our subject matter experts to evaluate the job skills of applicant and their knowledge about Big Data Pig. Using powerful reporting, you can have a detailed analysis of the test results to help you make a better hiring decision and predict the candidate’s performance.

The test contains MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, True or False.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO