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 - Which of the following is used by sqoop to establish a connection with enterprise data warehouses?
Answer : B
Explanation
The JDBC driver is a java program which has been traditionally providing data base connectivity to a variety of databases.
Q 2 - For some databases sqoop can to faster data transefr by using the parameter
Answer : D
Explanation
The direct mode delegates the data transferring capabilities to the native untilities provided by the database.
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 - Sqoops default behavior while inserting rows into relational tables is
B - multiple rows depending on the memory availability
C - It depends on the database driver being used
D - Executes random number of insert statements depending on the CPU availability
Answer : A
Explanation
the default behavior is to insert one row at a time while it can be configured for bulk load.
Q 5 - Using the staging-table parameter while loading data to relational tables the creation of staging table is done
Answer : C
Explanation
The user has to ensure that the staging tab e is created and accessible by sqoop.
Q 6 - The update-key parameter can
A - Not insert new rows to the already exported table
B - Insert new rows to an already exported table
C - Insert new rows into the exported table only if it has a primary key
Answer : A
Explanation
The update-key parameter cannot export new rows which do not have a matching key in the already exported table.
Q 7 - How do we decide the order of columns in which data is loaded to the target table?
A - By using -- order by parameter
B - By using a new mapreduce job aftet submitting sqoop export command
C - By using a database stored procedure
D - By using columns parameter with comma separated column names in the required order.
Answer : D
Explanation
we can use the column parameter and specify the required column in the required order.
Q 8 - If the target hive table is partitioned then sqoop behavior is which of the following?
A - not load data into hive partitions
C - sqoop command will halt for user input for partition names
D - load data into hive partitions by using additional parameters
Answer : D
Explanation
Sqoop supports loading into hive partitions using additional parameters in the sqoop command.
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 - The comparison of row counts between the source system and the target database while loading the data using sqoop is done using the parameter
Answer : A
Explanation
The validate parameter is used to show the result of row comparison between source and target.