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.

Questions and Answers

Q 1 - Besides the JDBC driver, sqoop also needs which of the following to connect to remote databases?

A - Putty

B - SSH

C - Conenctor

D - sqoop client

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.

A - NULL

B - null

C - space character

D - No values

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 −

A - --sqoop-job-name

B - --map-job-name

C - --mapreduce-job-name

D - --rename-job

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

A - APPEND

B - MERGE

C - UPDTAE

D - INSERT

Answer : D

Explanation

The INSERT statements are generated by sqoop to insert data into the relational tables.

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?

A - Yes

B - No

C - Depends on the database

D - Depends on the Hadoop configuration

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

A - Using staging table

B - Export the data again to a new database table and rename it

C - Use a ETL tool

D - Can not be done using sqoop

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

A - -input-null-string

B - -input-null-non-string

C - -input-null-text

D - -input-null-varchar

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

A - -hbase-create-table

B - -create-hbase-table

C - -create-hbase-table-columnlist

D - -create-hbase-table-rowkey

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

A - sqoop- jobname

B - sqoop-save-job

C - sqoop-all-jobs

D - sqoop-job

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
sqoop_questions_answers.htm
Advertisements