Skip to content

[bug] Clickhouse JDBC sink connector fails with recent ClickHouse versions #32

@jknetl

Description

@jknetl

Issue

The Pulsar IO supports ClickHouse JDBC sink connector. However when trying to use it with recent ClickHouse version the connector fails with error "error": "Not able to find table: pulsar_messages"

stack trace excerpt:

java.lang.Exception: Not able to find table: pulsar_messages
    at org.apache.pulsar.io.jdbc.JdbcUtils.getTableId(JdbcUtils.java:112)
    at org.apache.pulsar.io.jdbc.JdbcAbstractSink.open(JdbcAbstractSink.java:111)

line numbers relates to LTS pulsar (see https://github.com/apache/pulsar/blob/998a4b1677b73c24de1af23931c02badbd9b57a0/pulsar-io/jdbc/core/src/main/java/org/apache/pulsar/io/jdbc/JdbcAbstractSink.java#L111)

the connection actually opens the log contains before the error:

Opened jdbc connection

Environment

Pulsar version: LTS pulsar (4.0.9)

connector config:

tenant: "public"
namespace: "default"
name: "clickhouse-jdbc-sink"
inputs: 
  - "persistent://public/default/clickhouse-test"
sinkType: "jdbc-clickhouse"
configs:
    jdbcUrl: "jdbc:clickhouse://localhost:8123/default"
    userName: "********"
    password: "********"
    tableName: "pulsar_messages"
    useTransactions: "false"

Fix

Bump the clickhouse JDBC driver to the latest version. This issue was fixed in ClickHouse/clickhouse-java#2737

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions