Sqoop Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Sqoop. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - What are the two binary file formats supported by sqoop?

A - Avro & SequenceFile

B - Rcfile and SequenceFile

C - ORC file and RC file

D - Avro and RC file

Answer : A

Explanation

These are the two binary file formats supported by Sqoop.

Answer : B

Explanation

The default number of map task ssqoop uses is 4.

This can be altered using num-mappers parameter.

Q 3 - While using a free-form query to import data, Sqoop finds that two columns from the joined tables have the same name. In this case the job

A - will fail

B - will run ignoring the column from each table

C - will prompt the user to rename one of the columns

D - automatically create an alias for one of the columns as succeed the job.

Answer : A

Explanation

The job will fail as the mapreduce job creates java classes for each of the column names and two java classes cannot have the same name in the same mapreduce job.

Q 4 - While importing data into Hadoop using sqoop the SQL SELCT clause is used. Similarly while exporting data form Hadoop the SQL clause used is

A - APPEND

B - MERGE

C - UPDTAE

D - INSERT

Answer : D

Explanation

The INSERT statements are generated by sqoop to insert data into the relational tables.

Answer : A

Explanation

The sqoop command submits the values form 10 records in each insert statement with this parameter.

Q 6 - Can sqoop use the TRUNCATE option in database while clearing data from a table?

A - Yes

B - No

C - Depends on the database

D - Depends on the Hadoop configuration

Answer : C

Explanation

If available through the database driver, sqoop can clear the data quickly using TRUNCATE option.

Q 7 - The parameter used to override NULL values to be inserted into relational targets is

A - -override-null

B - input-null-string

C - -substitute-null

D - --replace-null

Answer : B

Explanation

the parameter input-null-string is used to override the NULL values when exporting to relational tables.

Answer : B

Explanation

The data is first staged into a temporary location as a HDFS file and then loaded into the hive table.

Q 9 - To import data to HBase using sqoop the parameter(s) required is/are

A - --hbase-table

B - --hbase-columns

C - --hbase-table and --column-family

D - --habse-table and --hbase-column-family

Answer : C

Explanation

sqoop needs to mention both the hbase table name and column family to do the import.

Answer : C

Explanation

As Hbase does not allow the rows with all NULL values, those rows were skipped during import and caused fewer row counts.

sqoop_questions_answers.htm
Advertisements