diff --git a/packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts b/packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts index 111428e3c1225..6ef8ba7cd93ad 100644 --- a/packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts +++ b/packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts @@ -145,8 +145,8 @@ export class ClickHouseDriver extends BaseDriver implements DriverInterface { const protocol = config.protocol ?? getEnv('dbSsl', { dataSource }) ? 'https:' : 'http:'; const url = `${protocol}//${host}:${port}`; - const username = getEnv('dbUser', { dataSource }); - const password = getEnv('dbPass', { dataSource }); + const username = config.username ?? getEnv('dbUser', { dataSource }); + const password = config.password ?? getEnv('dbPass', { dataSource }); const database = config.database ?? (getEnv('dbName', { dataSource }) as string) ?? 'default'; // TODO this is a bit inconsistent with readOnly