Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* `pretty` (default): Human-readable format.
* `json-unicode`: [JSON]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %} output with binary strings [Unicode]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Юникод){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Unicode){% endif %}-encoded and each JSON string in a separate line.
* `json-unicode-array`: JSON output with binary strings Unicode-encoded and the result output as an array of JSON strings with each JSON string in a separate line.<li>`json-base64`: JSON output with binary strings [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}-encoded and each JSON string in a separate line.
* `json-base64-array`: JSON output with binary strings Base64-encoded and the result output as an array of JSON strings with each JSON string in a separate line;
* `parquet`: Output in [Apache Parquet](https://parquet.apache.org/docs/) format.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* `csv`: Output in [CSV](https://ru.wikipedia.org/wiki/CSV) format.
* `tsv`: Output in [TSV](https://ru.wikipedia.org/wiki/TSV) format.
30 changes: 21 additions & 9 deletions ydb/docs/en/core/reference/ydb-cli/scripting-yql.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,27 @@ ydb scripting yql --help

## Parameters of the subcommand {#options}

| Name | Description |
---|---
| `--timeout` | The time within which the operation should be completed on the server. |
| `--stats` | Statistics mode.<br>Acceptable values:<ul><li>`none`: Do not collect statistics.</li><li>`basic`: Collect statistics for basic events.</li><li>`full`: Collect statistics for all events.</li></ul>Defaults to `none`. |
| `-s`, `--script` | Text of the YQL query to be executed. |
| `-f`, `--file` | Path to the text of the YQL query to be executed. |
| `--explain` | Show the query execution plan. |
| `--show-response-metadata` | Show the response metadata. |
| `--format` | Input format.<br>Default value: `pretty`.<br>Acceptable values:<ul><li>`pretty`: A human-readable format.</li><li>`json-unicode`: [JSON]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %} output with binary strings [Unicode]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Юникод){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Unicode){% endif %}-encoded and each JSON string in a separate line.</li><li>`json-unicode-array`: JSON output with binary strings Unicode-encoded and the result output as an array of JSON strings with each JSON string in a separate line.</li><li>`json-base64`: JSON output with binary strings [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}-encoded and each JSON string in a separate line.</li><li>`json-base64-array`: JSON output with binary strings Base64-encoded and the result output as an array of JSON strings with each JSON string in a separate line.</li></ul> |
#|
|| **Name** | **Description** ||
|| `--timeout` | The time within which the operation should be completed on the server. ||
|| `--stats` | Statistics mode.
Acceptable values:
* `none`: Do not collect statistics.
* `basic`: Collect statistics for basic events.
* `full`: Collect statistics for all events.
Defaults to `none`. ||
|| `-s`, `--script` | Text of the YQL query to be executed. ||
|| `-f`, `--file` | Path to the text of the YQL query to be executed. ||
|| `--explain` | Show the query execution plan. ||
|| `--show-response-metadata` | Show the response metadata. ||
|| `--format` | Result format.
Default value: `pretty`.
Acceptable values:

{% include notitle [format](./_includes/result_format_common.md) %}

||
|#

### Working with parameterized queries {#parameterized-query}

Expand Down
40 changes: 29 additions & 11 deletions ydb/docs/en/core/reference/ydb-cli/table-query-execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,35 @@ View the description of the YQL query command:

## Parameters of the subcommand {#options}

