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.
Answer : C
Explanation
You can do both full and partial data import from tables but not a subset of columns from a table.
Q 3 - The --options-file parameter is used to
B - specify the name of the data files to be created after import
C - store all the sqoop variables
D - store the parameters and their values in a file to be used by various sqoop commands.
Answer : D
Explanation
The command line options (the name and value of the parameters) that do not change from time to time can be saved into a file and used again and again. This is called an options file.
Q 4 - Data Transfer using sqoop can be
A - only imported into the Hadoop system
Answer : B
Explanation
The data can be both imported and exported form Hadoop system using sqoop.
Q 5 - The insert query used to insert exported data into tables is generate by
A - Sqoop command and processed as such
Answer : A
Explanation
The insert query is generated only by the sqoop command and processed as such without any further modification by any other driver.
Q 6 - The update-key parameter is used to
A - Update the primary key field present in the Hadoop data to be exported
B - Update the primary key field in the table to which data is already exported
C - Update the database connectivity parameters like username, password etc
D - Update the already exported rows based on a primary key field
Answer : D
Explanation
The update-key parameter uses the primary key table to update the entire record in the relational table.
Q 7 - If the table to which data is being exported has more columns than the data present in the hdfs file then
B - The load can be done only for the relevant columns present in HDFS file
Answer : B
Explanation
The load can still be done by specifying the column parameter to populate a subset of columns in the relational table.
Q 8 - To overwrite data present in hive table while importing data using sqoop, the sqoop parameter is
Answer : B
Explanation
The --hive-overwrite parameter truncates the hive table before loading the data.
Q 9 - HIve shows more row count than imported by sqoop. What can be the reason?
A - the \n chara cter present int the data
B - Error with java classes used in sqoop
Answer : A
Explanation
The new line characters present in data will increase the number of rows.
Q 10 - In both import and export scenario, the role of ValidationThreshold is to determine if
A - the error margin between the source and target is within a range
B - the Sqoop command can handle the entire number of rows
C - the number of rows rejected by sqoop while reading the data
D - the number of rows rejected by the target database while loading the data
Answer : A
Explanation
The ValidationThreshold - Determines if the error margin between the source and target are acceptable: Absolute, Percentage Tolerant, etc. Default implementation is AbsoluteValidationThreshold which ensures the row counts from source and targets are the same.