-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bugfix][plugin][rdbms] 1.DataBaseType should not be call set method,so that the driver is error when rdbmsreader to rdbmswriter 2.hive jdbc don't support method(Timestamp getTimestamp(int columnIndex, Calendar cal)) 3.DataBaseType add vertica driver #1188
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,15 @@ public enum DataBaseType | |
Sybase("sybase", "com.sybase.jdbc4.jdbc.SybDriver"), | ||
Databend("databend", "com.databend.jdbc.DatabendDriver"), | ||
Access("access","net.ucanaccess.jdbc.UcanaccessDriver"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot list all the database JDBC driver classes in this class. For drivers not specified in this class, you can resolve this by specifying the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the setDriverClass method of the DataBaseType enum class can cause errors from rdbmsreader to rdbmswriter, I have to add drivers for as many database types as possible. |
||
HANA("hana", "com.sap.db.jdbc.Driver"); | ||
HANA("hana", "com.sap.db.jdbc.Driver"), | ||
VERTICA("vertica", "com.vertica.jdbc.Driver"), | ||
DM("dm","dm.jdbc.driver.DmDriver"), | ||
OSCAR("oscar","com.oscar.Driver"), | ||
KINGBASE8("kingbase8","com.kingbase8.Driver"), | ||
HIGHGO("highgo","com.highgo.jdbc.Driver"), | ||
OCEANBASE("oceanbase","com.alipay.oceanbase.jdbc.Driver"), | ||
GOLDENDB("goldendb","com.goldendb.jdbc.Driver"), | ||
GBASEDBT("gbasedbt-sqli","com.gbasedbt.jdbc.Driver"); | ||
|
||
private static final Pattern jdbcUrlPattern = Pattern.compile("jdbc:\\w+:(?:thin:url=|//|thin:@|)([\\w\\d.,]+).*"); | ||
|
||
|
@@ -162,8 +170,4 @@ public String getTypeName() | |
return typeName; | ||
} | ||
|
||
public void setDriverClassName(String driverClassName) | ||
{ | ||
this.driverClassName = driverClassName; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the
hivereader
plugin, you can achieve specific handling for reading the Timestamp type by overriding thecreateColumn
method. You can refer to the implementation in the following link for guidance:https://github.com/wgzhao/Addax/blob/master/plugin/reader/postgresqlreader/src/main/java/com/wgzhao/addax/plugin/reader/postgresqlreader/PostgresqlReader.javaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it needs to be encapsulated into a unified script, hivereader will not be used, but rdbmsreader will be used instead