summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralextarazanov <[email protected]>2022-11-05 09:48:18 +0300
committeralextarazanov <[email protected]>2022-11-05 09:48:18 +0300
commit260d9404b680a1cac1625991802b1f2a8c82edc4 (patch)
treee2ca44b5516f6bc7c03412a4109980bf952bce28
parentb18765b23396d50f028c837c3c0abd38d9e3ff26 (diff)
[review] [YDB] Check "Added ydb table ttl docs" translate
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/_includes/commands.md4
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/table-ttl-drop.md30
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/table-ttl-set.md42
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/toc_i.yaml4
4 files changed, 78 insertions, 2 deletions
diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md
index d198a4bb0ed..394f2a627ad 100644
--- a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md
+++ b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md
@@ -60,8 +60,8 @@ Any command can be run from the command line with the `--help` option to get hel
| [table query execute](../table-query-execute.md) | Executing a YQL query |
| [table query explain](../commands/explain-plan.md) | YQL query execution plan |
| [table readtable](../commands/readtable.md) | Streaming table reads |
-| table ttl drop | Deleting TTL parameters |
-| table ttl set | Setting TTL parameters |
+| [table ttl set](../table-ttl-set.md) | Setting TTL parameters |
+| [table ttl drop](../table-ttl-drop.md) | Deleting TTL parameters |
| tools copy | Copying tables |
| [tools dump](../export_import/tools_dump.md) | Dumping a directory or table to the file system |
| [tools rename](../commands/tools/rename.md) | Renaming tables |
diff --git a/ydb/docs/en/core/reference/ydb-cli/table-ttl-drop.md b/ydb/docs/en/core/reference/ydb-cli/table-ttl-drop.md
new file mode 100644
index 00000000000..67bbadc2e58
--- /dev/null
+++ b/ydb/docs/en/core/reference/ydb-cli/table-ttl-drop.md
@@ -0,0 +1,30 @@
+# Deleting TTL parameters
+
+Use the `table ttl drop` subcommand to delete [TTL](../../concepts/ttl.md) for the specified table.
+
+General format of the command:
+
+```bash
+{{ ydb-cli }} [global options...] table ttl drop [options...] <table path>
+```
+
+* `global options`: [Global parameters](commands/global-options.md).
+* `options`: [Parameters of the subcommand](#options).
+* `table path`: The table path.
+
+View a description of the TTL delete command:
+
+```bash
+{{ ydb-cli }} table ttl drop --help
+```
+
+## Examples {examples}
+
+{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %}
+
+Delete TTL for the `series` table:
+
+```bash
+{{ ydb-cli }} -p db1 table ttl drop \
+ series
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/reference/ydb-cli/table-ttl-set.md b/ydb/docs/en/core/reference/ydb-cli/table-ttl-set.md
new file mode 100644
index 00000000000..c2c10ac0494
--- /dev/null
+++ b/ydb/docs/en/core/reference/ydb-cli/table-ttl-set.md
@@ -0,0 +1,42 @@
+# Setting TTL parameters
+
+Use the `table ttl set` subcommand to set [TTL](../../concepts/ttl.md) for the specified table.
+
+General format of the command:
+
+```bash
+{{ ydb-cli }} [global options...] table ttl set [options...] <table path>
+```
+
+* `global options`: [Global parameters](commands/global-options.md).
+* `options`: [Parameters of the subcommand](#options).
+* `table path`: The table path.
+
+View a description of the TTL set command:
+
+```bash
+{{ ydb-cli }} table ttl set --help
+```
+
+## Parameters of the subcommand {#options}
+
+| Name | Description |
+---|---
+| `--column` | The name of the column that will be used to calculate the lifetime of the rows. The column must have the [numeric](../../yql/reference/types/primitive.md#numeric) or [date and time](../../yql/reference/types/primitive.md#datetime) type.<br>In case of the numeric type, the value will be interpreted as the time elapsed since the beginning of the [Unix epoch](https://ru.wikipedia.org/wiki/Unix-время). Measurement units must be specified in the `--unit` parameter. |
+| `--expire-after` | Additional time before deleting that must elapse after the lifetime of the row has expired. Specified in seconds.<br>The default value is `0`. |
+| `--unit` | The value measurement units of the column specified in the `--column` parameter. It is mandatory if the column has the [numeric](../../yql/reference/types/primitive.md#numeric) type.<br>Possible values:<ul><li>`seconds (s, sec)`: Seconds.</li><li>`milliseconds (ms, msec)`: Milliseconds.</li><li>`microseconds (us, usec)`: Microseconds.</li><li>`nanoseconds (ns, nsec)`: Nanoseconds.</li></ul> |
+| `--run-interval` | The interval for running the operation to delete rows with expired TTL. Specified in seconds. The default database settings do not allow an interval of less than 15 minutes (900 seconds).<br>The default value is `3600`. |
+
+## Examples {examples}
+
+{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %}
+
+Set TTL fro the `series` table
+
+```bash
+{{ ydb-cli }} -p db1 table ttl set \
+ --column createtime \
+ --expire-after 3600 \
+ --run-interval 1200 \
+ series
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml
index 10dd3732aec..a861a4257e9 100644
--- a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml
+++ b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml
@@ -21,6 +21,10 @@ items:
href: commands/secondary_index.md
- name: Renaming tables
href: commands/tools/rename.md
+ - name: Setting TTL parameters
+ href: table-ttl-set.md
+ - name: Deleting TTL parameters
+ href: table-ttl-drop.md
- name: Operations with data
items:
- name: Getting a query execution plan and AST