-`broker_list` – A comma-separated list of brokers (`localhost:9092`).
-`topic_list` – A list of Kafka topics (`my_topic`).
-`group_name` – A group of Kafka consumers (`group1`). Reading margins are tracked for each group separately. If you don't want messages to be duplicated in the cluster, use the same group name everywhere.
-`--format` – Message format. Uses the same notation as the SQL ` FORMAT` function, such as ` JSONEachRow`.
-`format` – Message format. Uses the same notation as the SQL ` FORMAT` function, such as ` JSONEachRow`. For more information, see the section "Formats".
-`schema` – An optional parameter that must be used if the format requires a schema definition. For example, [Cap'n Proto](https://capnproto.org/) requires the path to the schema file and the name of the root ` schema.capnp:Message` object.
Example:
```sql
CREATETABLEqueue(
CREATETABLEqueue(
timestampUInt64,
levelString,
messageString
...
...
@@ -47,7 +47,7 @@ When the `MATERIALIZED VIEW` joins the engine, it starts collecting data in the
To improve performance, received messages are grouped into blocks the size of [max_block_size](../operations/settings/settings.md#settings-settings-max_insert_block_size). If the block wasn't formed within [ stream_flush_interval_ms](../operations/settings/settings.md#settings-settings_stream_flush_interval_ms) milliseconds, the data will be flushed to the table regardless of the completeness of the block.
...
...
@@ -71,9 +71,9 @@ To improve performance, received messages are grouped into blocks the size of [m
To stop receiving topic data or to change the conversion logic, detach the materialized view:
```
DETACH TABLE consumer;
ATTACH MATERIALIZED VIEW consumer;
DETACH TABLE consumer;
ATTACH MATERIALIZED VIEW consumer;
```
If you want to change the target table by using ` ALTER`materialized view, we recommend disabling the material view to avoid discrepancies between the target table and the data from the view.
If you want to change the target table by using `ALTER`materialized view, we recommend disabling the material view to avoid discrepancies between the target table and the data from the view.
-`group_name` - Группа потребителя Kafka (`group1`). Отступы для чтения отслеживаются для каждой группы отдельно. Если необходимо, чтобы сообщения не повторялись на кластере, используйте везде одно имя группы.
-`format` - Формат сообщений. Имеет те же обозначения, что выдает SQL-выражение `FORMAT`, например, `JSONEachRow`.
-`format` - Формат сообщений. Имеет те же обозначения, что выдает SQL-выражение `FORMAT`, например, `JSONEachRow`. Подробнее смотрите в разделе "Форматы".
-`schema` - Опциональный параметр, необходимый, если используется формат, требующий определения схемы. Например, [Cap'n Proto](https://capnproto.org/) требует путь к файлу со схемой и название корневого объекта `schema.capnp:Message`.
Для улучшения производительности полученные сообщения группируются в блоки размера [max_insert_block_size](../operations/settings/settings.md#settings-settings-max_insert_block_size). Если блок не удалось сформировать за [stream_flush_interval_ms](../operations/settings/settings.md#settings-settings_stream_flush_interval_ms) миллисекунд, то данные будут сброшены в таблицу независимо от полноты блока.
...
...
@@ -70,8 +71,8 @@ SELECT level, sum(total) FROM daily GROUP BY level;
Чтобы остановить получение данных топика или изменить логику преобразования, отсоедините материализованное представление:
```
DETACH TABLE consumer;
ATTACH MATERIALIZED VIEW consumer;
DETACH TABLE consumer;
ATTACH MATERIALIZED VIEW consumer;
```
Если необходимо изменить целевую таблицу с помощью `ALTER`, то материализованное представление рекомендуется отключить, чтобы избежать несостыковки между целевой таблицей и данными от представления.