Sqoop perguntas e respostas de entrevista
Pergunta 1. What is Sqoop?
Sqoop is a tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases.
Pergunta 2. Explain the import command in Sqoop.
The import command in Sqoop is used to import data from a relational database into Hadoop.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --target-dir /user/hadoop/mytable
Pergunta 3. What is the purpose of the --target-dir option in Sqoop import?
The --target-dir option specifies the HDFS directory where the imported data will be stored.
Pergunta 4. How can you perform an incremental import in Sqoop?
Incremental imports in Sqoop can be done using the --incremental option. You need to specify the mode and the column to use for tracking changes.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --incremental append --check-column id --last-value 100
Pergunta 5. What is the purpose of the --warehouse-dir option in Sqoop?
The --warehouse-dir option specifies the base directory in HDFS where imported data is stored.
Mais uteis segundo os usuarios: