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 - What is the default value used by sqoop when it encounters a missing value while importing form CSV file.
Answer : B
Explanation
unlike databases there is no NULL values in CSV files. Those are handled by sqoop by using null string.
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 - While importing data into Hadoop using sqoop the SQL SELCT clause is used. Similarly while exporting data form Hadoop the SQL clause used is
Answer : D
Explanation
The INSERT statements are generated by sqoop to insert data into the relational tables.
Q 5 - When the sqoop.export.records.per.statement is set to two or more, the query created by sqoop has the SQL form of
A - INSERT INTO TABLE VALUES(..);INSERT INTO TABLE VALUES(..); and so on.
B - BULK INSERT INTO TABLE VALUES(..),(),();
Answer : D
Explanation
many databases use statements in option (D) to process multiple rows in the insert statement.
Q 6 - Can sqoop use the TRUNCATE option in database while clearing data from a table?
Answer : C
Explanation
If available through the database driver, sqoop can clear the data quickly using TRUNCATE option.
Q 7 - To sync a HDFS file with some deleted rows with a previously exported table for the same table the option is to
B - Export the data again to a new database table and rename it
Answer : B
Explanation
you can drop the existing table and re-import the data from Hadoop. Then rename it to the dropped table.
Q 8 - For a column of data type numeric, the parameter used for substituting null values is
Answer : B
Explanation
The input- null-non-string is used to substitute null values for text based columns.
Q 9 - The parameter that can create a hbase table using sqoop when importing data to hbase is
Answer : B
Explanation
If thecreate-hbase-table is mentioned during the import then the Hbase table can get created using sqoop if it does not already exist.
Q 10 - The sqoop export/import jobs canbe stored and used again and again by using
Answer : D
Explanation
Running a sqoop job by using sqoop-job statement saves the job into metastore which can be retrived later and used again and again
Example −
$ sqoop-job --create jobname -- import --connect jdbc:mysql://example.com/db \ --table mytable