Sqoop Mock Test



This section presents you various set of Mock Tests related to Sqoop. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Sqoop Mock Test II

Answer : A

Explanation

with the --meta-connect parameter the metastore starts running as a service with the default port 16000.Now this metastore service becomes accessible throughout the cluster.

Answer : C

Explanation

With the The free form query we can write a sql query involving a join between 2 tables and mention it with --query parameter while importing. It is used in place of the --table parameter.

Answer : A

Explanation

The WHERE $CONDITION is used to split the result of the SQL query into multiple chunks.

Q 4 - 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 5 - While using a free-form query to import data, Sqoop finds that two columns from the joined tables have the same name. In this case the job

A - will fail

B - will run ignoring the column from each table

C - will prompt the user to rename one of the columns

D - automatically create an alias for one of the columns as succeed the job.

Answer : A

Explanation

The job will fail as the mapreduce job creates java classes for each of the column names and two java classes cannot have the same name in the same mapreduce job.

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

Explanation

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

Q 8 - In the import involving join of two tables the if there are two columns with matching name between two tables then this conflict can be resolved by

A - Using table aliases

B - Column aliases

C - First creating temporary tables form each table with different column names

D - Rename the columns in the source system and then import

Answer : B

Explanation

We can create column aliases in the import query and the mapreduce job will refer to the column aliases, avoiding the conflict.

Answer : B

Explanation

The data can be both imported and exported form Hadoop system using sqoop.

Q 10 - 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.

Q 11 - While inserting data into Relational system from Hadoop using sqoop, the various table constraints present in the relational table must be

A - Disabled temporarily

B - Dropped and re created

C - Renamed

D - Not violated

Answer : D

Explanation

We must verify that the data being exported does not violate the constraints error.

Q 12 - The export and import of data between sqoop and relational system happens through which of the following programs?

A - Sqoop client program

B - Mapreduce job submitted by the sqoop command

C - Database stores procedure

D - Hdfs file management program

Answer : B

Explanation

The sqoop client only submits the command and oversees the completion or failure of the command. The Mapreduce job created will do the actual data transfer.

Answer : C

Explanation

Every time a sqoop command is submitted, it verifies the metadata of the table before starting the export.

Answer : A

Explanation

the default behavior is to insert one row at a time while it can be configured for bulk load.

Q 15 - 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.

Answer : D

Explanation

The parameter

Dsqoop.export.statements.per.transaction decides how many rows will be inserted for transaction.

Answer : A

Explanation

The insert query is generated only by the sqoop command and processed as such without any further modification by any other driver.

Answer : D

Explanation

many databases use statements in option (D) to process multiple rows in the insert statement.

Answer : A

Explanation

The export fails if the query is not accepted by the database.

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.

Answer : B

Explanation

When you want to verify that indeed all the require data is successfully exported before loading the data to final table, use the parameter –staging-table.

Answer : A

Explanation

sqoop runs another mapreduce job to load the final table after the staging load completes successfully.

Answer : D

Explanation

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

Q 25 - Using the –staging-table parameter while loading data to relational tables the creation of staging table is done

A - Automatically b sqoop

B - Automatically by database

C - User has to ensure it is created

D - Automatically created by a Hadoop process beyond sqoop

Answer : C

Explanation

The user has to ensure that the staging tab e is created and accessible by sqoop.

Answer Sheet

Question Number Answer Key
1 A
2 C
3 A
4 C
5 A
6 B
7 A
8 B
9 B
10 D
11 D
12 B
13 C
14 A
15 B
16 A
17 D
18 A
19 D
20 A
21 C
22 B
23 A
24 D
25 C
sqoop_questions_answers.htm
Advertisements