- 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 - By default the records from databases imported to HDFS by sqoop are
Answer : D
Explanation
The default record separator is comm.
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 - 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 - When does sqoop gather the metadata of the relational table into which it exports the data?
A - Gathers the metadata of all tables only once during establishing the connection to the database
B - Never as it relies on the user to ensure the exported data matches the table’s structure
C - Every time the sqoop export command it submitted and just before the data transfer starts.
D - Only if the export fails, Sqoop accesses the metadata of the table
Answer : C
Explanation
Every time a sqoop command is submitted, it verifies the metadata of the table before starting the export.
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 - 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 - The parameter which can be used in place of --table parameter to insert data into table is
Answer : A
Explanation
The –call parameter will call a database stored procedure which in turn can insert data into table.
Q 8 - The parameter used in sqoop to import data directly into hive is
Answer : C
Explanation
The parameter used is –hive-import which will directly place the data in hie without needing any connectors as in case of relational systems.
Q 9 - The parameter that can create a hbase table using sqoop when importing data to hbase is
Answer : B
Explanation
If the–create-hbase-table is mentioned during the import then the Hbase table can get created using sqoop if it does not already exist.
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.