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 - By default the records from databases imported to HDFS by sqoop are

A - Tab separated

B - Concatenated columns

C - space separated

D - comma separated

Answer : D

Explanation

The default record separator is comm.

Q 2 - What is the default value used by sqoop when it encounters a missing value while importing form CSV file.

A - NULL

B - null

C - space character

D - No values

Answer : B

Explanation

unlike databases there is no NULL values in CSV files. Those are handled by sqoop by using null string.

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.

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.

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

Explanation

only the columns other than in the –update-key parameter will be appear in the SET clause.

Answer : A

Explanation

If there are columns whose value is mandatory and the HDFS file does not have it in the subset the load will fail.

Q 8 - For a column of data type numeric, 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 : B

Explanation

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

Answer : C

Explanation

As the characters \n, \t, and \01 may interfere with the data giving incorrect result, these can be replaced with a suitable string using this parameter.

Answer : B

Explanation

This is the command to execute a sqoop job already saved in the metastore.

sqoop_questions_answers.htm
Advertisements