无法将kafka与Clickhouse集成

时间:2019-07-15 13:00:30

标签: apache-kafka clickhouse

我想将我的主题数据加载到Clickhouse中,因为我正在关注https://clickhouse.yandex/docs/en/operations/table_engines/kafka/

我正在按以下顺序运行以下所有命令,尽管创建了表但未从我的主题获取任何数据。

`CREATE TABLE COMBINED_DATA_CSV
 (
    ORDERID UInt8,
    SALENPRODUCT2_PERSONID UInt8,
    LASTNAME String,
    FIRSTNAME String,
    ADDRESS String,
    CITY String,
    SALES_DESTRUCTURED_PID UInt8,
    PNAME String,
    PRICE UInt16,
   QUANTITY UInt16
) ENGINE = Kafka()
SETTINGS
    kafka_broker_list = 'localhost:9092',
    kafka_topic_list = 'COMBINED_DATA_CSV',
    kafka_group_name = 'personproductsales',
    kafka_format = 'CSV',
    kafka_row_delimiter = ',',
    kafka_num_consumers = 1,
    kafka_skip_broken_messages = 0`


`CREATE TABLE COMBINED_DATA1_CSV (
    ORDERID UInt8,
    SALENPRODUCT2_PERSONID UInt8,
    LASTNAME String,
    FIRSTNAME String,
    ADDRESS String,
    CITY String,
    SALES_DESTRUCTURED_PID UInt8,
    PNAME String,
    PRICE UInt16,
    QUANTITY UInt16,
    sign Int8 DEFAULT 1
    ) ENGINE = CollapsingMergeTree(sign) ORDER BY ORDERID;`


`CREATE MATERIALIZED VIEW DATA1 TO COMBINED_DATA1_CSV AS SELECT * from     COMBINED_DATA_CSV;`

0 个答案:

没有答案