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

Answer : B

Explanation

A Mapreduce job executes multiple mappers and each mapper retrieves a slice of Table's data.

Q 2 - The data type mapping between the database column and sqoop column can be overridden by using the parameter

A - --override-column-type

B - --map-column-type

C - --override-column-java

D - --map-column-java

Answer : D

Explanation

As sqoop uses the Java Data types internally, the mapping of the data types has to be done with Java Data Types.

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

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

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

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 used to override NULL values to be inserted into relational targets is

A - -override-null

B - –input-null-string

C - -substitute-null

D - --replace-null

Answer : B

Explanation

the parameter –input-null-string is used to override the NULL values when exporting to relational tables.

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.

Q 9 - The parameter that can create a hbase table using sqoop when importing data to hbase is

A - -hbase-create-table

B - -create-hbase-table

C - -create-hbase-table-columnlist

D - -create-hbase-table-rowkey

Answer : B

Explanation

If the–create-hbase-table is mentioned during the import then the Hbase table can get created using sqoop if it does not already exist.

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