- 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 - If there is already a target directory with the same name as the table being imported then
A - The directory gets deleted and recreated.
C - Another directory under the existing directory gets created.
Answer : B
Explanation
To prevent accidental deletion of data the job fails.
Q 2 - What option can be used to import the entire database from a relational system using sqoop?
Answer : C
Explanation
The --import-all-tables is used to import all the tables from the database. The tables structure as well as data is imported one by one through this command.
Q 3 - What is achieved by using the --meta-connect parameter in a sqoop command?
A - run metastore as a service accessible remotely
B - run metastore as a service accessible locally
C - connect to the meastore tables
D - connect to the metadata of the external relational tables form which data has to be imported
Answer : A
Explanation
with the --meta-connect parameter the metastore starts running as a service with the default port 16000.Now this metastore service becomes accessible throughout the cluster.
Q 4 - When does sqoop gather the metadata of the relational table into which it exports the data?
A - Gathers the metadata of all tables only once during establishing the connection to the database
B - Never as it relies on the user to ensure the exported data matches the table’s structure
C - Every time the sqoop export command it submitted and just before the data transfer starts.
D - Only if the export fails, Sqoop accesses the metadata of the table
Answer : C
Explanation
Every time a sqoop command is submitted, it verifies the metadata of the table before starting the export.
Q 5 - What does the parameter “ Dsqoop.export.records.per.statemet=10” do in a sqoop export command?
A - Exports 10 records in each insert statement
B - Export 10 insert statements every time the command runs
Answer : A
Explanation
The sqoop command submits the values form 10 records in each insert statement with this parameter.
Q 6 - Sqoop can insert new rows and update existing changed rows into an already exported table by using the parameter
Answer : D
Explanation
the –update-mode allwoinsert can be used to update as well as insert existing rows into the exported table.
Q 7 - How do we decide the order of columns in which data is loaded to the target table?
A - By using -- order by parameter
B - By using a new mapreduce job aftet submitting sqoop export command
C - By using a database stored procedure
D - By using –columns parameter with comma separated column names in the required order.
Answer : D
Explanation
we can use the –column parameter and specify the required column in the required order.
Q 8 - For a column of data type numeric, the parameter used for substituting null values is
Answer : B
Explanation
The –input- null-non-string is used to substitute null values for text based columns.
Q 9 - HIve shows more row count than imported by sqoop. What can be the reason?
A - the \n chara cter present int the data
B - Error with java classes used in sqoop
Answer : A
Explanation
The new line characters present in data will increase the number of rows.
Q 10 - What is achieved by the command – sqoop job –exec myjob
A - Sqoop job named myjob is saved to sqoop metastore
B - Sqoop job named myjob starts running
Answer : B
Explanation
This is the command to execute a sqoop job already saved in the metastore.
To Continue Learning Please Login
Login with Google