You need to enable JavaScript to run this app.
ByteHouse Enterprise Edition

ByteHouse Enterprise Edition

Copy page
Download PDF
Table function
jdbc
Copy page
Download PDF
jdbc

jdbc(datasource, schema, table) - Returns a table connected through a JDBC driver.
This table function requires a separate clickhouse-jdbc-bridge program to run.
It support projects nullable types (based on the DDL of the remote table being searched).
Example

SELECT * FROM jdbc('jdbc:mysql://localhost:3306/?user=root&password=root', 'schema', 'table')
SELECT * FROM jdbc('mysql://localhost:3306/?user=root&password=root', 'select * from schema.table')
SELECT * FROM jdbc('mysql-dev?p1=233', 'num Int32', 'select toInt32OrZero(''{{p1}}'') as num')
SELECT * 
FROM jdbc('mysql-dev?p1=233', 'num Int32', 'select toInt32OrZero(''{{p1}}'') as num')
SELECT a.datasource AS server1, b.datasource AS server2, b.name AS db 
FROM jdbc('mysql-dev?datasource_column', 'show databases') a 
INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name
Last updated: 2026.03.31 16:09:09