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 - To run sqoop from multiple nodes, it has to be installed in
A - Any one of the in the local filesystem.
B - each of the node where it is supposed to run
Answer : A
Explanation
On installing in one node it, automatically gets replicated to other nodes in the cluster.
Q 2 - What does the --last-value parameter in sqoop incremental import signify?
A - What is the number of rows sucessfully imported in append type import
D - The count of the number of rows that were succesful in the current import.
Answer : C
Explanation
Sqoop uses the --last-value parameter in both the append mode and the last_update_date mode to import the incremental data form source.
Q 3 - The free-form query import feature in sqoop allows to import data from
B - a relational source without using a connector
Answer : C
Explanation
With the The free form query we can write a sql query involving a join between 2 tables and mention it with --query parameter while importing. It is used in place of the --table parameter.
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
Answer : D
Explanation
The INSERT statements are generated by sqoop to insert data into the relational tables.
Q 5 - The staging-table parameter is used for
A - Storing some sample data from Hadoop before loading the real table
B - Storing all the required data from Hadoop before loading it to real table
D - Storing the metadata structure of tables to which data is being exported
Answer : B
Explanation
When you want to verify that indeed all the require data is successfully exported before loading the data to final table, use the parameter staging-table.
Q 6 - With MySQL, the feature used by sqoop for update or insert data into an exported table is
Answer : A
Explanation
The ON DUPLICATE KEY UPDATE feature of mySql is used for update else insert with sqoop.
Q 7 - What is the disadvantage of using the columns parameter to insert a subset of columns to the relational table?
A - The relational table may have not null columns not covered in the columns parameter.
B - The relational table may store the data from HDFS in wrong columns.
Answer : A
Explanation
If there are columns whose value is mandatory and the HDFS file does not have it in the subset the load will fail.
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 - After importing a table into HBAse you find that the number of rows inserted is fewer than in the source. The possible reason is −
A - Sqoop is yet to have mature code for HBase
B - Sqoop version and Hbase version conflict
C - Hbase does not allow rows will all NULL values to be inserted
D - Hbase has very limited capabilities to handle numeric data types so some rows got rejected.
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.