- Sqoop Tutorial
- Sqoop - Home
- Sqoop - Introduction
- Sqoop - Installation
- Sqoop - Import
- Sqoop - Import-All-Tables
- Sqoop - Export
- Sqoop - Sqoop Job
- Sqoop - Codegen
- Sqoop - Eval
- Sqoop - List Databases
- Sqoop - List Tables
- Sqoop Useful Resources
- Sqoop - Questions and Answers
- Sqoop - Quick Guide
- Sqoop - Useful Resources
- Sqoop - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
Q 1 - To import data to Hadoop cluster from relational database sqoop create a mapreduce job. In this job
A - All the data is transferred in one go.
B - each mapper transfers a slice of Table's data
C - Each mapper transfers tables' data along with table's metadata (name of the columns etc)
D - Only the schema of relational table is validated without fetching data
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
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
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
C - First creating temporary tables form each table with different column names
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
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
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
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 −
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
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.
Q 10 - In both import and export scenario, the role of ValidationThreshold is to determine if
A - the error margin between the source and target is within a range
B - the Sqoop command can handle the entire number of rows
C - the number of rows rejected by sqoop while reading the data
D - the number of rows rejected by the target database while loading the data
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.