Sqoop Interview Questions and Answers
Ques 11. Explain the purpose of the --map-column-java option in Sqoop.
The --map-column-java option allows you to specify how the columns from the database table should be mapped to Java types during import.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --map-column-java id=String,value=Double
Ques 12. What is the difference between the free-form query import and table-based import in Sqoop?
In free-form query import, you can specify a SQL query to extract data, while in table-based import, you directly import an entire table.
Ques 13. Explain the purpose of the --direct-split-size option in Sqoop.
The --direct-split-size option is used to specify the number of bytes per split when using direct mode for imports and exports.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --direct --direct-split-size 1000000
Ques 14. How can you perform a full load import in Sqoop?
A full load import in Sqoop can be done by using the --m (or --num-mappers) option with a value of 1 to import the data using a single mapper.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --m 1
Ques 15. Explain the purpose of the --merge-key option in Sqoop.
The --merge-key option is used during the Sqoop merge operation to specify the columns used for identifying rows to merge.
Most helpful rated by users: