tencent cloud

Stream Compute Service

Releases Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Billing Mode
Refund
Configuration Adjustments
Getting Started
Preparations
Creating a Private Cluster
Creating a SQL Job
Creating a JAR Job
Creating an ETL Job
Creating a Python Job
Operation Guide
Managing Jobs
Developing Jobs
Monitoring Jobs
Job Logs
Events and Diagnosis
Managing Metadata
Managing Checkpoints
Tuning Jobs
Managing Dependencies
Managing Clusters
Managing Permissions
SQL Developer Guide
Overview
Glossary and Data Types
DDL Statements
DML Statements
Merging MySQL CDC Sources
Connectors
SET Statement
Operators and Built-in Functions
Identifiers and Reserved Words
Python Developer Guide
ETL Developer Guide
Overview
Glossary
Connectors
FAQ
Contact Us

ClickHouse Sinks

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2023-11-08 16:20:02

Overview

A ClickHouse data sink can write data to ClickHouse.
Note
The engine of ClickHouse data sink tables must be CollapsingMergeTree.

Mapping of common data types

For the data types supported by ClickHouse, see ClickHouse Data ‍Types. The table below lists some of the common data types and their counterparts in Flink.
Flink
ClickHouse
VARCHAR
String/FixedString(N)
STRING
String/FixedString(N)
BOOLEAN
There isn't a dedicated ClickHouse type for boolean. You can use UInt8 to store boolean data, limiting the valid values to 0 and 1, or use the string type, limiting the valid values to true and false.
DECIMAL
Decimal32(S)/Decimal64(S)/Decimal128(S)
TINYINT
Int8
SMALLINT
Int16
INTEGER
Int32
BIGINT
Int64
FLOAT
Float32
DOUBLE
Float64
DATE
Date
TIMESTAMP
DateTime
TIMESTAMP WITH LOCAL TIME ZONE
DateTime. Example: DateTime64(3, 'Asia/Shanghai').

Notes

Primary key

‍To ensure that update and delete operations are synced as expected, make sure you define the primary key correctly using the CREATE TABLE statement.

Collapsed fields

The CollapsingMergeTree engine of ClickHouse adds the logic of rows collapsing to data parts merge algorithm. You can specify collapsed fields using ENGINE = CollapsingMergeTree(Sign) when creating a table. ‍To learn more, see the ClickHouse document.

WITH parameters

ClickHouse data sinks are developed based on the data warehouse ClickHouse. The two have identical WITH parameters. For details, see ClickHouse.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan