- 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 - The parameter in sqoop which specifies the output directories when importing data is
Answer : D
Explanation
The --target-dir and --warehouse-dir are the two parameters used for specifying the path where import will be done.
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 - while specifying the connect string in the sqoop import command, for a Hadoop cluster, if we specify localhost in place of a server address(hostname or IP address) in the URI, then
A - The import job will connect to local databases
B - Each node may connect to different databases
Answer : D
Explanation
Specifying localhost does not invalidate the command as some local database may be running and the node will be able to connect. So each node will connect to different database if they are available.
Q 4 - While inserting data into Relational system from Hadoop using sqoop, the various table constraints present in the relational table must be
Answer : D
Explanation
We must verify that the data being exported does not violate the constraints error.
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 - A table contains 4 columns (C1,C2,C3,C4). With –update-key C2,C4, the sqoop generated query will be like
A - Update table set C1 = ‘newval’, c3 = ’newval’ where c2 = ‘oldval’ and c4 = ’oldval’
B - Update table set C2 = ‘newval’, c4 = ’newval’ where c2 = ‘oldval’ and c4 = ’oldval’
Answer : A
Explanation
only the columns other than in the –update-key parameter will be appear in the SET clause.
Q 7 - If the table to which data is being exported has more columns than the data present in the hdfs file then
B - The load can be done only for the relevant columns present in HDFS file
Answer : B
Explanation
The load can still be done by specifying the –column parameter to populate a subset of columns in the relational table.
Q 8 - To overwrite data present in hive table while importing data using sqoop, the sqoop parameter is
Answer : B
Explanation
The --hive-overwrite parameter truncates the hive table before loading the data.
Q 9 - The parameter --hive-drop-import-delims does which of the following?
A - replaces the hive delimiters with sqoop delimiters
B - drops the rows which do not have the \n,\t,\01 delimiters
C - removes all the \n,\t and \01 characters
D - drops the columns which do not have the \n,\t,\01 delimiters
Answer : C
Explanation
the parameter --hive-drop-import-delims removes the mentioned characters.
Q 10 - The property in sqoop that allows rows with all NULL values to be inserted into HBAse tables is −
B - sqoop.hbase.allow.row.nulls,
D - It is not possible as HBAse will never allow rows with all null Columns to be inserted
Answer : A
Explanation
The property sqoop.hbase.add.row.key instructs Sqoop to insert the row key column twice, once as a row identifier and then again in the data itself. Even if all other columns contain NULL, at least the column used for the row key won’t be null, which will allow the insertion of the row into HBase.