Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions docs/integrations/data-ingestion/clickpipes/mysql/datatypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,31 @@
| --------------------------| -----------------------| -------------------------------------------------------------------------------------- |
| Enum | LowCardinality(String) ||
| Set | String ||
| Decimal | Decimal ||
| TinyInt | Int8 | Supports unsigned.|
| SmallInt | Int16 | Supports unsigned.|
| MediumInt, Int | Int32 | Supports unsigned.|
| BigInt | Int64 | Supports unsigned.|
| Decimal | Decimal | Synonyms: `Numeric`, `Dec`, `Fixed`.|

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Decimal | Decimal | Synonyms: `Numeric`, `Dec`, `Fixed`.|
| Decimal | Decimal(76,38) | Values exceeding 38 integer digits are ingested as zero |

| Bit | UInt64 ||
| TinyInt | Int8 | Supports unsigned. Compatibility alias: `Int1`.|
| SmallInt | Int16 | Supports unsigned. Compatibility alias: `Int2`.|
| MediumInt, Int | Int32 | Supports unsigned. Synonyms and compatibility aliases include `Integer`, `Int3`, `Int4`, `MiddleInt`.|
| BigInt | Int64 | Supports unsigned. Compatibility alias: `Int8`.|
Comment on lines +20 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we need to give so much detail as to CH type aliases, clutters docs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, as long as users can easily match one with the other, it's all we need

| Serial | UInt64 | Alias for `BigInt Unsigned Not Null AUTO_INCREMENT Unique`.|
| Year | Int16 ||
| TinyInt(1) | Bool | Synonyms: `Bool`, `Boolean`.|
| Float | Float32 | Precision on ClickHouse may differ from MySQL during initial load due to text protocol. Synonym: `Float4`. `Float(p)` maps to `Float32` for `p <= 24` and `Float64` for `p >= 25`.|
| Double | Float64 | Precision on ClickHouse may differ from MySQL during initial load due to text protocol. Synonyms: `Double Precision`, `Real`, `Float8`.|
| TinyText, Text, MediumText, LongText | String ||
| TinyBlob, Blob, MediumBlob, LongBlob | String ||
| Char, Varchar | String ||
| Char, Varchar | String | Synonyms: `Character`, `NChar`, `NVarchar`, `Character Varying`, `Char Varying`, `VarCharacter`, `NChar Varchar`, `NChar Varying`, `NChar VarCharacter`, and `National`-prefixed forms.|
| Long, Long Varchar | String | Compatibility aliases for `MediumText`. Additional MariaDB aliases: `Long Char Varying`, `Long Character Varying`, `Long VarCharacter`.|
| Binary, VarBinary | String ||
| TinyInt(1) | Bool ||
| Long VarBinary | String | Compatibility alias for `MediumBlob`.|
| 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. |
| Geometry & Geometry Types | String | WKT (Well-Known Text). WKT may suffer from small precision loss. |

Check notice on line 36 in docs/integrations/data-ingestion/clickpipes/mysql/datatypes.md

View workflow job for this annotation

GitHub Actions / vale

ClickHouse.Uppercase

Suggestion: Instead of uppercase for 'WKT', use lowercase or backticks (`) if possible. Otherwise, ask a Technical Writer to add this word or acronym to the rule's exception list.

Check notice on line 36 in docs/integrations/data-ingestion/clickpipes/mysql/datatypes.md

View workflow job for this annotation

GitHub Actions / vale

ClickHouse.Uppercase

Suggestion: Instead of uppercase for 'WKT', use lowercase or backticks (`) if possible. Otherwise, ask a Technical Writer to add this word or acronym to the rule's exception list.
| UUID | UUID | MariaDB only. Columns added during CDC are added as `String`. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention it's a byte value? Usually string implies a readable string

| INET4, INET6 | String | MariaDB only. |
| 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 protocol.|
| Double | Float64 | Precision on ClickHouse may differ from MySQL during initial load due to text protocol.|
| Char Byte, Raw | String | MariaDB/Oracle-mode aliases for binary types. |
| Clob, Varchar2, XMLType | String | MariaDB/Oracle-mode aliases for text types. |
| Number | Decimal | MariaDB/Oracle-mode alias for `Decimal`. |
| Date | Date32 | 00 day/month mapped to 01.|
| Time | DateTime64(6) | Time offset from unix epoch.|
| Datetime, Timestamp | DateTime64(6) | 00 day/month mapped to 01.|
Loading