Skip to content

Commit

Permalink
[#5318][#5311][#5328] improvement(web): Add jdbc-driver properties fo…
Browse files Browse the repository at this point in the history
…r Paimon JDBC and fix jdbc issue (#5339)

### What changes were proposed in this pull request?
1. Add jdbc-driver properties for Paimon JDBC
<img width="589" alt="image"
src="https://github.com/user-attachments/assets/fd8f5bf2-0f0a-4fbb-b6c5-5531c8d92155">

3. fix update paimon catalog issue

### Why are the changes needed?
N/A

Fix: #5318
Fix: #5311
Fix: #5328

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
manually

Co-authored-by: Qian Xia <[email protected]>
  • Loading branch information
github-actions[bot] and LauraXia123 authored Oct 29, 2024
1 parent 33ad42a commit 88348ee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 8 additions & 1 deletion web/web/src/lib/utils/initial.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ export const providers = [
value: 'filesystem',
defaultValue: 'filesystem',
required: true,
description: 'Only supports "filesystem" now.',
select: ['filesystem', 'hive', 'jdbc']
},
{
Expand All @@ -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: '',
Expand Down

0 comments on commit 88348ee

Please sign in to comment.