Skip to content

MySQL pipe: data type mapping #3641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 14, 2025
31 changes: 31 additions & 0 deletions docs/integrations/data-ingestion/clickpipes/mysql/datatypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: 'ClickPipes for MySQL: Supported data types'
slug: /integrations/clickpipes/mysql/datatypes
description: 'Page describing MySQL ClickPipe datatype mapping from MySQL to ClickHouse'
---

Here is the supported data-type mapping for the MySQL ClickPipe:

| MySQL Type | ClickHouse type | Notes |
| -------------------------------------------------------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------- |
| Enum | LowCardinality(String) | |
| Set | String | |
| Decimal | Decimal | |
| TinyInt | Int8 | Supports unsigned. |
| SmallInt | Int16 | Supports unsigned. |
| MediumInt, Int | Int32 | Supports unsigned. |
| BigInt | Int64 | Supports unsigned. |
| Year | Int16 | |
| TinyText, Text, MediumText, LongText | String | |
| TinyBlob, Blob, MediumBlob, LongBlob | String | |
| Char, Varchar | String | |
| Binary, VarBinary | String | |
| TinyInt(1) | Bool | |
| JSON | String | MySQL only; MariaDB `json` is just an alias for `text` with a constraint. |
| Geometry & Geometry Types | String | WKT (Well-Known Text). WKT may suffer from small precision loss. |
| Vector | Array(Float32) | MySQL only; MariaDB is adding support soon. |
| Float | Float32 | Precision on ClickHouse may differ from MySQL during initial load due to text protocols. |
| Double | Float64 | Precision on ClickHouse may differ from MySQL during initial load due to text protocols. |
| Date | Date32 | |
| Time | DateTime64(6) | The date portion is Unix epoch. |
| Datetime, Timestamp | DateTime64(6) | |
13 changes: 13 additions & 0 deletions scripts/aspell-dict-file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,19 @@ autovacuum
VACUUM
resync
Resync
--docs/integrations/data-ingestion/clickpipes/mysql/datatypes.md--
BigInt
LongBlob
LongText
MediumBlob
MediumInt
MediumText
SmallInt
TinyBlob
TinyInt
TinyText
VarBinary
Varchar
--docs/cloud/security/cmek.md--
Poller
--docs/integrations/data-ingestion/dbms/postgresql/postgres-vs-clickhouse.md--
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ const sidebars = {
"integrations/data-ingestion/clickpipes/mysql/source/aurora",
],
},
"integrations/data-ingestion/clickpipes/mysql/datatypes"
],
},
],
Expand Down