Create a Sqoop import command
You create a single Sqoop import command that imports data from diverse data sources, such as a relational database on a different network, into Hive using Apache Sqoop.
- Database connection information: database URI, database name, and connection
protocol, such as
jdbc:mysql:
- The data to import
- Parallel processing directives for fast data transfer
- Destination for imported data
zeroDateTimeBehavior
property to handle values of
'0000-00-00\' in DATE columns, explicitly specify
zeroDateTimeBehavior=CONVERT_TO_NULL
in the connection string. For
example, --connect jdbc:mysql://<MySQL
host>/<DB>?zeroDateTimeBehavior=CONVERT_TO_NULL
.