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 prevent the password from being mentioned in the sqoop import clause we can use the additional parameters
Answer : C
Explanation
The -P option asks for password from standard input without echoing and --password-file option reads the password value stored in some other file.
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 achieved by using the --meta-connect parameter in a sqoop command?
A - run metastore as a service accessible remotely
B - run metastore as a service accessible locally
C - connect to the meastore tables
D - connect to the metadata of the external relational tables form which data has to be imported
Answer : A
Explanation
with the --meta-connect parameter the metastore starts running as a service with the default port 16000.Now this metastore service becomes accessible throughout the cluster.
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 - What does the parameter “ Dsqoop.export.records.per.statemet=10” do in a sqoop export command?
A - Exports 10 records in each insert statement
B - Export 10 insert statements every time the command runs
Answer : A
Explanation
The sqoop command submits the values form 10 records in each insert statement with this parameter.
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 - For Text based columns the parameter used for substituting null values is
Answer : A
Explanation
The –input- null-string is used to substitute null values for text based columns.
Q 8 - For a column of data type numeric, the parameter used for substituting null values is
Answer : B
Explanation
The –input- null-non-string is used to substitute null values for text based columns.
Q 9 - The parameter --hive-import can be used with
B - importing to hive as well as text file
Answer : B
Explanation
This parameter can be used with both hive and text files.
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.