Search before asking
Linkis Component
Description
The Linkis JDBC engine currently lacks proper support for DB2 database. The default validation query SELECT 1 does not work for DB2, which requires SELECT 1 FROM SYSIBM.SYSDUMMY1. Additionally, the schema query logic in SqlConnection needs to be updated to use proper DB2 system catalog queries.
Steps to reproduce
- Create a JDBC connection to DB2 database
- The connection validation fails with syntax error
- Schema listing may not work correctly with current implementation
Expected behavior
DB2 connections should work properly with correct validation queries and schema retrieval should return accurate schema list from SYSCAT.SCHEMATA.
Your environment
- Linkis version used: 2.0.0
- Environment name and version:
- hadoop-3.3.4
- db2-11.x
- jdk 1.8.0_xxx
Anything else
This PR adds:
- Validation query mapping configuration for different database types
- Default mapping includes Oracle and DB2 validation queries
- Updated DB2 SqlConnection to use proper SYSCAT.SCHEMATA query
- Configurable validation query mapping via
wds.linkis.jdbc.validation.query.mapping
Are you willing to submit a PR?
Search before asking
Linkis Component
Description
The Linkis JDBC engine currently lacks proper support for DB2 database. The default validation query
SELECT 1does not work for DB2, which requiresSELECT 1 FROM SYSIBM.SYSDUMMY1. Additionally, the schema query logic in SqlConnection needs to be updated to use proper DB2 system catalog queries.Steps to reproduce
Expected behavior
DB2 connections should work properly with correct validation queries and schema retrieval should return accurate schema list from SYSCAT.SCHEMATA.
Your environment
Anything else
This PR adds:
wds.linkis.jdbc.validation.query.mappingAre you willing to submit a PR?