@@ -41,14 +41,15 @@ ENGINE = AzureQueue('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;
4141SETTINGS mode = ' unordered'
4242```
4343
44+
4445## Settings {#settings}
4546
4647サポートされている設定項目は、ほとんどが ` S3Queue ` テーブルエンジンと同じですが、` s3queue_ ` プレフィックスは付きません。[ 設定の全リスト] ( ../../../engines/table-engines/integrations/s3queue.md#settings ) を参照してください。
4748テーブルに対して構成されている設定の一覧を取得するには、` system.azure_queue_settings ` テーブルを使用します。` 24.10 ` 以降で利用可能です。
4849
4950以下は、AzureQueue にのみ対応し、S3Queue には適用されない設定です。
5051
51- ### ` after_processing_move_connection_string ` {#after &# 95 ; processing &# 95 ; move &# 95 ; connection &# 95 ; string }
52+ ### ` after_processing_move_connection_string ` {#after_processing_move_connection_string }
5253
5354宛先が別の Azure コンテナーである場合に、正常に処理されたファイルを移動するための Azure Blob Storage 接続文字列。
5455
@@ -58,7 +59,7 @@ SETTINGS mode = 'unordered'
5859
5960デフォルト値: 空文字列。
6061
61- ### ` after_processing_move_container ` {#after &# 95 ; processing &# 95 ; move &# 95 ; container }
62+ ### ` after_processing_move_container ` {#after_processing_move_container }
6263
6364移動先が別の Azure コンテナである場合に、正常に処理されたファイルを移動する移動先コンテナ名。
6465
@@ -84,6 +85,13 @@ SETTINGS
8485 after_processing_move_container = ' dst-container' ;
8586```
8687
88+
89+ ## AzureQueue テーブルエンジンからの SELECT {#select}
90+
91+ AzureQueue テーブルに対する SELECT クエリは、既定では禁止されています。これは、データを一度読み取ったらキューから削除するという一般的なキューの利用パターンに従うためです。誤ってデータを失わないようにする目的で、SELECT は禁止されています。
92+ ただし、状況によってはこれが必要になる場合もあります。その場合は、SETTING ` stream_like_engine_allow_direct_select ` を ` True ` に設定する必要があります。
93+ AzureQueue エンジンには、SELECT クエリ用の特別な SETTING ` commit_on_select ` があります。これを ` False ` に設定すると、読み取り後もキュー内のデータを保持し、` True ` に設定すると削除します。
94+
8795## 説明 {#description}
8896
8997` SELECT ` は、各ファイルを 1 回しかインポートできないため(デバッグ用途を除き)ストリーミングインポートにはあまり有用ではありません。代わりに、[ マテリアライズドビュー] ( ../../../sql-reference/statements/create/view.md ) を使用してリアルタイム処理フローを作成する方が実用的です。これを行うには、次のようにします。
@@ -111,6 +119,7 @@ CREATE MATERIALIZED VIEW consumer TO stats
111119SELECT * FROM stats ORDER BY key;
112120```
113121
122+
114123## 仮想カラム {#virtual-columns}
115124
116125* ` _path ` — ファイルパス。
@@ -134,32 +143,32 @@ SELECT * FROM stats ORDER BY key;
134143 </azure_queue_log >
135144```
136145
137- この永続テーブルは、` system.s3queue ` と同様の情報を保持しますが、対象は処理済みおよび失敗したファイルです 。
146+ この永続テーブルは、` system.s3queue ` と同じ情報を保持しますが、処理済みおよび失敗したファイルに関するものです 。
138147
139148このテーブルの構造は次のとおりです。
140149
141150``` sql
142151
143152CREATE TABLE system .azure_queue_log
144153(
145- ` hostname` LowCardinality(String) COMMENT ' ホスト名 ' ,
146- ` event_date` Date COMMENT ' このログ行の書き込みイベント日付 ' ,
147- ` event_time` DateTime COMMENT ' このログ行の書き込みイベント時刻 ' ,
148- ` database` String COMMENT ' 現在のS3Queueテーブルが存在するデータベース名。 ' ,
149- ` table` String COMMENT ' S3Queueテーブル名。 ' ,
150- ` uuid` String COMMENT ' S3QueueテーブルのUUID ' ,
151- ` file_name` String COMMENT ' 処理対象ファイルのファイル名 ' ,
152- ` rows_processed` UInt64 COMMENT ' 処理された行数 ' ,
153- ` status` Enum8(' Processed' = 0 , ' Failed' = 1 ) COMMENT ' ファイル処理のステータス ' ,
154- ` processing_start_time` Nullable(DateTime) COMMENT ' ファイル処理の開始時刻 ' ,
155- ` processing_end_time` Nullable(DateTime) COMMENT ' ファイル処理の終了時刻 ' ,
156- ` exception` String COMMENT ' 例外が発生した場合の例外メッセージ '
154+ ` hostname` LowCardinality(String) COMMENT ' Hostname ' ,
155+ ` event_date` Date COMMENT ' Event date of writing this log row ' ,
156+ ` event_time` DateTime COMMENT ' Event time of writing this log row ' ,
157+ ` database` String COMMENT ' The name of a database where current S3Queue table lives. ' ,
158+ ` table` String COMMENT ' The name of S3Queue table. ' ,
159+ ` uuid` String COMMENT ' The UUID of S3Queue table ' ,
160+ ` file_name` String COMMENT ' File name of the processing file ' ,
161+ ` rows_processed` UInt64 COMMENT ' Number of processed rows ' ,
162+ ` status` Enum8(' Processed' = 0 , ' Failed' = 1 ) COMMENT ' Status of the processing file ' ,
163+ ` processing_start_time` Nullable(DateTime) COMMENT ' Time of the start of processing the file ' ,
164+ ` processing_end_time` Nullable(DateTime) COMMENT ' Time of the end of processing the file ' ,
165+ ` exception` String COMMENT ' Exception message if happened '
157166)
158167ENGINE = MergeTree
159168PARTITION BY toYYYYMM(event_date)
160169ORDER BY (event_date, event_time)
161170SETTINGS index_granularity = 8192
162- COMMENT ' S3Queueエンジンによって処理されるファイルの情報を含むログエントリを格納する。 '
171+ COMMENT ' Contains logging entries with the information files processes by S3Queue engine. '
163172
164173```
165174
@@ -171,7 +180,7 @@ FROM system.azure_queue_log
171180LIMIT 1
172181FORMAT Vertical
173182
174- 行 1 :
183+ Row 1 :
175184──────
176185hostname: clickhouse
177186event_date: 2024 - 12 - 16
@@ -186,6 +195,6 @@ processing_start_time: 2024-12-16 13:42:47
186195processing_end_time: 2024 - 12 - 16 13 :42 :47
187196exception:
188197
189- 1 行が結果セットに含まれています。経過時間 : 0 .002 秒。
198+ 1 row in set . Elapsed : 0 .002 sec.
190199
191200```
0 commit comments