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 - What are the two binary file formats supported by sqoop?
Answer : A
Explanation
These are the two binary file formats supported by Sqoop.
Q 2 - The compression mechanism used by sqoop is
Answer : B
Explanation
Sqoop does not have any inbuilt code to carry out file compression. It relies on Hadoop's compression settings.
Q 3 - The clause 'WHERE $CONDITIONS' in the sql query specified to import data, serves the purpose of
A - split the query result into multiple chunks while importing
B - picking a subset of rows from a table
C - specify the database from where the data needs to be imported
D - Specify the target directory where the data will be stored.
Answer : A
Explanation
The WHERE $CONDITION is used to split the result of the SQL query into multiple chunks.
Q 4 - While inserting data into Relational system from Hadoop using sqoop, the various table constraints present in the relational table must be
Answer : D
Explanation
We must verify that the data being exported does not violate the constraints error.
Q 5 - The parameter which decided How many rows will be inserted per transaction in sqoop is
A - Dsqoop.export.rows.per.transaction
B - Dsqoop.export.records.per.transaction
Answer : D
Explanation
The parameter
Dsqoop.export.statements.per.transaction decides how many rows will be inserted for transaction.
Q 6 - Sqoop can insert new rows and update existing changed rows into an already exported table by using the parameter
Answer : D
Explanation
the update-mode allwoinsert can be used to update as well as insert existing rows into the exported table.
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 - To ensure that the columns created in hive by sqoop have the correct data types the parameter used by sqoop is
Answer : A
Explanation
The correct column mapping is handled by the parameter --map-column-hive.
Q 9 - The purpose of --hive-delims-replacement parameter in sqoop is to
A - Replace any hive delimiters with special string
B - Replace all the hive delimiters with null
C - replace \n, \t, and \01 characters with any other string
Answer : C
Explanation
As the characters \n, \t, and \01 may interfere with the data giving incorrect result, these can be replaced with a suitable string using this parameter.
Q 10 - The sqoop export/import jobs canbe stored and used again and again by using
Answer : D
Explanation
Running a sqoop job by using sqoop-job statement saves the job into metastore which can be retrived later and used again and again
Example −
$ sqoop-job --create jobname -- import --connect jdbc:mysql://example.com/db \ --table mytable