Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#5318][#5311][#5328] improvement(web): Add jdbc-driver properties for Paimon JDBC and fix jdbc issue (#5320)

Qian Xiafea1c740d184
diff --git a/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js b/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
index 4cb41e6fb8..34db30698d 100644
--- a/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
+++ b/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
@@ -240,10 +240,10 @@ const CreateCatalogDialog = props => {
propItems[0]?.value === 'filesystem' &&
providerSelect === 'lakehouse-paimon'
) {
- nextProps = propItems.filter(item => item.key !== 'uri')
+ nextProps = propItems.filter(item => !['jdbc-driver', 'jdbc-user', 'jdbc-password', 'uri'].includes(item.key))
}
const parentField = nextProps.find(i => i.key === 'authentication.type')
- if (parentField && parentField.value === 'simple') {
+ if (!parentField || parentField?.value === 'simple') {
nextProps = nextProps.filter(
item => item.key !== 'authentication.kerberos.principal' && item.key !== 'authentication.kerberos.keytab-uri'
)
@@ -294,19 +294,19 @@ const CreateCatalogDialog = props => {
...others
}
uri && (properties['uri'] = uri)
- } else if (
- (!authType || authType === 'simple') &&
- ['lakehouse-iceberg', 'lakehouse-paimon'].includes(providerSelect)
- ) {
+ } else {
properties = {
- 'catalog-backend': catalogBackend,
+ uri: uri,
...others
}
- uri && (properties['uri'] = uri)
- authType && (properties['authType'] = authType)
- } else {
- properties = prevProperties
+ catalogBackend && (properties['catalog-backend'] = catalogBackend)
+ jdbcDriver && (properties['jdbc-driver'] = jdbcDriver)
+ jdbcUser && (properties['jdbc-user'] = jdbcUser)
+ jdbcPwd && (properties['jdbc-password'] = jdbcPwd)
}
+ authType && (properties['authType'] = authType)
+ kerberosPrincipal && (properties['authentication.kerberos.principal'] = kerberosPrincipal)
+ kerberosKeytabUri && (properties['authentication.kerberos.keytab-uri'] = kerberosKeytabUri)
const catalogData = {
...mainData,
diff --git a/web/web/src/lib/utils/initial.js b/web/web/src/lib/utils/initial.js
index 8629bcd186..1f3ae73ca7 100644
--- a/web/web/src/lib/utils/initial.js
+++ b/web/web/src/lib/utils/initial.js
@@ -231,7 +231,6 @@ export const providers = [
value: 'filesystem',
defaultValue: 'filesystem',
required: true,
- description: 'Only supports "filesystem" now.',
select: ['filesystem', 'hive', 'jdbc']
},
{
@@ -249,6 +248,14 @@ export const providers = [
required: true,
description: 'e.g. file:///user/hive/warehouse-paimon/ or hdfs://namespace/hdfs/path'
},
+ {
+ key: 'jdbc-driver',
+ value: '',
+ required: true,
+ parentField: 'catalog-backend',
+ hide: ['hive', 'filesystem'],
+ description: `"com.mysql.jdbc.Driver" or "com.mysql.cj.jdbc.Driver" for MySQL, "org.postgresql.Driver" for PostgreSQL`
+ },
{
key: 'jdbc-user',
value: '',