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 the advantage of storing password in a metastore as compared to storing in password in a file?
A - It can be run by any user with valid access to sqoop environment
B - The password in metastore can be updated while that in password file cannot be
C - The password file can be encrypted while the metastore cannot be encrypted
D - User intervention is required in password file but not in metastore.
Answer : A
Explanation
The main advantage of using metastore is it can be used by any user having access to the environment without knowing the password.
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 - With the staging-table parameter, the data is moved from staging to final table
A - Automatically if staging load is successful
B - Has to be done by user after verifying the data in staging
Answer : A
Explanation
sqoop runs another mapreduce job to load the final table after the staging load completes successfully.
Q 6 - Can the upsert feature of sqoop delete some data form the exported table?
Answer : A
Explanation
Sqoop will never delete data as part of upsert statement.
Q 7 - The disadvantage of using a stored procedure to laod data is
B - Parallel loads in the database table
C - The store procedure cannot load multiple tables at a time
Answer : D
Explanation
As sqoop will call the stored procedure using parallel jobs, so heavy laod is induced in the database.
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 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 parameters in sqoop command can be passed in to Oozie by using which tags?
Answer : B
Explanation
The <args> tag can contain the parameters of a sqoop command when scheduling with Oozie.