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.
Q 2 - What does the num-mappers parameter serves?
A - force sqoop to use only one map task
B - set the number of map tasks sqoop can use
C - store the data imported by each map tasks in a separate file
Answer : B
Explanation
The default number of map task ssqoop uses is 4.
This can be altered using num-mappers parameter.
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 - 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 tables 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 - 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 - Sqoop can automatically clear the staging table before loading by using the parameter
Answer : B
Explanation
the clear-staging-table automatically cleans data form the staging table.
Q 7 - The parameter to specify only a selected number of columns to be exported to a table is
Answer : A
Explanation
The columns clause will take a comma separated values of column names which will be part of the export.
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 - HIve shows more row count than imported by sqoop. What can be the reason?
A - the \n chara cter present int the data
B - Error with java classes used in sqoop
Answer : A
Explanation
The new line characters present in data will increase the number of rows.
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.