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 - For some databases sqoop can to faster data transefr by using the parameter
Answer : D
Explanation
The direct mode delegates the data transferring capabilities to the native untilities provided by the database.
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 - The export and import of data between sqoop and relational system happens through which of the following programs?
Answer : B
Explanation
The sqoop client only submits the command and oversees the completion or failure of the command. The Mapreduce job created will do the actual data transfer.
Q 5 - What does the parameter Dsqoop.export.records.per.statemet=10 do in a sqoop export command?
A - Exports 10 records in each insert statement
B - Export 10 insert statements every time the command runs
Answer : A
Explanation
The sqoop command submits the values form 10 records in each insert statement with this parameter.
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 - If the table to which data is being exported has more columns than the data present in the hdfs file then
B - The load can be done only for the relevant columns present in HDFS file
Answer : B
Explanation
The load can still be done by specifying the column parameter to populate a subset of columns in the relational table.
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 - 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 tool in sqoop which combines two data sets and preserves only the latest values using a primary key is
Answer : A
Explanation
The Sqoop-merge tool combines two datasets and preserves the latest records. The column marked for primary key is indicated by the parameter merge-key