- 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 - 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 - The argument in a saved sqoop job can be altered at run time by using the option
Answer : C
Explanation
For a saved job named 'job1' the --table parameter can be altered at run time by using the command below.
sqoop job --exec job1 -- --table-newtable.
Q 4 - In the import involving join of two tables the if there are two columns with matching name between two tables then this conflict can be resolved by
C - First creating temporary tables form each table with different column names
Answer : B
Explanation
We can create column aliases in the import query and the mapreduce job will refer to the column aliases, avoiding the conflict.
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 - 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 - While importing directly to hive using sqoop, if the table meta data does not exist in hive then
B - sqoop creates the meta data in hive
C - sqoop waits for user to input the meta data
D - sqoop imports the data as a file without creating any meta data
Answer : B
Explanation
as both sqoop and hive are part of hadoop ecosystem, sqoop is able to create the meta data in hive.
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 - 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.
To Continue Learning Please Login
Login with Google