0
Follow
0
View

How to automatically escape table structure

cuixingwei05 注册会员
2023-02-28 00:19

Write based on Monster group and GPT:
Use Sqoop import command to import Oracle table structure into Hive. Here is an example command:

sqoop import \
--connect jdbc:oracle:thin:@:: \
--username  \
--password  \
--table  \
--hive-import \
--hive-table  \
--create-hive-table \
--hive-overwrite \
--query 'SELECT * FROM  WHERE 1=0' \
--null-string '\\N' \
--null-non-string '\\N'


This command imports the Oracle table structure into the Hive table. The following is the meaning of each parameter in the command:

--connect: Specifies the JDBC connection string for the Oracle database.
--username: specifies the username of the Oracle database.
--password: specifies the password of the Oracle database.
--table: Specifies the name of the Oracle table to import.
--hive-import: Specifies that data is imported to the Hive.
--hive-table: Specifies the Hive table name.
--create-hive-table: If the Hive table does not exist, a new table is created.
--hive-overwrite: If the hive table already exists, the Hive table is overwritten.
--query: Specifies the SQL query to be executed. The query statement here is only used to get the table structure, so the query result is empty.
--null-string: Specifies that an empty string in Oracle is mapped to a NULL value in Hive during data import.
--null-non-string: Specifies that null values in Oracle are mapped to NULL values in Hive when data is imported.
After this command is executed, only an empty table is created in Hive. This table has the same structure as the Oracle table, but no data is imported.

About the Author

Question Info

Publish Time
2023-02-28 00:19
Update Time
2023-02-28 00:19

Related Question

如何更新ssl证书而不重新启动Ktor服务器?

Tomcat的Maven插件启动Tomcat,控制台没有输出信息

当@ObservedObject被改变并且@AppStorage被使用时,NavigationLink会跳回

Java升级导致Tomcat setenv.sh文件过期

在protobuf消息中将值类型为float的现有字段更改为可选的float

在tomcat中应用SSL不能使用ip地址

SwiftUI:在初始化器中没有标签/字符串,但有ButtonStyle的按钮

Linux下安装tomcat

我应该如何构造我的嵌套数据Firestore

Boto3客户端连接超时