Sqoop Online Quiz


Advertisements


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 - While SequenceFile stores each record as key-value pair, the avro system stored records as

A - Simple text

B - chained lists

C - Linked lists

D - schema and data

Answer : D

Explanation

Sqoop generates the schema automatically when reading the data and stores the schema details along with the data in each Avro file generated.

Q 2 - what option can bne used to import only some of the table from a database while using the --import-all-tables parameter?

A - --skip-tables

B - --without-tables

C - --forgo-tables

D - --exclude-tables

Answer : D

Explanation

You can mention the tables names along with the --exclude-table clause to skip a given number of tables while importing an entire database.

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.

Q 4 - Which parameter in sqoop is used for bulk data export to relational tables?

A - –bulk

B - –batch

C - -load

D - -grouped data

Answer : B

Explanation

The –batch parameter uses the JDBC batch load capability to do bulk load.

Answer : A

Explanation

The sqoop command submits the values form 10 records in each insert statement with this parameter.

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 - For Text based columns 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 : A

Explanation

The –input- null-string is used to substitute null values for text based columns.

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 : C

Explanation

the parameter --hive-drop-import-delims removes the mentioned characters.

Q 10 - The tool in sqoop which combines two data sets and preserves only the latest values using a primary key is

A - sqoop-merge

B - sqoop-combine

C - sqoop-preserve

D - sqoop-distinct

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


sqoop_questions_answers.htm

Advertisements