- Sqoop Tutorial
- Sqoop - Home
- Sqoop - Introduction
- Sqoop - Installation
- Sqoop - Import
- Sqoop - Import-All-Tables
- Sqoop - Export
- Sqoop - Sqoop Job
- Sqoop - Codegen
- Sqoop - Eval
- Sqoop - List Databases
- Sqoop - List Tables
- Sqoop Useful Resources
- Sqoop - Questions and Answers
- Sqoop - Quick Guide
- Sqoop - Useful Resources
- Sqoop - Discussion
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 import data to Hadoop cluster from relational database sqoop create a mapreduce job. In this job
A - All the data is transferred in one go.
B - each mapper transfers a slice of Table's data
C - Each mapper transfers tables' data along with table's metadata (name of the columns etc)
D - Only the schema of relational table is validated without fetching data
Answer : B
Explanation
A Mapreduce job executes multiple mappers and each mapper retrieves a slice of Table's data.
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 - What is the disadvantage of storing password in the metastore as compared to storing in a password file?
Answer : D
Explanation
The password file can be encrypted and prevented from reading by proper permissions. But metastore is unencrypted and cannot be prevented from reading.
Q 4 - The –boundary-query parameter is used to
A - Select the maximum number of rows to be retrieved by the query
B - Select maximum and minimum values of the column specified in the –split-by parameter
C - Select the number of splits they query can run
D - Select the maximum and minimum number of mapreduce tasks that will be used in the query.
Answer : B
Explanation
Sqoop needs to find the minimum and maximum value of the column
specified in the --split-by parameter so that sqoop can partition data into multiple independent slices that will be transferred in a parallel manner.
Q 5 - When the “sqoop.export.records.per.statement” is set to two or more, the query created by sqoop has the SQL form of
A - INSERT INTO TABLE VALUES(..);INSERT INTO TABLE VALUES(..); and so on.
B - BULK INSERT INTO TABLE VALUES(..),(…),(…);
Answer : D
Explanation
many databases use statements in option (D) to process multiple rows in the insert statement.
Q 6 - Can sqoop use the TRUNCATE option in database while clearing data from a table?
Answer : C
Explanation
If available through the database driver, sqoop can clear the data quickly using TRUNCATE option.
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 - 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 - 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.
To Continue Learning Please Login
Login with Google