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 - By default the records from databases imported to HDFS by sqoop are
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.
unlike databases there is no NULL values in CSV files. Those are handled by sqoop by using null string.
Q 3 - The free-form query import feature in sqoop allows to import data from
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
We can create column aliases in the import query and the mapreduce job will refer to the column aliases, avoiding the conflict.
Q 5 - The insert query used to insert exported data into tables is generate by
The insert query is generated only by the sqoop command and processed as such without any further modification by any other driver.
Q 6 - A table contains 4 columns (C1,C2,C3,C4). With –update-key C2,C4, the sqoop generated query will be like
only the columns other than in the –update-key parameter will be appear in the SET clause.
Q 7 - What is the disadvantage of using the –columns parameter to insert a subset of columns to the relational table?
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
The –input- null-non-string is used to substitute null values for text based columns.
Q 9 - The purpose of --hive-delims-replacement parameter in sqoop is to
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.
Q 10 - What is achieved by the command – sqoop job –exec myjob
This is the command to execute a sqoop job already saved in the metastore.