Skip to content
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

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading