
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.

Q 1 - While SequenceFile stores each record as key-value pair, the avro system stored records as
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
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 −
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?
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.
Q 5 - When the sqoop.export.records.per.statement is set to two or more, the query created by sqoop has the SQL form of
A - INSERT INTO TABLE VALUES(..);INSERT INTO TABLE VALUES(..); and so on.
B - BULK INSERT INTO TABLE VALUES(..),(),();
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?
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
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 −
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.
Q 9 - If the hbase table to which sqoop is importing data does not exist then
C - sqoop waits for user input for hbase table details to proceed with import
D - sqoop imports the data to a temporary location under Hbase
Answer : B
Explanation
Unlike hive where sqoop creates the table if it does not exist, in HBase the job fails.
Q 10 - What is achieved by the command sqoop job exec myjob
A - Sqoop job named myjob is saved to sqoop metastore
B - Sqoop job named myjob starts running
Answer : B
Explanation
This is the command to execute a sqoop job already saved in the metastore.