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.

Answer : C

Explanation

Sqoop uses the --last-value parameter in both the append mode and the last_update_date mode to import the incremental data form source.

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

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

Answer : C

Explanation

A comma separate dlist of column names which together identify a unique record can be used in the –update-key parameter.

Q 7 - To sync a HDFS file with some deleted rows with a previously exported table for the same table the option is to

A - Using staging table

B - Export the data again to a new database table and rename it

C - Use a ETL tool

D - Can not be done using sqoop

Answer : B

Explanation

you can drop the existing table and re-import the data from Hadoop. Then rename it to the dropped table.

Answer : B

Explanation

as both sqoop and hive are part of hadoop ecosystem, sqoop is able to create the meta data in hive.

Q 9 - To import data to HBase using sqoop the parameter(s) required is/are

A - --hbase-table

B - --hbase-columns

C - --hbase-table and --column-family

D - --habse-table and --hbase-column-family

Answer : C

Explanation

sqoop needs to mention both the hbase table name and column family to do the import.

Answer : C

Explanation

As Hbase does not allow the rows with all NULL values, those rows were skipped during import and caused fewer row counts.


sqoop_questions_answers.htm

Advertisements