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 - What are the two binary file formats supported by sqoop?
Answer : A
Explanation
These are the two binary file formats supported by Sqoop.
Q 2 - What are the two different incremental modes of importing data into sqoop?
Answer : D
Explanation
The --incremental parameter is used to fetch only the new data (data which does not already exist in hadoop) . It is done as an append if there are columns specified to be checked for new data. it cal also use the last modified parameter which will use the last_updated_date column from the existing table to identify the new row.
Q 3 - The parameter to give a custom name to the mapreduce job running a sqoop import command is −
Answer : C
Explanation
The --mapreduce-job-name is used to give a user chosen job name to the sqoop command so that it can be easliy distinguished from other jobs in the jobtracker UI.
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 happens if the sqoop generated export query is not accepted by the database?
Answer : A
Explanation
The export fails if the query is not accepted by the database.
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 - 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 - To ensure that the columns created in hive by sqoop have the correct data types the parameter used by sqoop is
Answer : A
Explanation
The correct column mapping is handled by the parameter --map-column-hive.
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 - What is achieved by the command sqoop job exec myjob
A - Sqoop job named myjob is saved to sqoop metastore
B - Sqoop job named myjob starts running
Answer : B
Explanation
This is the command to execute a sqoop job already saved in the metastore.