| Name | Description |
---|---
| `--timeout` | The time within which the operation should be completed on the server. |
| `-t`, `--type` | Query type.<br>Acceptable values:<ul><li>`data`: A YQL query that includes [DML]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Data_Manipulation_Language){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Data_Manipulation_Language){% endif %} operations; it can be used both to update data in the database and fetch several selections limited to 1,000 rows per selection.</li><li>`scan`: A YQL query of the [scan](../../concepts/scan_query.md) type. It can only be used to read data from the database. It returns a single selection, but without a limit on the number of records in it. The algorithm of executing a `scan` query on the server is more sophisticated compared to a `data` query. Hence, if you don't need to return more than 1,000 rows, `data` queries are more effective.</li><li>`scheme`: A YQL query that includes [DDL]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Data_Definition_Language){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Data_Definition_Language){% endif %} operations.</li></ul>The default value is `data`. |
| `--stats` | Statistics mode.<br>Acceptable values:<ul><li>`none`: Do not collect statistics.</li><li>`basic`: Collect statistics for basic events.</li><li>`full`: Collect statistics for all events.</li></ul>Defaults to `none`. |
| `-s` | Enable statistics collection in the `basic` mode. |
| `--tx-mode` | [Transaction mode](../../concepts/transactions.md#modes) (for `data` queries).<br>Acceptable values:<ul><li>`serializable-rw`: The result of parallel transactions is equivalent to their serial execution.</li><li>`online-ro`: Each of the reads in the transaction reads data that is most recent at the time of its execution.</li><li>`stale-ro`: Data reads in a transaction return results with a possible delay (fractions of a second).</li></ul>Default value: `serializable-rw`. |
| `-q`, `--query` | Text of the YQL query to be executed. |
| `-f,` `--file` | Path to the text of the YQL query to be executed. |
| `--format` | Result format.<br>Possible values:<ul><li>`pretty` (default): Human-readable format.</li><li>`json-unicode`: [Newline-delimited JSON stream](https://en.wikipedia.org/wiki/JSON_streaming). For each selected row, a separate line is added in the output. Each such line is formatted as a single-line JSON. If your query includes multiple selections, their records are output one-by-one, without additional separators.</li><li>`json-unicode-array`: A single JSON document that includes an array of selected rows.</li><li>`json-base64`: This format is similar to `json-unicode`, but columns containing binary strings (with the `String` type) are [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64)-encoded{% endif %}.</li><li>`json-base64-array`: This format is similar to `json-unicode-array`, but columns with binary strings (with the `String` type) are [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64)-encoded{% endif %}.</li><li>`csv`: Output in [CSV](https://ru.wikipedia.org/wiki/CSV) format.</li><li>`tsv`: Output in [TSV](https://ru.wikipedia.org/wiki/TSV) format.</li></ul> |

#|
|| **Name** | **Description** ||
|| `--timeout` | The time within which the operation should be completed on the server. ||
|| `-t`, `--type` | Query type.
Acceptable values:
* `data`: A YQL query that includes [DML]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Data_Manipulation_Language){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Data_Manipulation_Language){% endif %} operations; it can be used both to update data in the database and fetch several selections limited to 1,000 rows per selection.
* `scan`: A YQL query of the [scan](../../concepts/scan_query.md) type. It can only be used to read data from the database. It returns a single selection, but without a limit on the number of records in it. The algorithm of executing a `scan` query on the server is more sophisticated compared to a `data` query. Hence, if you don't need to return more than 1,000 rows, `data` queries are more effective.
* `scheme`: A YQL query that includes [DDL]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Data_Definition_Language){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Data_Definition_Language){% endif %} operations.
The default value is `data`. ||
|| `--stats` | Statistics mode.
Acceptable values:
* `none`: Do not collect statistics.
* `basic`: Collect statistics for basic events.
* `full`: Collect statistics for all events.
Defaults to `none`. ||
|| `-s` | Enable statistics collection in the `basic` mode. ||
|| `--tx-mode` | [Transaction mode](../../concepts/transactions.md#modes) (for `data` queries).
Acceptable values:<li>`serializable-rw`: The result of parallel transactions is equivalent to their serial execution.<li>`online-ro`: Each of the reads in the transaction reads data that is most recent at the time of its execution.<li>`stale-ro`: Data reads in a transaction return results with a possible delay (fractions of a second).Default value: `serializable-rw`. ||
|| `-q`, `--query` | Text of the YQL query to be executed. ||
|| `-f,` `--file` | Path to the text of the YQL query to be executed. ||
|| `--format` | Result format.
Possible values:

{% include notitle [format](./_includes/result_format_common.md) %}

{% include notitle [format](./_includes/result_format_csv_tsv.md) %}

||
|#
### Working with parameterized queries {#parameterized-query}

{% include [parameterized-query](../../_includes/parameterized-query.md) %}
Expand Down
28 changes: 20 additions & 8 deletions ydb/docs/en/core/reference/ydb-cli/yql.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,26 @@ View the description of the YQL script command:

## Parameters of the subcommand {#options}

| Name | Description |
---|---
| `--timeout` | The time within which the operation should be completed on the server. |
| `--stats` | Statistics mode.<br>Acceptable values:<ul><li>`none` (default): Do not collect.</li><li>`basic`: Collect statistics for basic events.</li><li>`full`: Collect statistics for all events.</li></ul> |
| `-s`, `--script` | Text of the YQL query to be executed. |
| `-f`, `--file` | Path to the text of the YQL query to be executed. |
| `--format` | Result format.<br>Possible values:<ul><li>`pretty` (default): Human-readable format.</li><li>`json-unicode`: [JSON]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %} output with binary strings [Unicode]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Юникод){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Unicode){% endif %}-encoded and each JSON string in a separate line.</li><li>`json-unicode-array`: JSON output with binary strings Unicode-encoded and the result output as an array of JSON strings with each JSON string in a separate line.</li><li>`json-base64`: JSON output with binary strings [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}-encoded and each JSON string in a separate line.</li><li>`json-base64-array`: JSON output with binary strings Base64-encoded and the result output as an array of JSON strings with each JSON string in a separate line.</li><li>`csv`: Output in [CSV](https://ru.wikipedia.org/wiki/CSV) format.</li><li>`tsv`: Output in [TSV](https://ru.wikipedia.org/wiki/TSV) format.</li></ul> |

#|
|| **Name** | **Description** ||
|| `--timeout` | The time within which the operation should be completed on the server. ||
|| `--stats` | Statistics mode.
Acceptable values:
* `none` (default): Do not collect.
* `basic`: Collect statistics for basic events.
* `full`: Collect statistics for all events.
||
|| `-s`, `--script` | Text of the YQL query to be executed. ||
|| `-f`, `--file` | Path to the text of the YQL query to be executed. ||
|| `--format` | Result format.
Possible values:

{% include notitle [format](./_includes/result_format_common.md) %}

{% include notitle [format](./_includes/result_format_csv_tsv.md) %}

||
|#
### Working with parameterized queries {#parameterized-query}

{% include [parameterized-query](../../_includes/parameterized-query.md) %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* `pretty` (по умолчанию) — человекочитаемый формат;
* `json-unicode` — вывод в формате [JSON]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %}, бинарные строки закодированы в [Юникод]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Юникод){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Unicode){% endif %}, каждая строка JSON выводится в отдельной строке;
* `json-unicode-array` — вывод в формате JSON, бинарные строки закодированы в Юникод, результат выводится в виде массива строк JSON, каждая строка JSON выводится в отдельной строке;
* `json-base64` — вывод в формате JSON, бинарные строки закодированы в [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}, каждая строка JSON выводится в отдельной строке;
* `json-base64-array` — вывод в формате JSON, бинарные строки закодированы в Base64, результат выводится в виде массива строк JSON, каждая строка JSON выводится в отдельной строке;
* `parquet`: вывод в формате [Apache Parquet](https://parquet.apache.org/docs/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* `csv` — вывод в формате [CSV](https://ru.wikipedia.org/wiki/CSV);
* `tsv` — вывод в формате [TSV](https://ru.wikipedia.org/wiki/TSV).
31 changes: 21 additions & 10 deletions ydb/docs/ru/core/reference/ydb-cli/scripting-yql.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,27 @@ ydb scripting yql --help

## Параметры подкоманды {#options}

Имя | Описание
---|---
`--timeout` | Время, в течение которого должна быть выполнена операция на сервере.
`--stats` | Режим сбора статистики.<br>Возможные значения:<ul><li>`none` — не собирать;</li><li>`basic` — собирать по основным событиям;</li><li>`full` — собирать по всем событиям.</li></ul>Значение по умолчанию — `none`.
`-s`, `--script` | Текст YQL-скрипта для выполнения.
`-f`, `--file` | Путь к файлу с текстом YQL-скрипта для выполнения.
`--explain` | Показать план выполнения запроса.
`--show-response-metadata` | Показать метаданные ответа.
`--format` | Формат вывода.<br>Значение по умолчанию — `pretty`.<br>Возможные значения:<ul><li>`pretty` — человекочитаемый формат;</li><li>`json-unicode` — вывод в формате [JSON]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %}, бинарные строки закодированы в [Юникод]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Юникод){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Unicode){% endif %}, каждая строка JSON выводится в отдельной строке;</li><li>`json-unicode-array` — вывод в формате JSON, бинарные строки закодированы в Юникод, результат выводится в виде массива строк JSON, каждая строка JSON выводится в отдельной строке;</li><li>`json-base64` — вывод в формате JSON, бинарные строки закодированы в [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}, каждая строка JSON выводится в отдельной строке;</li><li>`json-base64-array` — вывод в формате JSON, бинарные строки закодированы в Base64, результат выводится в виде массива строк JSON, каждая строка JSON выводится в отдельной строке.</li></ul>

#|
|| **Имя** | **Описание** ||
||`--timeout` | Время, в течение которого должна быть выполнена операция на сервере.||
||`--stats` | Режим сбора статистики.
Возможные значения:
* `none` — не собирать;
* `basic` — собирать по основным событиям;
* `full` — собирать по всем событиям.
Значение по умолчанию — `none`.||
||`-s`, `--script` | Текст YQL-скрипта для выполнения.||
||`-f`, `--file` | Путь к файлу с текстом YQL-скрипта для выполнения.||
||`--explain` | Показать план выполнения запроса.||
||`--show-response-metadata` | Показать метаданные ответа.||
||`--format` | Формат вывода.
Значение по умолчанию — `pretty`.
Возможные значения:

{% include notitle [format](./_includes/result_format_common.md) %}

||
|#
### Работа с параметризованными запросами {#parameterized-query}

{% include [parameterized-query](../../_includes/parameterized-query.md) %}
Expand Down
Loading