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 - To prevent the password from being mentioned in the sqoop import clause we can use the additional parameters

A - -p

B - --password-file

C - both of these

D - cannot be prevented

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.

Answer : C

Explanation

Sqoop uses the --last-value parameter in both the append mode and the last_update_date mode to import the incremental data form source.

Q 3 - The argument in a saved sqoop job can be altered at run time by using the option

A - --alter

B - --newval

C - --exec

D - --changeparam

Answer : C

Explanation

For a saved job named 'job1' the --table parameter can be altered at run time by using the command below.

sqoop job --exec job1 -- --table-newtable.

Answer : A

Explanation

The name of the job is based on the name of the table which is being imported.

Answer : D

Explanation

All the listed options are disadvantages while using the –staging-table option.

Q 6 - Sqoop can insert new rows and update existing changed rows into an already exported table by using the parameter

A - –update-insert

B - -update-else-insert

C - –update-mode insert

D - –update-mode allowinsert

Answer : D

Explanation

the –update-mode allwoinsert can be used to update as well as insert existing rows into the exported table.

Answer : A

Explanation

If there are columns whose value is mandatory and the HDFS file does not have it in the subset the load will fail.

Q 8 - To overwrite data present in hive table while importing data using sqoop, the sqoop parameter is

A - --sqoop-overwrite

B - --hive-overwrite

C - --hive-delete-all

D - --sqoop-delete-all

Answer : B

Explanation

The --hive-overwrite parameter truncates the hive table before loading the data.

Answer : A

Explanation

both partition-key and partition value are passed in to load data into hive partitioned table.

Answer : A

Explanation

The property sqoop.hbase.add.row.key instructs Sqoop to insert the row key column twice, once as a row identifier and then again in the data itself. Even if all other columns contain NULL, at least the column used for the row key won’t be null, which will allow the insertion of the row into HBase.

sqoop_questions_answers.htm
Advertisements