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 - The parameter in sqoop which specifies the output directories when importing data is

A - --output-path

B - --target-path

C - --output-dir

D - --target-dir

Answer : D

Explanation

The --target-dir and --warehouse-dir are the two parameters used for specifying the path where import will be done.

Q 2 - What are the two different incremental modes of importing data into sqoop?

A - merge and add

B - append and modified

C - merge and lastmodified

D - append and lastmodified

Answer : D

Explanation

The --incremental parameter is used to fetch only the new data (data which does not already exist in hadoop) . It is done as an append if there are columns specified to be checked for new data. it cal also use the last modified parameter which will use the last_updated_date column from the existing table to identify the new row.

Q 3 - while specifying the connect string in the sqoop import command, for a Hadoop cluster, if we specify localhost in place of a server address(hostname or IP address) in the URI, then

A - The import job will connect to local databases

B - Each node may connect to different databases

C - the import job may succeed

D - All of the above

Answer : D

Explanation

Specifying localhost does not invalidate the command as some local database may be running and the node will be able to connect. So each node will connect to different database if they are available.

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

Answer : B

Explanation

The data is first staged into a temporary location as a HDFS file and then loaded into the hive table.

Q 9 - The parameter used to identify the individual row in HBase while importing data to it using sqoop is

A - --hbase-row-key

B - --hbase-rowkey

C - --hbase-rowid

D - --hbase-row-id

Answer : A

Explanation

the parameter --hbase-row-key is used in sqoop to identify each row in the HBase table.

Q 10 - When inserting data using sqoop into Hbase table in one physical node, the different parallel tasks of sqoop import create a bottleneck. This can be solved by

A - Configuring sqoop not to run parallel tasks

B - Configuring gHBase to accept rows in parallel

C - Creating more regions in HBAse table

D - Cannot be solved

Answer : C

Explanation

By creating more regions, the Hbase table get split into many nodes in the HBAse cluster, which help load data faster from the sqoop parallel load tasks.


sqoop_questions_answers.htm

Advertisements