From 38ed92c8f40869c9b4ba66a5192cb6ee490c423a Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:53:29 +0200 Subject: [PATCH] Update Avro format docs --- docs/en/interfaces/formats.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index 94d480d8308..5fd2b82375f 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -1878,13 +1878,13 @@ The table below shows supported data types and how they match ClickHouse [data t | `string (uuid)` \** | [UUID](/docs/en/sql-reference/data-types/uuid.md) | `string (uuid)` \** | | `fixed(16)` | [Int128/UInt128](/docs/en/sql-reference/data-types/int-uint.md) | `fixed(16)` | | `fixed(32)` | [Int256/UInt256](/docs/en/sql-reference/data-types/int-uint.md) | `fixed(32)` | +| `record` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `record` | + \* `bytes` is default, controlled by [output_format_avro_string_column_pattern](/docs/en/operations/settings/settings-formats.md/#output_format_avro_string_column_pattern) \** [Avro logical types](https://avro.apache.org/docs/current/spec.html#Logical+Types) -Unsupported Avro data types: `record` (non-root), `map` - Unsupported Avro logical data types: `time-millis`, `time-micros`, `duration` ### Inserting Data {#inserting-data-1} @@ -1923,7 +1923,26 @@ Output Avro file compression and sync interval can be configured with [output_fo Using the ClickHouse [DESCRIBE](/docs/en/sql-reference/statements/describe-table) function, you can quickly view the inferred format of an Avro file like the following example. This example includes the URL of a publicly accessible Avro file in the ClickHouse S3 public bucket: -``` DESCRIBE url('https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits.avro','Avro'); +``` +DESCRIBE url('https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits.avro','Avro); +``` +``` +┌─name───────────────────────┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐ +│ WatchID │ Int64 │ │ │ │ │ │ +│ JavaEnable │ Int32 │ │ │ │ │ │ +│ Title │ String │ │ │ │ │ │ +│ GoodEvent │ Int32 │ │ │ │ │ │ +│ EventTime │ Int32 │ │ │ │ │ │ +│ EventDate │ Date32 │ │ │ │ │ │ +│ CounterID │ Int32 │ │ │ │ │ │ +│ ClientIP │ Int32 │ │ │ │ │ │ +│ ClientIP6 │ FixedString(16) │ │ │ │ │ │ +│ RegionID │ Int32 │ │ │ │ │ │ +... +│ IslandID │ FixedString(16) │ │ │ │ │ │ +│ RequestNum │ Int32 │ │ │ │ │ │ +│ RequestTry │ Int32 │ │ │ │ │ │ +└────────────────────────────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` ## AvroConfluent {#data-format-avro-confluent}