- 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
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 - Besides the JDBC driver, sqoop also needs which of the following to connect to remote databases?
Answer : C
Explanation
Sqoop Needs both JDBC driver and Database connector which is required to import data.
Answer : C
Explanation
You can do both full and partial data import from tables but not a subset of columns from a table.
Q 3 - The free-form query import feature in sqoop allows to import data from
B - a relational source without using a connector
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 - Data Transfer using sqoop can be
A - only imported into the Hadoop system
Answer : B
Explanation
The data can be both imported and exported form Hadoop system using sqoop.
Q 5 - With the –staging-table parameter, the data is moved from staging to final table
A - Automatically if staging load is successful
B - Has to be done by user after verifying the data in staging
Answer : A
Explanation
sqoop runs another mapreduce job to load the final table after the staging load completes successfully.
Q 6 - A table contains 4 columns (C1,C2,C3,C4). With –update-key C2,C4, the sqoop generated query will be like
A - Update table set C1 = ‘newval’, c3 = ’newval’ where c2 = ‘oldval’ and c4 = ’oldval’
B - Update table set C2 = ‘newval’, c4 = ’newval’ where c2 = ‘oldval’ and c4 = ’oldval’
Answer : A
Explanation
only the columns other than in the –update-key parameter will be appear in the SET clause.
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 - To overwrite data present in hive table while importing data using sqoop, the sqoop parameter is
Answer : B
Explanation
The --hive-overwrite parameter truncates the hive table before loading the data.
Q 9 - The data type of the column used for partition name while importing data using sqoop ino hive can be
Answer : A
Explanation
Sqoop can only take strings as partition column names while loading data to hive.
Q 10 - The sqoop export/import jobs canbe stored and used again and again by using
Answer : D
Explanation
Running a sqoop job by using sqoop-job statement saves the job into metastore which can be retrived later and used again and again
Example −
$ sqoop-job --create jobname -- import --connect jdbc:mysql://example.com/db \ --table mytable
To Continue Learning Please Login
Login with Google