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 - Besides the JDBC driver, sqoop also needs which of the following to connect to remote databases?
Answer : C
Explanation
Sqoop Needs both JDBC driver and Database connector which is required to import data.
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 - While using a free-form query to import data, Sqoop finds that two columns from the joined tables have the same name. In this case the job
B - will run ignoring the column from each table
C - will prompt the user to rename one of the columns
D - automatically create an alias for one of the columns as succeed the job.
Answer : A
Explanation
The job will fail as the mapreduce job creates java classes for each of the column names and two java classes cannot have the same name in the same mapreduce job.
Q 4 - In a table import the name of the mapreduce job
A - Is named after the table name
Answer : A
Explanation
The name of the job is based on the name of the table which is being imported.
Q 5 - Using the higher value for the parameter sqoop.export.statements.per.transaction will
A - Always increase the export performance
B - May or may not increase the export performance
Answer : C
Explanation
In the scenario when the database requires table_level write lock, higher value of sqoop.export.statements.per.transaction will lock the table for a longer time and will decrease the performance.
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 - 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 - The parameter(s) used to laod data using sqoop into the hive partitions is/are
A - --hive-partition-key and -hive-partition-value
Answer : A
Explanation
both partition-key and partition value are passed in to load data into hive partitioned table.
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.