ℹ️ We are using JDBC bridges to connect to other databases from ClickHouse. The config file of JDBC bridge are in the Vault.
Requirements : to connect a new database, Arkhn recommends to use a replica rather than production database. The data flow between ClickHouse and the external database must be enabled by opening the necessary ports to allow communication through the JDBC bridge.
PLATFORM-URL/ui/vault/secrets/ch-datasources/datasources.json
_or__ if there is a _ in the schema name. :{
"database_SCHEMA": {
"converter": {
"mappings": [{ "nativeType": "TIMESTAMP", "to": "DateTime64" }]
},
"driverClassName": "oracle.jdbc.driver.OracleDriver",
"jdbcUrl": "jdbc:oracle:thin:@//serveur:port/database",
"username": "username",
"password": "password",
"connectionTestQuery": "SELECT 1 FROM DUAL"
}
{
"database_SCHEMA": {
"converter": {
"mappings": [
{ "nativeType": "date", "to": "DateTime64" },
{ "nativeType": "datetime", "to": "DateTime64" },
{ "nativeType": "datetime2", "to": "DateTime64" }
]
},
"driverClassName": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"jdbcUrl": "jdbc:sqlserver://serveur:port;databaseName=name;encrypt=false;",
"username": "username",
"password": "password",
"maximumPoolSize": 10,
"minimumIdle": 0,
"parameters": {
"fetch_size": 100000
},
}
select *
from jdbc('database_SCHEMA', 'table_name')
⚠️ Be aware that JDBC is case sensitive. If the source table name is uppercase, the table name parameter must be 'TABLE_NAME'