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 - While SequenceFile stores each record as key-value pair, the avro system stored records as

A - Simple text

B - chained lists

C - Linked lists

D - schema and data

Answer : D

Explanation

Sqoop generates the schema automatically when reading the data and stores the schema details along with the data in each Avro file generated.

Q 2 - The data type mapping between the database column and sqoop column can be overridden by using the parameter

A - --override-column-type

B - --map-column-type

C - --override-column-java

D - --map-column-java

Answer : D

Explanation

As sqoop uses the Java Data types internally, the mapping of the data types has to be done with Java Data Types.

Q 3 - The parameter to give a custom name to the mapreduce job running a sqoop import command is −

A - --sqoop-job-name

B - --map-job-name

C - --mapreduce-job-name

D - --rename-job

Answer : C

Explanation

The --mapreduce-job-name is used to give a user chosen job name to the sqoop command so that it can be easliy distinguished from other jobs in the jobtracker UI.

Q 4 - The export and import of data between sqoop and relational system happens through which of the following programs?

A - Sqoop client program

B - Mapreduce job submitted by the sqoop command

C - Database stores procedure

D - Hdfs file management program

Answer : B

Explanation

The sqoop client only submits the command and oversees the completion or failure of the command. The Mapreduce job created will do the actual data transfer.

Answer : D

Explanation

many databases use statements in option (D) to process multiple rows in the insert statement.

Q 6 - Can the upsert feature of sqoop delete some data form the exported table?

A - Yes

B - No

C - Depends on database

D - Yes With some additional sqoop parameters

Answer : A

Explanation

Sqoop will never delete data as part of upsert statement.

Q 7 - The parameter to specify only a selected number of columns to be exported to a table is

A - -columns

B - column-subset

C - ----columns-not-all

D - -columns-part

Answer : A

Explanation

The columns clause will take a comma separated values of column names which will be part of the export.

Q 8 - When a column value has a different data type in the HDFS system than expected in the relational table to which data will be exported −

A - Sqoop skips the rows

B - Sqoop fails the job

C - Sqoop loads the remaining rows by halting and asking whether to continue the load

D - Sqoop automatically changes the data type to a compatible data type and loads the data.

Answer : B

Explanation

The job fails and sqoop gives a log showing the reason of failure.

Answer : B

Explanation

Unlike hive where sqoop creates the table if it does not exist, in HBase the job fails.

Answer : B

Explanation

This is the command to execute a sqoop job already saved in the metastore.

sqoop_questions_answers.htm
Advertisements