Use Loader to export data from Hive to a relational database.
cd ${BIGDATA_HOME}/FusionInsight_Porter_8.1.2.2/install/FusionInsight-Sqoop-1.99.3/FusionInsight-Sqoop-1.99.3/server/webapps/loader/WEB-INF/ext-lib
chown omm:wheel JAR package name
chmod 600 JAR package name
Setting Basic Job Information
Parameter |
Description |
Example Value |
---|---|---|
Name |
Specifies the name of a relational database connection. |
dbName |
JDBC Driver Class |
Specifies the name of a Java database connectivity (JDBC) driver class. |
oracle.jdbc.driver.OracleDriver |
JDBC Connection String |
Specifies the JDBC connection string. |
jdbc:oracle:thin:@//10.16.0.1:1521/oradb |
Username |
Specifies the username for connecting to the database. |
omm |
Password |
Specifies the password for connecting to the database. |
xxxx |
JDBC Connection Properties |
JDBC connection attribute. Click Add to manually add the attribute.
|
|
Setting Data Source Information
Parameter |
Description |
Example Value |
---|---|---|
Hive instance |
Specifies the Hive service instance that Loader selects from all available Hive service instances in the cluster. If the selected Hive service instance is not added to the cluster, the Hive job cannot run properly. |
hive |
Quantity |
Specifies the number of maps that are started at the same time in a MapReduce job of a data configuration operation. The value must be less than or equal to 3000. |
20 |
Setting Data Transformation
Input Type |
Export Type |
---|---|
Hive input |
Table output |
Setting Data Storage Information and Executing the Job
Parameter |
Description |
Example Value |
---|---|---|
Schema name |
Specifies the database schema name. |
dbo |
Table name |
Specifies the name of a database table that is used to save the final data of the transmission. NOTE:
Table names can be defined using macros. For details, see Using Macro Definitions in Configuration Items. |
test |
Temporary table |
Specifies the name of a temporary database table that is used to save temporary data during the transmission. The fields in the table must be the same as those in the database specified by Table name. NOTE:
A temporary table is used to prevent dirty data from being generated in the destination table when data is exported to the database. Data is migrated from the temporary table to the destination table only after all data is successfully written to the temporary table. Using temporary tables increases the job execution time. |
tmp_test |
Checking the Job Execution Result