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

You can do both full and partial data import from tables but not a subset of columns from a table.

Q 3 - What is the disadvantage of storing password in the metastore as compared to storing in a password file?

A - it is easily accessible

B - it may get deleted accidentally

C - It cannot be updated

D - it is unencrypted

Answer : D

Explanation

The password file can be encrypted and prevented from reading by proper permissions. But metastore is unencrypted and cannot be prevented from reading.

Answer : B

Explanation

Sqoop needs to find the minimum and maximum value of the column

specified in the --split-by parameter so that sqoop can partition data into multiple independent slices that will be transferred in a parallel manner.

Answer : C

Explanation

In the scenario when the database requires table_level write lock, higher value of sqoop.export.statements.per.transaction will lock the table for a longer time and will decrease the performance.

Q 6 - With MySQL, the feature used by sqoop for update or insert data into an exported table is

A - ON DUPLICATE KEY UPDATE

B - ON KEY UPDATE

C - ON NEW KEY UPDATE

D - ON NEW UPDATE

Answer : A

Explanation

The ON DUPLICATE KEY UPDATE feature of mySql is used for update else insert with sqoop.

Q 7 - The parameter to specify only a selected number of columns to be exported to a table is

A - -columns

B - –column-subset

C - ----columns-not-all

D - -columns-part

Answer : A

Explanation

The columns clause will take a comma separated values of column names which will be part of the export.

Q 8 - When a column value has a different data type in the HDFS system than expected in the relational table to which data will be exported −

A - Sqoop skips the rows

B - Sqoop fails the job

C - Sqoop loads the remaining rows by halting and asking whether to continue the load

D - Sqoop automatically changes the data type to a compatible data type and loads the data.

Answer : B

Explanation

The job fails and sqoop gives a log showing the reason of failure.

Answer : A

Explanation

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

Answer : A

Explanation

The ValidationThreshold - Determines if the error margin between the source and target are acceptable: Absolute, Percentage Tolerant, etc. Default implementation is AbsoluteValidationThreshold which ensures the row counts from source and targets are the same.

sqoop_questions_answers.htm
Advertisements