ClickHouse/docs/ja/engines/table-engines/special/generate.md
Ivan Blinkov d91c97d15d
[docs] replace underscores with hyphens (#10606)
* Replace underscores with hyphens

* remove temporary code

* fix style check

* fix collapse
2020-04-30 21:19:18 +03:00

1.7 KiB

machine_translated machine_translated_rev toc_priority toc_title
true d734a8e46d 46 GenerateRandom

Generaterandom

のgeneraterandomテーブルエンジンの生産ランダムなデータが与えられたテーブルのスキーマ.

使用例:

  • 再現可能な大きいテーブルに住むテストの使用。
  • ファジングテストのランダム入力を生成します。

Clickhouseサーバーでの使用状況

ENGINE = GenerateRandom(random_seed, max_string_length, max_array_length)

その max_array_lengthmax_string_length すべ 生成されたデータに対応する配列の列と文字列。

テーブル生成エンジンは SELECT クエリ。

対応して データタイプ これは、以下を除いてテーブルに格納できます LowCardinalityAggregateFunction.

例えば:

1. セットアップ generate_engine_table テーブル:

CREATE TABLE generate_engine_table (name String, value UInt32) ENGINE = GenerateRandom(1, 5, 3)

2. データのクエリ:

SELECT * FROM generate_engine_table LIMIT 3
┌─name─┬──────value─┐
│ c4xJ │ 1412771199 │
│ r    │ 1791099446 │
│ 7#$  │  124312908 │
└──────┴────────────┘

実装の詳細

  • サポートなし:
    • ALTER
    • SELECT ... SAMPLE
    • INSERT
    • 指数
    • 複製

元の記事