ClickHouse/docs/es/operations/table_engines/generate.md
Ivan Blinkov 2e1f6bc56d
[experimental] add "es" docs language as machine translated draft (#9787)
* replace exit with assert in test_single_page

* improve save_raw_single_page docs option

* More grammar fixes

* "Built from" link in new tab

* fix mistype

* Example of include in docs

* add anchor to meeting form

* Draft of translation helper

* WIP on translation helper

* Replace some fa docs content with machine translation

* add normalize-en-markdown.sh

* normalize some en markdown

* normalize some en markdown

* admonition support

* normalize

* normalize

* normalize

* support wide tables

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* lightly edited machine translation of introdpection.md

* lightly edited machhine translation of lazy.md

* WIP on translation utils

* Normalize ru docs

* Normalize other languages

* some fixes

* WIP on normalize/translate tools

* add requirements.txt

* [experimental] add es docs language as machine translated draft

* remove duplicate script

* Back to wider tab-stop (narrow renders not so well)
2020-03-21 07:11:51 +03:00

1.5 KiB

GenerateRandom

El motor de tabla GenerateRandom produce datos aleatorios para el esquema de tabla determinado.

Ejemplos de uso:

  • Se usa en la prueba para poblar una tabla grande reproducible.
  • Generar entrada aleatoria para pruebas de fuzzing.

Uso en el servidor ClickHouse

ENGINE = GenerateRandom(random_seed, max_string_length, max_array_length)

El max_array_length y max_string_length parámetros especifican la longitud máxima de todos columnas y cadenas de matriz correspondientemente en los datos generados.

Generar motor de tabla sólo admite SELECT consulta.

Es compatible con todos Tipos de datos que se pueden almacenar en una tabla excepto LowCardinality y AggregateFunction.

Ejemplo:

1. Configurar el generate_engine_table tabla:

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

2. Consultar los datos:

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

Detalles de la implementación

  • No soportado:
    • ALTER
    • SELECT ... SAMPLE
    • INSERT
    • Indice
    • Replicación

Artículo Original