diff options
author | bazeltsev <bazeltsev@yandex-team.ru> | 2022-03-17 23:38:01 +0300 |
---|---|---|
committer | bazeltsev <bazeltsev@yandex-team.ru> | 2022-03-17 23:38:01 +0300 |
commit | f8e5087242fcd0e2f3099f62437ed81b88d859f1 (patch) | |
tree | 362b7b6461a97b5cceb04d57970930373f9866ba | |
parent | 5aad93a91cd9d7069fadbb156ba48d7c31f10113 (diff) | |
download | ydb-f8e5087242fcd0e2f3099f62437ed81b88d859f1.tar.gz |
Updated core/en 20220311
updated
ref:101b0ee111dd3c686e0ea1436b730d710f6d1170
428 files changed, 1535 insertions, 3232 deletions
diff --git a/ydb/docs/en/core/best_practices/_includes/batch_upload.md b/ydb/docs/en/core/best_practices/_includes/batch_upload.md index 2455c5a33a..43fb693392 100644 --- a/ydb/docs/en/core/best_practices/_includes/batch_upload.md +++ b/ydb/docs/en/core/best_practices/_includes/batch_upload.md @@ -6,19 +6,19 @@ There are anti-patterns and non-optimal settings for uploading data. They don't To accelerate data uploads, consider the following recommendations: * Shard a table when creating it. This lets you effectively use the system bandwidth as soon as you start uploading data. -By default, a new table consists of a single shard. {{ ydb-short-name }} supports automatic table sharding by data volume. This means that a table shard is divided into two shards when it reaches a certain size. -The acceptable size for splitting a table shard is 2 GB. As the number of shards grows, the data upload bandwidth increases, but it remains low for some time at first. -Therefore, when uploading a large amount of data for the first time, we recommend initially creating a table with the desired number of shards. You can calculate the number of shards based on 1 GB of data per shard in a resulting set. + By default, a new table consists of a single shard. {{ ydb-short-name }} supports automatic table sharding by data volume. This means that a table shard is divided into two shards when it reaches a certain size. + The acceptable size for splitting a table shard is 2 GB. As the number of shards grows, the data upload bandwidth increases, but it remains low for some time at first. + Therefore, when uploading a large amount of data for the first time, we recommend initially creating a table with the desired number of shards. You can calculate the number of shards based on 1 GB of data per shard in a resulting set. * Insert multiple rows in each transaction to reduce the overhead of the transactions themselves. -Each transaction in {{ ydb-short-name }} has some overhead. To reduce the total overhead, you should make transactions that insert multiple rows. Good performance indicators terminate a transaction when it reaches 1 MB of data or 100,000 rows. -When uploading data, avoid transactions that insert a single row. + Each transaction in {{ ydb-short-name }} has some overhead. To reduce the total overhead, you should make transactions that insert multiple rows. Good performance indicators terminate a transaction when it reaches 1 MB of data or 100,000 rows. + When uploading data, avoid transactions that insert a single row. * Within each transaction, insert rows from the primary key-sorted set to minimize the number of shards that the transaction affects. -In {{ ydb-short-name }}, transactions that span multiple shards have higher overhead compared to transactions that involve exactly one shard. Moreover, this overhead increases with the growing number of table shards involved in the transaction. -We recommend selecting rows to be inserted in a particular transaction so that they're located in a small number of shards, ideally, in one. + In {{ ydb-short-name }}, transactions that span multiple shards have higher overhead compared to transactions that involve exactly one shard. Moreover, this overhead increases with the growing number of table shards involved in the transaction. + We recommend selecting rows to be inserted in a particular transaction so that they're located in a small number of shards, ideally, in one. * If you need to push data to multiple tables, we recommend pushing data to a single table within a single query. * If you need to push data to a table with a synchronous secondary index, we recommend that you first push data to a table and, when done, build a secondary index. * You should avoid writing data sequentially in ascending or descending order of the primary key. -Writing data to a table with a monotonically increasing key causes all new data to be written to the end of the table, since all tables in YDB are sorted by ascending primary key. As YDB splits table data into shards based on key ranges, inserts are always processed by the same server that is responsible for the "last" shard. Concentrating the load on a single server results in slow data uploading and inefficient use of a distributed system. + Writing data to a table with a monotonically increasing key causes all new data to be written to the end of the table, since all tables in YDB are sorted by ascending primary key. As YDB splits table data into shards based on key ranges, inserts are always processed by the same server that is responsible for the "last" shard. Concentrating the load on a single server results in slow data uploading and inefficient use of a distributed system. * Some use cases require writing the initial data (often large amounts) to a table before enabling OLTP workloads. In this case, transactionality at the level of individual queries is not required and you can use ```BulkUpsert``` calls in the API and SDK. Since no transactionality is used, this approach has much lower overhead as compared to YQL queries. In case of a successful response to the query, the ```BulkUpsert``` method guarantees that all data added within this query is committed. {% note warning %} @@ -34,4 +34,3 @@ We recommend the following algorithm for efficiently uploading data to {{ ydb-sh 3. Partition the resulting data set by the number of shards in the table. Each part will contain a set of consecutive rows. 4. Upload the resulting parts to the table shards concurrently. 5. Make a ```COMMIT``` after every 100,000 rows or 1 MB of data. - diff --git a/ydb/docs/en/core/best_practices/_includes/paging.md b/ydb/docs/en/core/best_practices/_includes/paging.md index 130ae7dba6..73497a2aca 100644 --- a/ydb/docs/en/core/best_practices/_includes/paging.md +++ b/ydb/docs/en/core/best_practices/_includes/paging.md @@ -59,7 +59,6 @@ In {{ ydb-short-name }}, all columns, including key ones, may have a NULL value. ## Examples of paginated output implementation {% if oss %} - * [C++](https://github.com/ydb-platform/ydb/tree/main/ydb/public/sdk/cpp/examples/pagination) {% endif %} * [Java](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/src/main/java/com/yandex/ydb/examples/pagination) diff --git a/ydb/docs/en/core/best_practices/_includes/schema_design.md b/ydb/docs/en/core/best_practices/_includes/schema_design.md index 45379bb56b..b0f2e6662c 100644 --- a/ydb/docs/en/core/best_practices/_includes/schema_design.md +++ b/ydb/docs/en/core/best_practices/_includes/schema_design.md @@ -47,4 +47,3 @@ In {{ ydb-short-name }}, all columns, including key ones, may contain a NULL val ## Row size limit {#limit-string} To achieve high performance, we don't recommend writing rows larger than 8 MB and key columns larger than 2 KB to the DB. - diff --git a/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md b/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md index 89c016ee95..cb928162b2 100644 --- a/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md +++ b/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md @@ -127,4 +127,3 @@ SELECT series_id, FROM series view views_index WHERE views == 0; ``` - diff --git a/ydb/docs/en/core/best_practices/_includes/table_sharding.md b/ydb/docs/en/core/best_practices/_includes/table_sharding.md index 2c53361206..458248f7ca 100644 --- a/ydb/docs/en/core/best_practices/_includes/table_sharding.md +++ b/ydb/docs/en/core/best_practices/_includes/table_sharding.md @@ -2,15 +2,13 @@ {{ ydb-short-name }} tables are sorted by primary key in ascending order. Tables are partitioned by splitting the range of key values into consecutive non-overlapping ranges called partitions. -Thanks to partitioning, table data can be distributed across multiple storage devices and the load from operations on a table can use more processor cores and network bandwidth. However, too many partitions in a table may add overhead on RAM and CPU time usage. So optimal partitioning directly affects the efficiency of query execution. To achieve optimal partitioning, {{ ydb-short-name }} provides tools for the initial partitioning of a table when creating it and methods for subsequent automatic partitioning. +Thanks to partitioning, table data can be distributed across multiple storage devices and the load from operations on a table can use more processor cores and network bandwidth. However, too many partitions in a table may add overhead on RAM and CPU time usage. So optimal partitioning directly affects the efficiency of query execution. To achieve optimal partitioning, {{ ydb-short-name }} provides tools for the initial partitioning of a table when creating it as well as methods for subsequent automatic partitioning. When creating a table, you can set the initial partitioning in one of two ways: - * Set up even partitioning by the first column of the primary key if this column is UInt32 or UInt64. In this case, you need to explicitly specify the number of partitions. * Set the exact partitioning keys that determine the number and boundaries of the original partitions. {{ ydb-short-name }} supports two methods for automatic table partitioning: - * By data size. * By load on a datashard (a system component that serves a table partition). @@ -19,4 +17,3 @@ Automatic partitioning modes can be enabled separately or together. Both modes c Automatic partitioning by size is parameterized by the value of the partition size setting. When that value is reach, the partition is split. The default value is 2 GB. A key for splitting is selected based on the histogram of data size distribution across partitions by key sub-ranges. If the total data size in adjacent partitions becomes less than half of the setting size, these partitions are merged. Automatic partitioning by load is triggered based on CPU usage by the datashard serving the partition. All datashards monitor their CPU usage. If a high (>50%) level of usage is detected at some point in time, the partition is split. A key is selected using statistics on accessing the keys of a datashard's own partition. - diff --git a/ydb/docs/en/core/best_practices/_includes/timeouts.md b/ydb/docs/en/core/best_practices/_includes/timeouts.md index 5d260a3a6d..7e997b5de1 100644 --- a/ydb/docs/en/core/best_practices/_includes/timeouts.md +++ b/ydb/docs/en/core/best_practices/_includes/timeouts.md @@ -1,9 +1,18 @@ --- -title: Using timeouts in YDB +title: Using timeouts in Yandex Database (YDB) description: 'The operation_timeout value determines the time during which the query result is interesting to the user. If the operation has not been performed during this time, the server returns an error with the Timeout code and tries to terminate the execution of the request, but the cancellation of the request is not guaranteed. It is always recommended to set both the operation timeout and the transport timeout.' --- + This section describes available timeouts and provides examples of their usage in various programming languages. +## Prerequisites for using timeouts + +The timeout mechanism in YDB is designed to: +1) Make sure the query execution time doesn't exceed a certain interval after which its result is not interesting for further use. +2) Detect network connectivity issues. + +Both of these use cases are important for ensuring the fault tolerance of the entire system. Let's take a closer look at timeouts. + ## Operation timeout The ``operation_timeout`` value shows the time during which the query result is interesting to the user. If the operation fails during this time, the server returns an error with the ``Timeout`` code and tries to terminate the query, but its cancellation is not guaranteed. So the query that the user was returned the ``Timeout`` error for can be both successfully executed on the server and canceled. @@ -14,7 +23,7 @@ The ``cancel_after`` value shows the time after which the server will start canc ## Transport timeout -The client can set a transport timeout for each query. This value lets you determine the amount of time that the client is ready to wait for a response from the server. If the server doesn't respond during this time, the client will get a transport error with the ``DeadlineExceeded`` code. +The client can set a transport timeout for each query. This value lets you determine the amount of time that the client is ready to wait for a response from the server. If the server doesn't respond during this time, the client will get a transport error with the ``DeadlineExceeded`` code. Be sure to set such a client timeout value that won't trigger transport timeouts under the normal operation of the application and network. ## Using timeouts @@ -28,7 +37,7 @@ Timeout usage example: ```python from kikimr.public.sdk.python import client as ydb - + def execute_in_tx(session, query): settings = ydb.BaseRequestSettings() settings = settings.with_timeout(0.5) # transport timeout @@ -49,10 +58,10 @@ Timeout usage example: #include <ydb/public/sdk/cpp/client/ydb.h> #include <ydb/public/sdk/cpp/client/ydb_table.h> #include <ydb/public/sdk/cpp/client/ydb_value.h> - + using namespace NYdb; using namespace NYdb::NTable; - + TAsyncStatus ExecuteInTx(TSession& session, TString query, TParams params) { return session.ExecuteDataQuery( query @@ -74,7 +83,7 @@ Timeout usage example: "a.yandex-team.ru/kikimr/public/sdk/go/ydb" "a.yandex-team.ru/kikimr/public/sdk/go/ydb/table" ) - + func executeInTx(ctx context.Context, s *table.Session, query string) { newCtx, close := context.WithTimeout(ctx, time.Millisecond*300) // client and by default operation timeout newCtx2 := ydb.WithOperationTimeout(newCtx, time.Millisecond*400) // operation timeout override @@ -86,4 +95,3 @@ Timeout usage example: ``` {% endlist %} - diff --git a/ydb/docs/en/core/best_practices/index.md b/ydb/docs/en/core/best_practices/index.md index 91ae3a01bb..a4077dc318 100644 --- a/ydb/docs/en/core/best_practices/index.md +++ b/ydb/docs/en/core/best_practices/index.md @@ -1,2 +1 @@ This section provides recommendations on how to use {{ ydb-short-name }} features. - diff --git a/ydb/docs/en/core/concepts/_assets/BS_overview.svg b/ydb/docs/en/core/concepts/_assets/BS_overview.svg deleted file mode 100644 index eb08e1cb2e..0000000000 --- a/ydb/docs/en/core/concepts/_assets/BS_overview.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="771px" height="814px" viewBox="-0.5 -0.5 771 814" content="<mxfile host="drawio.yandex-team.ru" modified="2021-07-15T14:50:26.556Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" etag="ZU8BhaNDal54XeL1MvRJ" version="12.7.0" type="device"><diagram id="0HZmCEQLlPINtnbGPtoa" name="Page-1">7Zxdl6I4EIZ/jZc9BxK+vBx1puecOd3HGXd3Zq72RIjCNoobsdX99RuUIKTo9psgTt80KTTIW4+VqiTSwt3J6pGRmf8UeTRsIc1btXCvhZCOnDb/l1jWW4utWVvDmAVe+qKdYRD8R1OjlloXgUfnhRfGURTGwaxodKPplLpxwUYYi5bFl42isHjVGRlTYBi4JITWH4EX+1urg+yd/QsNxr64sm6lNzwh4sXpncx94kXLnAl/auEui6J4ezRZdWmYiCd02b7v8xtnsw/G6DQ+5A3+n/Tx6fnpBaOnUdd9oN/+cXsPzraXVxIu0hsef+93k35ZtFrzzr5+66cfP14LTVi0mHo06VZr4c7SD2I6mBE3ObvkFHCbH09C3tL54SgIw24URmzzXjxyXOq63D6PWfRCc2eGjmmYSYdjRryA31T+XZs/fg7edKrDK2UxXeVMqQiPNJrQmPFb0dKzRuqPtUA0bS937s1sfs61VmojKVHjrOed6Pwg1f0IH7SBD3okJgOfMO8d6fXjpR+NULn0njW0TKty6ZGmWnoRZe5Qe0e59jrQ/kvwSi8qu2dSxzPKZHfQEFvVy44t5bKj+wv5WaCpTczX8d0EHln8GkR9A4q/npJJ4LaQFfKrd4aMH42To2ee0fKX6sAp/O7jovJFhafRlEruSE0kDMZT3nS5ppTbO4mWAU85P6YnJoHnJZcpdXXxm3gB/zhF95SMC0aJc9DVnGMe7RzUXOfI44dy71j3N3pkY3Z9Rg9YtjV19JDFr8HoAeu1BuatQHfl9YK42BEDA27uwIDbuFYDA4LVXOMHBhPVbWBAsLjrDLoNC02y7OqHBASruUFM4vusJ2T3HDpwXC80wXKv8aHJcmoXmmBd130aNCw0ybLXIDTBgm1PaGpwNS27R31osoF3Ei90EnVZ078b6isKWEYDzec+mSWH7oKF6w4j7guN94tf9BSLkm9clPDevhDJul0U88GGYpaS7FxNTFgW/0GnhN9ho7MdHZsFR2Doh3aVEUVc/waZNnTtQ1FMW7T3UK2L5OLycsKyNqO6wQMltmtGNUzhb4Vqy7Alqh9sdCDXyLka1zAbF2lhU5m2dNkRJVQ7lVINc/NOGA0HccSSXWmyJ3iPwWye6JWhHkYL7/hUkFBnVFqdWq5Dh1eapSnb+VAaRHT9anqXZ9s/CPPoFMh92xMAsvyG8mwbw2y7serLtY569Q2YyJyn+RUYNZVvjjIQUKnfC+Yv6qXCklQl9V7FUsEMQrlK8teuBkDBIb4eQFnt2gEFR2flKskRyjKUqwRH0b9qAZQcoSxTuVRwRkq5SnKEUg+UcFPtgJIjlHqgzBvIoWzlC30mzKF6g1a22KpaLylM2SWTABXrBTcPKFdJDlM1oKpkz3Z9qJJjVQ2oOiA9p1PvY/ITyVY2ZeeRuZ9NhuYk4sqw9c9Ezg9t0fy1aZqi2Vulam9b63yrT1nAbyuZBHx/Ni8mbEzjd25LLNlRr/CzTeiYnPBmie7CxmhI4mT3Zv5TlDkjvUI/CjZz/4IKeUHZkPw5jxbMpem7di4FHUn8OPIc2FYY0M8Gjeyuz6AFlik3QEtNIMDyHn0xi3AsBKCjiiE4oAD7DcEbvjO1C0EAOqoYggP2RPyG4A3fWeIrdC4EoKNqIbAOWG7NQeCGZD4P3Dddr9lF3xun+J6ugvin6Jsf5zDirV1PSWO9j5etH95RQD80IRFreDUhUBpB2nIecWo+Iuep1wbwuOx1H4A6dooEYq19Awxqt8mgvDfN0E6E0DS5p4pdiZ/uVsXhcXnxPg6NIoX6OQzuuPuVI7KcwTmXKYYfcmP+HIR7C+G9qApZbg3VpoTL4zL3fZgis8gpOilZKw+W7XdBTRoHJ337A2j7Nqk0JZyQfSKWllh+FHtwHOmzXJvL44qJfVxaAMyqAugZkdG+TQYNLG/GNU8NjoYjd2VcLz6un7tjtP57+X3of6SDl+6/X/v9B7huU+edR2DauYS8N2eipRGt0o1Hpdqj+9FeftKNevHh0lJjxZcfWKBe/AMmUU5Yp7pkdKh0f1SpRiUP+7noqt5ZapmSWlVukSpV64BqtGqN5JinHilYC9UIqey5trVh6oAUvWqR5FCunqmSR7TWhylsV8cUb+6eWLxNz3fPfcaf/gc=</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f8cecc-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#f8cecc"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-fff2cc-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#fff2cc"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-d5e8d4-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#d5e8d4"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient></defs><g><rect x="0" y="90" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 120px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">gRPC proxy/KQP</div></div></div></foreignObject><text x="60" y="124" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">gRPC proxy/KQP</text></switch></g><rect x="0" y="170" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 200px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DataShard</div></div></div></foreignObject><text x="60" y="204" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DataShard</text></switch></g><rect x="0" y="250" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 280px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DataShard</div></div></div></foreignObject><text x="60" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DataShard</text></switch></g><rect x="0" y="330" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 360px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Hive</div></div></div></foreignObject><text x="60" y="364" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Hive</text></switch></g><rect x="160" y="90" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 120px; margin-left: 161px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">gRPC proxy/KQP</div></div></div></foreignObject><text x="220" y="124" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">gRPC proxy/KQP</text></switch></g><rect x="160" y="170" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 200px; margin-left: 161px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DataShard</div></div></div></foreignObject><text x="220" y="204" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DataShard</text></switch></g><rect x="40" y="50" width="40" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 60px; margin-left: 41px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Dynamic<br />Node 1</div></div></div></foreignObject><text x="60" y="64" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Dynami...</text></switch></g><rect x="200" y="50" width="40" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 60px; margin-left: 201px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Dynamic<br />Node 2</div></div></div></foreignObject><text x="220" y="64" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Dynami...</text></switch></g><rect x="320" y="90" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 120px; margin-left: 321px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">gRPC proxy/KQP</div></div></div></foreignObject><text x="380" y="124" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">gRPC proxy/KQP</text></switch></g><rect x="320" y="170" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 200px; margin-left: 321px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DataShard</div></div></div></foreignObject><text x="380" y="204" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DataShard</text></switch></g><rect x="320" y="250" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 280px; margin-left: 321px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Hive</div></div></div></foreignObject><text x="380" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Hive</text></switch></g><rect x="353" y="50" width="40" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 60px; margin-left: 354px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Dynamic<br />Node 3</div></div></div></foreignObject><text x="373" y="64" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Dynami...</text></switch></g><rect x="480" y="90" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 120px; margin-left: 481px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">gRPC proxy/KQP</div></div></div></foreignObject><text x="540" y="124" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">gRPC proxy/KQP</text></switch></g><rect x="480" y="170" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 200px; margin-left: 481px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">BSC</div></div></div></foreignObject><text x="540" y="204" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BSC</text></switch></g><rect x="480" y="50" width="120" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 60px; margin-left: 481px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Static<br />Node 1</div></div></div></foreignObject><text x="540" y="64" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Static...</text></switch></g><rect x="640" y="90" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 120px; margin-left: 641px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">gRPC proxy/KQP</div></div></div></foreignObject><text x="700" y="124" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">gRPC proxy/KQP</text></switch></g><rect x="640" y="170" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 200px; margin-left: 641px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">CMS</div></div></div></foreignObject><text x="700" y="204" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">CMS</text></switch></g><rect x="640" y="50" width="120" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 60px; margin-left: 641px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Static<br />Node 2</div></div></div></foreignObject><text x="700" y="64" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Static...</text></switch></g><rect x="640" y="250" width="120" height="60" rx="9" ry="9" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 280px; margin-left: 641px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">NodeBroker</div></div></div></foreignObject><text x="700" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">NodeBroker</text></switch></g><path d="M 150 -100 L 145 -100 Q 140 -100 140 -90 L 140 30 Q 140 40 135 40 L 132.5 40 Q 130 40 135 40 L 137.5 40 Q 140 40 140 50 L 140 170 Q 140 180 145 180 L 150 180" fill="none" stroke="#000000" stroke-miterlimit="10" transform="rotate(90,140,40)" pointer-events="all"/><rect x="95" y="0" width="90" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 10px; margin-left: 96px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Tenant 1</div></div></div></foreignObject><text x="140" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Tenant 1</text></switch></g><path d="M 390.5 -22.5 L 385.5 -22.5 Q 380.5 -22.5 380.5 -12.5 L 380.5 30 Q 380.5 40 375.5 40 L 373 40 Q 370.5 40 375.5 40 L 378 40 Q 380.5 40 380.5 50 L 380.5 92.5 Q 380.5 102.5 385.5 102.5 L 390.5 102.5" fill="none" stroke="#000000" stroke-miterlimit="10" transform="rotate(90,380.5,40)" pointer-events="all"/><rect x="335" y="0" width="90" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 10px; margin-left: 336px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Tenant 2</div></div></div></foreignObject><text x="380" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Tenant 2</text></switch></g><path d="M 627.5 -102.5 L 622.5 -102.5 Q 617.5 -102.5 617.5 -92.5 L 617.5 30 Q 617.5 40 612.5 40 L 610 40 Q 607.5 40 612.5 40 L 615 40 Q 617.5 40 617.5 50 L 617.5 172.5 Q 617.5 182.5 622.5 182.5 L 627.5 182.5" fill="none" stroke="#000000" stroke-miterlimit="10" transform="rotate(90,617.5,40)" pointer-events="all"/><rect x="577.5" y="0" width="80" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 10px; margin-left: 579px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Static</div></div></div></foreignObject><text x="618" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Static</text></switch></g><path d="M 552.5 357.5 C 494.5 357.5 480 385 526.4 390.5 C 480 402.6 532.2 429 569.9 418 C 596 440 683 440 712 418 C 770 418 770 396 733.75 385 C 770 363 712 341 661.25 352 C 625 335.5 567 335.5 552.5 357.5 Z" fill="#dae8fc" stroke="#6c8ebf" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 288px; height: 1px; padding-top: 385px; margin-left: 481px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">BlobStorage</div></div></div></foreignObject><text x="625" y="389" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobStorage</text></switch></g><rect x="480" y="450" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 480px; margin-left: 481px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">NodeWarden</div></div></div></foreignObject><text x="540" y="484" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">NodeWarden</text></switch></g><rect x="640" y="450" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 480px; margin-left: 641px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">NodeWarden</div></div></div></foreignObject><text x="700" y="484" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">NodeWarden</text></switch></g><rect x="480" y="530" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="490" y="540" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 570px; margin-left: 491px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk</div></div></div></foreignObject><text x="550" y="574" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk</text></switch></g><rect x="640" y="530" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="650" y="540" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 570px; margin-left: 651px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk</div></div></div></foreignObject><text x="710" y="574" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk</text></switch></g><rect x="480" y="610" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="490" y="620" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 650px; margin-left: 491px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">VDisk</div></div></div></foreignObject><text x="550" y="654" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">VDisk</text></switch></g><rect x="640" y="610" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="650" y="620" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 650px; margin-left: 651px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">VDisk</div></div></div></foreignObject><text x="710" y="654" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">VDisk</text></switch></g><rect x="480" y="690" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="490" y="700" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 730px; margin-left: 491px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DS proxy</div></div></div></foreignObject><text x="550" y="734" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DS proxy</text></switch></g><rect x="640" y="690" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="650" y="700" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 730px; margin-left: 651px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DS proxy</div></div></div></foreignObject><text x="710" y="734" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DS proxy</text></switch></g><path d="M 140 810 L 140 48" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 300 812 L 300 50" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 460 812 L 460 50" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 617 812 L 617 50" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 120 360 L 493.94 373.77" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 499.18 373.96 L 492.06 377.2 L 493.94 373.77 L 492.32 370.2 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 120 280 L 513.79 362.68" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 518.93 363.76 L 511.36 365.75 L 513.79 362.68 L 512.79 358.9 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 542.87 235.69 L 593.13 335.31" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 540.5 231 L 546.78 235.67 L 542.87 235.69 L 540.53 238.82 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 595.5 340 L 589.22 335.33 L 593.13 335.31 L 595.47 332.18 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 440 304 L 546.75 354.77" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 551.49 357.02 L 543.67 357.17 L 546.75 354.77 L 546.67 350.85 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 700 310 L 665.57 347.32" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 662.01 351.18 L 664.18 343.66 L 665.57 347.32 L 669.33 348.41 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="0" y="450" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 480px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">NodeWarden</div></div></div></foreignObject><text x="60" y="484" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">NodeWarden</text></switch></g><rect x="160" y="450" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 480px; margin-left: 161px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">NodeWarden</div></div></div></foreignObject><text x="220" y="484" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">NodeWarden</text></switch></g><rect x="320" y="450" width="120" height="60" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 480px; margin-left: 321px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">NodeWarden</div></div></div></foreignObject><text x="380" y="484" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">NodeWarden</text></switch></g><rect x="0" y="530" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="10" y="540" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 570px; margin-left: 11px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DS proxy</div></div></div></foreignObject><text x="70" y="574" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DS proxy</text></switch></g><rect x="160" y="530" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="170" y="540" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 570px; margin-left: 171px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DS proxy</div></div></div></foreignObject><text x="230" y="574" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DS proxy</text></switch></g><rect x="320" y="530" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="330" y="540" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 570px; margin-left: 331px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DS proxy</div></div></div></foreignObject><text x="390" y="574" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DS proxy</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/ydb/docs/en/core/concepts/_assets/Slide3_group_layout.svg b/ydb/docs/en/core/concepts/_assets/Slide3_group_layout.svg deleted file mode 100644 index 3d6bf588a8..0000000000 --- a/ydb/docs/en/core/concepts/_assets/Slide3_group_layout.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="731px" height="468px" viewBox="-0.5 -0.5 731 468" content="<mxfile host="drawio.yandex-team.ru" modified="2021-07-15T15:31:24.461Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" etag="c6UdJlCHfOx2ZCPmeLO2" version="12.7.0" type="device"><diagram id="5oa2Jgz5xl6jGbGaUmvA" name="Page-1">5V1dc6JIFP01Pu4W0Hz5GGOSqZrZbKqcqszuy1YLjbKDtIvtROfXL0ijQpOEZLzeJpqH2Bdo4Zzb3fcciBmQ68XmLqPL+R88ZMnAMsLNgIwHlmUZrpX/KiLbMmKaQ7uMzLI4lLFDYBL/ZDJoyOg6DtmqtqPgPBHxsh4MeJqyQNRiNMv4U323iCf1T13SGVMCk4AmavQxDsW8jPqWd4h/YvFsXn2y6Q7LLQta7SyvZDWnIX86CpGbAbnOOBflu8XmmiUFehUu5XG3z2zdn1jGUtHlgG+bz2L995rc2/b9n9Gnydf/JuQ32csPmqzlBT+M49X3PGQOyJVpGNXJi22FSMbXaciKTo0BGT3NY8EmSxoUW5/yJMhjc7FI8lbewyiKk+SaJzzbHUsip/jJ4yuR8e/saIu7exVH8FQcxctXHp9lNIxZbVu0e+XbVCiq62KZYJujkITmjvEFE9k236XaWtEkE9WXzacD6VYFxvyIcFvGqMyz2b7nAxX5G8nGG5ixFGZOykRImR8FrUwEPptG50fcVhG3zwk4AQbcYX5otwHuW1OyS31owF29ALdhAY8i5gatGR56w6lhwAO+nzA0AdyBBjyyngHcnbrOGTJ8D50mgLvAgPsBawd86ju2c44M9/UC3HutnDEvpJwhrmbljA87FJiZr69eGxND1yP0DHNPE3HsoTCEBdw16NBsBdwae+5udW2k/h5sYCJszVbdSslCMWEYPt3hrTBhGI6HyoRmy7Gpqt2TMmFOqcmsdibcm6tbRCY0W6dNYHWbZ77BonYmzPHoGo8JRzPVa6qytyqZrMt2gPb1EVrNZAIrZP08oL1FgTYcgDWyfi4QPuTQKlk7HwgfclUnnxhy3ZwgfMiBBbB+XhA+5KoEbpQ2l+oG4Zc21bp/OX4Q+nCwgNVvfxwhfCrA5W9fLCF8KoBv+/bHE8KnAlju9scUwqdClcFV6UQu2xUiFnrpBKyX9XOF2u5ennc4AOtl/VwhfMih9bJ2rhA+5MC3jPVzhdAhJ8AyWD9XCB/y5x95JpftCuGXNgRYF+vnCuEPB2D92x9XCJ8KcP3bF1cInwrg28D9cYXwqQCWu/1xhdCp8NQJqiqd7Mt2hfYTGFrp5EE/uKKdK2S33MQ873CANuK0c4XwIQd/cEU3VwgfcnAjTjdXCB9yaCNOO1cIHfLqfJ4vbS7VFcIvbXzgB1f0c4Xwh4MFC3l/XCF8KoANuv64QvhUABt0/XGF8KkAlrv9cYXwqVBl8D0P2cBqKZnyaxR13GkSz9L8fZAjwnK4RgUScUCTK7lhEYdhcfgoY6v4J53uuioIXfI4FbuLcUYDZ1z0tRZ8VX6DlHmihbmOtadC7bRAbYFBrcpfCbWa/T2H2hxiY63qXok1+WhYExMba1XwSqztj4a1Tc6H9T+Pj3eLh2QxSefOreV9vbv68rnTXziycMYmsskzMeczntLk5hAd1dfWwz5fOF9K7P5lQmzlF/oVsDbW23z1lBtN6yWkV3ydBeylCyr3K875RT4yllAR/2C13tvglYc+FMlx4NFtCAO/QZCg2YwJeVCDo/1Z/AJtCmvjSQFYxjfbX6x8Gkwow+kEg8BtlPKOOgj29v7xKHChRkEHUcXS8Kr4Asm8lfKUvTN9X03LV+aBKnbi7CXN9C2HmZK+r3bUnKeAh0EHBXbEW5DQ1SoO+k2d03w44p3MNftpCgJg5jrcRngrczlh2fZbMcv97lTNv+Skt2uMN7XWVraeZbyE4IVCpfoTFU1Tw2xy2jk3nPb5+Uy50eF+h/65UT2oomluKGtp19zwm6lx5sKnwyPS+idH5VdpmhzvLgewk6PDraEPVcedqhhALuO6fP/Xh+bt3St1kzilI2jmLk05nWwdVYZcsyNo5t6mnT4ecyfTvEpH72Yubx7+AUS5++H/aJCb/wE=</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f5f5f5-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#f5f5f5"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-dae8fc-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#dae8fc"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-d5e8d4-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#d5e8d4"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffe6cc-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#ffe6cc"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-fff2cc-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#fff2cc"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f8cecc-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#f8cecc"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-e1d5e7-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#e1d5e7"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-60a917-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#60a917"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-008a00-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#008a00"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-1ba1e2-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#1ba1e2"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-0050ef-1-ffffff-1-s-0"><stop offset="0%" style="stop-color:#0050ef"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient></defs><g><rect x="90" y="67" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 87px; margin-left: 91px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 1:1000</div></div></div></foreignObject><text x="190" y="91" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 1:1000</text></switch></g><rect x="90" y="27" width="40" height="40" fill="url(#mx-gradient-dae8fc-1-ffffff-1-s-0)" stroke="#6c8ebf" pointer-events="all"/><rect x="130" y="27" width="40" height="40" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><rect x="170" y="27" width="40" height="40" fill="url(#mx-gradient-ffe6cc-1-ffffff-1-s-0)" stroke="#d79b00" pointer-events="all"/><rect x="210" y="27" width="40" height="40" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><rect x="250" y="27" width="40" height="40" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><rect x="330" y="67" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 87px; margin-left: 331px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 1:1001</div></div></div></foreignObject><text x="430" y="91" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 1:1001</text></switch></g><rect x="330" y="27" width="40" height="40" fill="url(#mx-gradient-e1d5e7-1-ffffff-1-s-0)" stroke="#9673a6" pointer-events="all"/><rect x="370" y="27" width="40" height="40" fill="url(#mx-gradient-60a917-1-ffffff-1-s-0)" stroke="#2d7600" pointer-events="all"/><rect x="410" y="27" width="40" height="40" fill="url(#mx-gradient-008a00-1-ffffff-1-s-0)" stroke="#005700" pointer-events="all"/><rect x="450" y="27" width="40" height="40" fill="url(#mx-gradient-1ba1e2-1-ffffff-1-s-0)" stroke="#006eaf" pointer-events="all"/><rect x="490" y="27" width="40" height="40" fill="url(#mx-gradient-0050ef-1-ffffff-1-s-0)" stroke="#001dbc" pointer-events="all"/><rect x="90" y="187" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 207px; margin-left: 91px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 2:1000</div></div></div></foreignObject><text x="190" y="211" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 2:1000</text></switch></g><rect x="90" y="147" width="40" height="40" fill="url(#mx-gradient-dae8fc-1-ffffff-1-s-0)" stroke="#6c8ebf" pointer-events="all"/><rect x="130" y="147" width="40" height="40" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><rect x="170" y="147" width="40" height="40" fill="url(#mx-gradient-ffe6cc-1-ffffff-1-s-0)" stroke="#d79b00" pointer-events="all"/><rect x="210" y="147" width="40" height="40" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><rect x="250" y="147" width="40" height="40" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><rect x="330" y="187" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 207px; margin-left: 331px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 2:1001</div></div></div></foreignObject><text x="430" y="211" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 2:1001</text></switch></g><rect x="330" y="147" width="40" height="40" fill="url(#mx-gradient-e1d5e7-1-ffffff-1-s-0)" stroke="#9673a6" pointer-events="all"/><rect x="370" y="147" width="40" height="40" fill="url(#mx-gradient-60a917-1-ffffff-1-s-0)" stroke="#2d7600" pointer-events="all"/><rect x="410" y="147" width="40" height="40" fill="url(#mx-gradient-008a00-1-ffffff-1-s-0)" stroke="#005700" pointer-events="all"/><rect x="450" y="147" width="40" height="40" fill="url(#mx-gradient-1ba1e2-1-ffffff-1-s-0)" stroke="#006eaf" pointer-events="all"/><rect x="490" y="147" width="40" height="40" fill="url(#mx-gradient-0050ef-1-ffffff-1-s-0)" stroke="#001dbc" pointer-events="all"/><rect x="90" y="307" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 327px; margin-left: 91px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 3:1000</div></div></div></foreignObject><text x="190" y="331" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 3:1000</text></switch></g><rect x="90" y="267" width="40" height="40" fill="url(#mx-gradient-dae8fc-1-ffffff-1-s-0)" stroke="#6c8ebf" pointer-events="all"/><rect x="130" y="267" width="40" height="40" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><rect x="170" y="267" width="40" height="40" fill="url(#mx-gradient-ffe6cc-1-ffffff-1-s-0)" stroke="#d79b00" pointer-events="all"/><rect x="210" y="267" width="40" height="40" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><rect x="250" y="267" width="40" height="40" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><rect x="330" y="307" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 327px; margin-left: 331px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 3:1001</div></div></div></foreignObject><text x="430" y="331" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 3:1001</text></switch></g><rect x="330" y="267" width="40" height="40" fill="url(#mx-gradient-e1d5e7-1-ffffff-1-s-0)" stroke="#9673a6" pointer-events="all"/><rect x="370" y="267" width="40" height="40" fill="url(#mx-gradient-60a917-1-ffffff-1-s-0)" stroke="#2d7600" pointer-events="all"/><rect x="410" y="267" width="40" height="40" fill="url(#mx-gradient-008a00-1-ffffff-1-s-0)" stroke="#005700" pointer-events="all"/><rect x="450" y="267" width="40" height="40" fill="url(#mx-gradient-1ba1e2-1-ffffff-1-s-0)" stroke="#006eaf" pointer-events="all"/><rect x="490" y="267" width="40" height="40" fill="url(#mx-gradient-0050ef-1-ffffff-1-s-0)" stroke="#001dbc" pointer-events="all"/><rect x="90" y="427" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 447px; margin-left: 91px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 4:1000</div></div></div></foreignObject><text x="190" y="451" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 4:1000</text></switch></g><rect x="90" y="387" width="40" height="40" fill="url(#mx-gradient-dae8fc-1-ffffff-1-s-0)" stroke="#6c8ebf" pointer-events="all"/><rect x="130" y="387" width="40" height="40" fill="url(#mx-gradient-d5e8d4-1-ffffff-1-s-0)" stroke="#82b366" pointer-events="all"/><rect x="170" y="387" width="40" height="40" fill="url(#mx-gradient-ffe6cc-1-ffffff-1-s-0)" stroke="#d79b00" pointer-events="all"/><rect x="210" y="387" width="40" height="40" fill="url(#mx-gradient-fff2cc-1-ffffff-1-s-0)" stroke="#d6b656" pointer-events="all"/><rect x="250" y="387" width="40" height="40" fill="url(#mx-gradient-f8cecc-1-ffffff-1-s-0)" stroke="#b85450" pointer-events="all"/><rect x="330" y="427" width="200" height="40" fill="url(#mx-gradient-f5f5f5-1-ffffff-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 447px; margin-left: 331px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PDisk 4:1001</div></div></div></foreignObject><text x="430" y="451" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk 4:1001</text></switch></g><rect x="330" y="387" width="40" height="40" fill="url(#mx-gradient-e1d5e7-1-ffffff-1-s-0)" stroke="#9673a6" pointer-events="all"/><rect x="370" y="387" width="40" height="40" fill="url(#mx-gradient-60a917-1-ffffff-1-s-0)" stroke="#2d7600" pointer-events="all"/><rect x="410" y="387" width="40" height="40" fill="url(#mx-gradient-008a00-1-ffffff-1-s-0)" stroke="#005700" pointer-events="all"/><rect x="450" y="387" width="40" height="40" fill="url(#mx-gradient-1ba1e2-1-ffffff-1-s-0)" stroke="#006eaf" pointer-events="all"/><rect x="490" y="387" width="40" height="40" fill="url(#mx-gradient-0050ef-1-ffffff-1-s-0)" stroke="#001dbc" pointer-events="all"/><rect x="0" y="57" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 67px; margin-left: 25px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Node 1</div></div></div></foreignObject><text x="25" y="71" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Node 1</text></switch></g><rect x="0" y="177" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 187px; margin-left: 25px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Node 2</div></div></div></foreignObject><text x="25" y="191" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Node 2</text></switch></g><rect x="0" y="297" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 307px; margin-left: 25px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Node 3</div></div></div></foreignObject><text x="25" y="311" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Node 3</text></switch></g><rect x="0" y="417" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 427px; margin-left: 25px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Node 4</div></div></div></foreignObject><text x="25" y="431" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Node 4</text></switch></g><path d="M 610 67 L 576.37 67" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 571.12 67 L 578.12 63.5 L 576.37 67 L 578.12 70.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="610" y="37" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 67px; margin-left: 611px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">DS proxy</div></div></div></foreignObject><text x="670" y="71" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DS proxy</text></switch></g><path d="M 570 367 L 570 7" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 7 L 510 20.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 25.88 L 506.5 18.88 L 510 20.63 L 513.5 18.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 510 127 L 510 140.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 145.88 L 506.5 138.88 L 510 140.63 L 513.5 138.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 510 247 L 510 260.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 265.88 L 506.5 258.88 L 510 260.63 L 513.5 258.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 510 367 L 510 380.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 385.88 L 506.5 378.88 L 510 380.63 L 513.5 378.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 510 7 L 570 7" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 127 L 570 127" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 247 L 570 247" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 510 367 L 570 367" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/ydb/docs/en/core/concepts/_assets/Slide_blob.svg b/ydb/docs/en/core/concepts/_assets/Slide_blob.svg deleted file mode 100644 index 502ed357b3..0000000000 --- a/ydb/docs/en/core/concepts/_assets/Slide_blob.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="691px" height="551px" viewBox="-0.5 -0.5 691 551" content="<mxfile host="drawio.yandex-team.ru" modified="2021-07-15T16:05:40.464Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" etag="HF0g-8VF_2eGPBkH-fRg" version="12.7.0" type="device"><diagram id="LqqcKPgxwdzCRuipa-4Q" name="Page-1">3ZtRc5s4EMc/DTO9h3SQBBg/GidNc3PXyYw7vV7fFKMYWox8shzb/fQnjADDUocktpH74qBFYPhp/9LuKrbIeL65FXQR/c1DlljYDjcWubYwxraH1Z/Mss0tCA2d3DITcahtlWES/2TaaGvrKg7ZstZRcp7IeFE3Tnmasqms2agQfF3v9siT+rcu6IwBw2RKE2j9Jw5llFt9PKjsH1k8i4pvRt4wPzOnRWf9JsuIhny9ZyI3FhkLzmV+NN+MWZLRK7jk1334xdnywQRLZZcLxt6Hb1+Cu/8E+7ZBn/5EH++/Ply5bn6bJ5qs9Bvrp5XbAoHgqzRk2V1siwTrKJZssqDT7OxajbqyRXKeqBZSh488lXoUka/aNIlnqWok7FE9ZQAfWr/HExOSbfZM+iVuGZ8zKbaqiz5LNE/tUaTwlHU1PG7BPNobGmJrI9UuMStvXVFTBxrcSyAOnofIQuVWusmFjPiMpzS5qaxBHXPV5y/OFxrudyblVtOlK8kPo1eIxfZrdr/3btH8V99+17je1Fpb3frlGC35SkzZARCFQKmYMdnB6zIoB4dcsITK+Kmuxbbx05fe81g9c+kq2K77Cm66QP6k+qqGF5SP8XrHQMAvPtOHhMm78G0iO4KKkFdH40MV+S0ick6lIYcYoaHzawZ31Awankkz/us0MxKCbve6LbIOy+7fgwaN5avRH9nuof7qIH+CowoYA6ccR1QFGknv+i2VaIp+OwQSv6V+SUf94jOtecQ7j37B95DD+iUN/Tb6n0a/cFG5ZSkTii9Pe5cwwYZJGMCaSLboHZNjm4UJTnRjzn/ErH9QvlmgPAAqSPjDburuG5VrWPQLE8h7KkxIEzzDwgwfgAKIlhFdZIfTlUi2gaDTH9m6/ByrCmzekvkaQa6vhgfjgxfIs1G4uEIOhNlWuCid9eg0h60KbXE79Yqyzquo60wVECaUIQMRT2ky0ifmcRjmMR1bxj+ztFc7rQ4s1H3dwHKvs3upMG6pCxdHYo0ayYLbUiRqQY1PRbooUu2h9pyLx4z8OmYPUiZnpQwLLv7FQ8YD+znIbbPG6SDDpJjAWfjSKBPHMFeGqctvQNnBhlGGOQ++/GnZtQ2jDMPbbF6232Hvj8uHPXgW9nkjDRgiX75He6atgTBy/pxv7UwkF3TG7tJHDqi/KHlr8pdZBfQoc3DdX8sq1B5L1ArTPxVNbMb+aVU7rlWO3+Oyknz8zR+N1JjqMSYN7xg0Bv3EO6YY5knljktRB+yzbtSg05JWIrtFOyerh2CY8VS8kHG8hr3zgslLxQvOOj3zKktG/fGCaUjF65NpvNz+9Qh3B3RgoLEZHBg0IwOna2SAThYZEDN2ld+wwA87LvDEOfYC/zY/hgGubd1gyx9aI2fGUgt7dJ75XZLlEaj/lRlMnb1PBQTWFm4VlUW2MFflpj73C4lxyMxIBF4vd9I1nieeUXInMOxGh/SO+/desPbbvXsv3PAuBO86BPcfjTcFbwAyuMxcmOC7/ssz8c0SPMwbM1HXFG+awPtfnmBp1ewVvX9kbss/bCgYo91nYO8+0e4z2H26lmLh52dHuk+T6lmL180fVRxjlJpVkZY8a9gySOTlg6Sa1Q+M8hpd9TstcvM/</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="0" y="250" width="520" height="300" fill="#ffffff" stroke="#000000" pointer-events="all"/><path d="M 170 60 L 170 155 L 260 155 L 260 243.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 260 248.88 L 256.5 241.88 L 260 243.63 L 263.5 241.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="130" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 131px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TabletId</div></div></div></foreignObject><text x="170" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TabletId</text></switch></g><path d="M 250 60 L 250 110 L 75 110 L 75 253.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 75 258.88 L 71.5 251.88 L 75 253.63 L 78.5 251.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="210" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 211px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel</div></div></div></foreignObject><text x="250" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel</text></switch></g><path d="M 330 60 L 330 170 L 275 170 L 275 353.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 275 358.88 L 271.5 351.88 L 275 353.63 L 278.5 351.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="290" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 291px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Generation</div></div></div></foreignObject><text x="330" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Generation</text></switch></g><rect x="370" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 371px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Step</div></div></div></foreignObject><text x="410" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Step</text></switch></g><rect x="450" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 451px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Cookie</div></div></div></foreignObject><text x="490" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Cookie</text></switch></g><rect x="530" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 531px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">BlobSize</div></div></div></foreignObject><text x="570" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobSize</text></switch></g><rect x="610" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 611px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PartId</div></div></div></foreignObject><text x="650" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PartId</text></switch></g><path d="M 420 -200 L 415 -200 Q 410 -200 410 -190 L 410 70 Q 410 80 405 80 L 402.5 80 Q 400 80 405 80 L 407.5 80 Q 410 80 410 90 L 410 350 Q 410 360 415 360 L 420 360" fill="none" stroke="#000000" stroke-miterlimit="10" transform="rotate(-90,410,80)" pointer-events="all"/><rect x="385" y="90" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 100px; margin-left: 410px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">BlobId</div></div></div></foreignObject><text x="410" y="104" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobId</text></switch></g><rect x="155" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 170px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">64</div></div></div></foreignObject><text x="170" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">64</text></switch></g><rect x="240" y="0" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 250px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">8</div></div></div></foreignObject><text x="250" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">8</text></switch></g><rect x="315" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 330px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">32</div></div></div></foreignObject><text x="330" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">32</text></switch></g><rect x="395" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 410px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">32</div></div></div></foreignObject><text x="410" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">32</text></switch></g><rect x="475" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 490px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">24</div></div></div></foreignObject><text x="490" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">24</text></switch></g><rect x="545" y="0" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 570px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">28 (26)</div></div></div></foreignObject><text x="570" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">28 (26)</text></switch></g><rect x="640" y="0" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 650px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">4</div></div></div></foreignObject><text x="650" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">4</text></switch></g><rect x="15" y="260" width="120" height="280" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 267px; margin-left: 16px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TTabletStorageInfo</div></div></div></foreignObject><text x="75" y="279" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TTabletStorageInfo</text></switch></g><path d="M 125 310 L 170 310 L 170 405 L 208.63 405" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 213.88 405 L 206.88 408.5 L 208.63 405 L 206.88 401.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="25" y="290" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 310px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 0</div></div></div></foreignObject><text x="75" y="314" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 0</text></switch></g><rect x="25" y="330" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 350px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 1</div></div></div></foreignObject><text x="75" y="354" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 1</text></switch></g><rect x="25" y="370" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 390px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 2</div></div></div></foreignObject><text x="75" y="394" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 2</text></switch></g><rect x="25" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel N</div></div></div></foreignObject><text x="75" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel N</text></switch></g><rect x="215" y="360" width="120" height="180" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 367px; margin-left: 216px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TTabletChannelInfo</div></div></div></foreignObject><text x="275" y="379" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TTabletChannelInfo</text></switch></g><path d="M 325 410 L 398.63 410" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 410 L 396.88 413.5 L 398.63 410 L 396.88 406.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="390" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 410px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">0≤gen<10</div></div></div></foreignObject><text x="275" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">0≤gen<10</text></switch></g><rect x="405" y="390" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 410px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 12345</div></div></div></foreignObject><text x="455" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 12345</text></switch></g><path d="M 325 460 L 398.63 460" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 460 L 396.88 463.5 L 398.63 460 L 396.88 456.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="440" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 460px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">10≤gen<125</div></div></div></foreignObject><text x="275" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">10≤gen<125</text></switch></g><rect x="405" y="440" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 460px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 54321</div></div></div></foreignObject><text x="455" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 54321</text></switch></g><path d="M 325 510 L 398.63 510" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 510 L 396.88 513.5 L 398.63 510 L 396.88 506.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">125≤gen</div></div></div></foreignObject><text x="275" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">125≤gen</text></switch></g><rect x="405" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 12345</div></div></div></foreignObject><text x="455" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 12345</text></switch></g><rect x="425" y="260" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 275px; margin-left: 470px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 18px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Tablet</div></div></div></foreignObject><text x="470" y="280" fill="#000000" font-family="Helvetica" font-size="18px" text-anchor="middle">Tablet</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/ydb/docs/en/core/concepts/_assets/Slide_group_content.svg b/ydb/docs/en/core/concepts/_assets/Slide_group_content.svg deleted file mode 100644 index 5e5796fae0..0000000000 --- a/ydb/docs/en/core/concepts/_assets/Slide_group_content.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="616px" height="412px" viewBox="-0.5 -0.5 616 412" content="<mxfile host="drawio.yandex-team.ru" modified="2021-07-15T15:37:07.887Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" etag="3zDAlwPQQ3q6GuUUS0rv" version="12.7.0" type="device"><diagram id="wSBYkmeAYjroDNpxkVYP" name="Page-1">3Ztbc6IwFMc/jY87I4EgPmpt7V66++DM7nMKKWYHiBPj9dNv0KDi0VaLmLBP4knA5PdPwrmMLfchXQ4FmYxfeESTFmpHy5Y7aCHkIMdVH7lltbX4Pt4aYsEi3WlvGLE11ca2ts5YRKeljpLzRLJJ2RjyLKOhLNmIEHxR7vbGk/KvTkhMgWEUkgRa/7BIjrfWAHX29mfK4nHxy47f3bakpOisZzIdk4gvDkzuY8t9EJzL7VW6fKBJDq/gsr3v6UzrbmCCZvKSG14S5q9fv/0apDEJw/iFDkbrL1jLMyfJTM9Yj1auCgSCz7KI5k9pt9z+YswkHU1ImLculOjKNpZpor456vKNZ/KJpCzJ9X6myZxKFhLVAIerZzCnQtLlgUkPf0h5SqVYqS66FWFNXa8lt1gki70yTkfbxoeq+NpI9GqId8/eA1MXmtkV/IoR3IzfDTA5HbeEyTmByQtOYKqNEgKQ2uYpBUeU0AlKJyB5dUGCO9ExDgl5lkHyACTz+81tWwYJA0iueUi+ZZB8AMkzDslDlkHqAEjYPCTbDu4AQPKNQ8K2HdxdAKljHJJv28HtQEfpjbD8NkFJkqpP6DepucoyGZKwOFPXoSJDhTLkRJQTnvR0Q8qiKL+9L+iUrcnr5lE58glnmdxMCvdbeJA/ayb5dBuU3Qh6t11m7kLmp1x4VBtz6HdtmftJzvVVqKs4v4p4SlgG7c2XxOkEJU18KAk+IQmuTRLo5V0nCXScmyYJci2TBPqU10kC3fTGSdK1TBLowV4nCQwKmiaJiy2TBPrL10kCQ5CmSeI5lkkCvfPrJIEBT+Mkse31DmOB6ySB4VXTJMGWvd4L7/rTksBgrnGSWPZ6RzAWBIxpFNOR/sqFHPOYZyR53Fv75ZB63+cH5xPN7i+VcqULbznWC8PsKZ+JkL43gaJcR0RM5TsdNfd8Mu8KJWhCJJuXk+O35+4A7r8HX0ff1dIbKpqTr+rm3pBmVKjBcLVse4psz9984oHZbVAqvj0ogZj6AdT+SRc3epMcZZV2+YiDTXIyY1Jb9O7BULFiaanWAqZ/VMA0nXDyYFhXsehUJ74dLmvwwRAMHtL24Otgy/DBcKlioequm7djGh8MbSqWsO66eY3jg2FIxeLWXTevaXwYhgwVy1733Lye6bMPQzezYkHsnpvXPD4YHQUW4zvavObxnauw2FJorFMNJzh6kZsuQeJzxZWdGoYLWndVIzCtxrm6yk4N6OP/t2p4xvdG1ZJK88vzyEclTYynJnHVmkrz6/Ougy3TpGpRxfChdhMvq22XJj70sgDkO6TwP5cV/jC/X5xKH+b3i0DbkgR/Me7LE/wKYg9dnuCvPQsflNf5Lro4/BuMf2Khu9cvdPV1/w+lTdvB/7zcx38=</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="167" y="250" width="170" height="160" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="83" y="50" width="480" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/><rect x="93" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 94px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">0</div></div></div></foreignObject><text x="113" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">0</text></switch></g><rect x="153" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 154px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">1</div></div></div></foreignObject><text x="173" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">1</text></switch></g><rect x="213" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 214px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">2</div></div></div></foreignObject><text x="233" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">2</text></switch></g><rect x="273" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 274px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">3</div></div></div></foreignObject><text x="293" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">3</text></switch></g><rect x="333" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 334px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">4</div></div></div></foreignObject><text x="353" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">4</text></switch></g><rect x="393" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 394px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">5</div></div></div></foreignObject><text x="413" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">5</text></switch></g><rect x="453" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 454px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">6</div></div></div></foreignObject><text x="473" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">6</text></switch></g><rect x="513" y="60" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 80px; margin-left: 514px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">7</div></div></div></foreignObject><text x="533" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">7</text></switch></g><rect x="0" y="70" width="70" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 80px; margin-left: 35px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail realm 0</div></div></div></foreignObject><text x="35" y="84" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail realm 0</text></switch></g><rect x="88" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 113px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />0</div></div></div></foreignObject><text x="113" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="148" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 173px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />1</div></div></div></foreignObject><text x="173" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="208" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 233px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />2</div></div></div></foreignObject><text x="233" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="268" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 293px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />3</div></div></div></foreignObject><text x="293" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="328" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 353px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />4</div></div></div></foreignObject><text x="353" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="388" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 413px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />5</div></div></div></foreignObject><text x="413" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="448" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 473px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />6</div></div></div></foreignObject><text x="473" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="508" y="0" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 533px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />7</div></div></div></foreignObject><text x="533" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><path d="M 473 140 L 473 106.37" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 473 101.12 L 476.5 108.12 L 473 106.37 L 469.5 108.12 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="353" y="140" width="240" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 150px; margin-left: 473px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Courier New; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">VDISK[GroupId:Generation:0:6:0]</div></div></div></foreignObject><text x="473" y="154" fill="#000000" font-family="Courier New" font-size="12px" text-anchor="middle">VDISK[GroupId:Generation:0:6:0]</text></switch></g><rect x="177" y="260" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 280px; margin-left: 178px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">0</div></div></div></foreignObject><text x="197" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">0</text></switch></g><rect x="230" y="260" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 280px; margin-left: 231px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">1</div></div></div></foreignObject><text x="250" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">1</text></switch></g><rect x="285" y="260" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 280px; margin-left: 286px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">2</div></div></div></foreignObject><text x="305" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">2</text></switch></g><rect x="177" y="310" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 330px; margin-left: 178px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">3</div></div></div></foreignObject><text x="197" y="334" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">3</text></switch></g><rect x="230" y="310" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 330px; margin-left: 231px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">4</div></div></div></foreignObject><text x="250" y="334" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">4</text></switch></g><rect x="285" y="310" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 330px; margin-left: 286px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">5</div></div></div></foreignObject><text x="305" y="334" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">5</text></switch></g><rect x="177" y="360" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 380px; margin-left: 178px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">6</div></div></div></foreignObject><text x="197" y="384" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">6</text></switch></g><rect x="230" y="360" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 380px; margin-left: 231px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">7</div></div></div></foreignObject><text x="250" y="384" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">7</text></switch></g><rect x="285" y="360" width="40" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 380px; margin-left: 286px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">8</div></div></div></foreignObject><text x="305" y="384" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">8</text></switch></g><rect x="97" y="270" width="70" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 280px; margin-left: 132px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail realm 0</div></div></div></foreignObject><text x="132" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail realm 0</text></switch></g><rect x="97" y="320" width="70" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 330px; margin-left: 132px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail realm 1</div></div></div></foreignObject><text x="132" y="334" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail realm 1</text></switch></g><rect x="97" y="370" width="70" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 380px; margin-left: 132px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail realm 2</div></div></div></foreignObject><text x="132" y="384" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail realm 2</text></switch></g><rect x="172" y="200" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 225px; margin-left: 197px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />0</div></div></div></foreignObject><text x="197" y="229" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="225" y="200" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 225px; margin-left: 250px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />1</div></div></div></foreignObject><text x="250" y="229" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><rect x="280" y="200" width="50" height="50" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 225px; margin-left: 305px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">fail<br />domain<br />2</div></div></div></foreignObject><text x="305" y="229" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">fail...</text></switch></g><path d="M 390 330 L 331.37 330" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 326.12 330 L 333.12 326.5 L 331.37 330 L 333.12 333.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="390" y="315" width="160" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 322px; margin-left: 392px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Courier New; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">VDISK[GroupId:Generation:1:2:0]</div></div></div></foreignObject><text x="392" y="334" fill="#000000" font-family="Courier New" font-size="12px">VDISK[GroupId:Generation:1...</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/ydb/docs/en/core/concepts/_includes/connect.md b/ydb/docs/en/core/concepts/_includes/connect.md index f0470801bd..092abfd6d8 100644 --- a/ydb/docs/en/core/concepts/_includes/connect.md +++ b/ydb/docs/en/core/concepts/_includes/connect.md @@ -4,29 +4,29 @@ To connect to the {{ ydb-short-name }} database from the {{ ydb-short-name }} CLI or an application using the {{ ydb-short-name }} SDK, you'll need to provide the following data: -1. Endpoint -1. Authentication information -1. Database location +1. Endpoint. +1. Authentication information. +1. Database location. ## Endpoint {#endpoint} -The `endpoint` is a string in `protocol://host:port` format provided by the {{ ydb-short-name }} cluster owner to correctly route client requests to its databases via the network infrastructure and to establish a network connection. For cloud databases, the `endpoint` is shown in the management console on the page of the desired database. In addition, you can usually obtain it using the CLI of the cloud provider. In corporate environments, the names of {{ ydb-short-name }} endpoints are provided by administrators or can also be obtained in the internal cloud management console. +An endpoint is a string structured as `protocol://host:port` and provided by a {{ ydb-short-name }} cluster owner for proper routing of client queries to its databases by way of a network infrastructure as well as for proper network connections. Cloud databases display the endpoint in the management console on the requisite DB page and also normally send it via the cloud provider's CLI. In corporate environments, endpoint names {{ ydb-short-name }} are provided by the administration team or obtained in the internal cloud management console. {% include [overlay/endpoint.md](connect_overlay/endpoint.md) %} Examples: -- `grpc://localhost:7135` indicates a data exchange protocol without encryption (gRPC), the server is run on the same host as the client and accepts connections on port 7135. -- `grpcs://ydb.somecorp-int.ru` indicates a data exchange protocol with encryption (gRPCs), the server is run on the host ydb.somecorp-int.ru in the isolated SomeCorp corporate intranet and accepts connections on the YDB default port 2135. -- `grpcs://ydb.serverless.yandexcloud.net:2135` indicates a data exchange protocol with encryption (gRPCs), the public server Serverless YDB Yandex.Cloud ydb.serverless.yandexcloud.net, and port 2135. +* `grpc://localhost:7135` is an unencrypted data interchange protocol (gRPC) with the server running on port 7135 of the same host as the client. +* `grpcs://ydb.somecorp-int.ru` is an encrypted data interchange protocol (gRPCs) with the server running on a host called ydb.somecorp-int.ru on the SomeCorp isolated corporate network and listening for connections on YDB default port 2135. +* `grpcs://ydb.serverless.yandexcloud.net:2135` is an encrypted data interchange protocol (gRPCs), public {{ yandex-cloud }} Serverless YDB server at ydb.serverless.yandexcloud.net, port 2135. {% include [overlay/endpoint_example.md](connect_overlay/endpoint_example.md) %} ## Authentication information {#auth} -Once a network connection is established, the server starts to accept client requests with authentication information for processing. Based on this information, the server identifies the client's account and verifies permission to execute the request. +Once a network connection is established, the server starts to accept client requests with authentication information for processing. The server uses it to identify the client's account and to verify access to execute the query. -The basic operation model assumes that there is a separate system for managing credentials and permissions: [IAM (Identity and Access Management)](https://en.wikipedia.org/wiki/Identity_management). IAM issues a token linked to the account, which the {{ ydb-short-name }} client passes to the server along with a request. The {{ ydb-short-name }} server accesses the IAM system to verify the token and permission to perform the requested operation and caches the result. +The basic operation model assumes that there is a separate system for managing credentials and permissions: [IAM (Identity and Access Management)](https://en.wikipedia.org/wiki/Identity_management). IAM issues a token linked to the account, which the {{ ydb-short-name }} client passes to the server along with a request. The {{ ydb-short-name }} server accesses IAM to verify the token and permissions to perform the requested operation and caches the result. {{ ydb-short-name }} also supports username and password based authentication without interacting with IAM, but using this model in practice is limited to simple configurations, primarily local ones. @@ -34,13 +34,13 @@ The basic operation model assumes that there is a separate system for managing c {{ ydb-short-name }} clients (CLI or SDK) support the following token selection modes to pass tokens in requests: -- **Anonymous**: An empty token is passed in a request. -- **Access Token**: A fixed token is set as a parameter for an SDK or CLI and passed in a request. -- **Refresh Token**: An [OAuth token](https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/) of a user's personal account is set as a parameter for an SDK or CLI, using which the client regularly accesses the IAM API in the background for rotating (obtaining a new) token that is passed in a request. -- **Service Account Key**: The service account attributes and the signing key are set as a parameter for an SDK or CLI, using which the client regularly accesses the IAM API in the background for rotating (obtaining a new) token that is passed in a request. -- **Metadata**: An SDK or CLI regularly accesses the local service for rotating (obtaining a new) token that is passed in a request. +* **Anonymous**: Empty token passed in a request. +* **Access Token**: Fixed token set as a parameter for the client (SDK or CLI) and passed in requests. +* **Refresh Token**: [OAuth token](https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/) of a user's personal account set as a parameter for the client (SDK or CLI), which the client periodically sends to the IAM API in the background to rotate a token (obtain a new one) to pass in requests. +* **Service Account Key**: Service account attributes and a signature key set as parameters for the client (SDK or CLI), which the client periodically sends to the IAM API in the background to rotate a token (obtain a new one) to pass in requests. +* **Metadata**: Client (SDK or CLI) periodically accessing a local service to rotate a token (obtain a new one) to pass in requests. -Any owner of a valid token can get permission to perform operations, so the main task of the security system is to ensure the token's privacy and not to compromise it. +Any owner of a valid token can get access to perform operations; therefore, the principal objective of the security system is to ensure that a token remains private and to protect it from being compromised. Authentication modes with token rotation, such as **Refresh Token** and **Service Account Key**, provide a higher level of security compared to the **Access Token** mode that uses a fixed token, since only secrets with a short validity period are transmitted to the {{ ydb-short-name }} server over the network. @@ -48,21 +48,21 @@ The highest level of security and performance is provided when using the **Metad When choosing the authentication mode among those supported by the server and environment, follow the recommendations below: -- **Anonymous** is usually used on self-deployed local {{ ydb-short-name }} clusters that are inaccessible over the network. -- **Access Token** is used when other modes are not supported on the server side or for setup/debugging purposes. It does not require client interactions with the IAM system. However, if the IAM system supports an API for token rotation, fixed tokens issued by this IAM usually have a short validity period, which makes it necessary to update them manually in the IAM system on a regular basis. -- **Refresh Token** can be used when performing one-time manual operations under a personal account, for example, related to DB data maintenance, performing ad-hoc operations in the CLI, or running applications from a workstation. You can manually obtain this token once in the IAM system for a long period and store it in an environment variable on a personal workstation to be used automatically and without additional authentication parameters when starting the CLI. -- **Service Account Key** is mainly used for applications designed to run in environments where the **Metadata** mode is supported, when testing them outside these environments (for example, on a workstation). It can also be used for applications outside these environments, working as an analog of **Refresh Token** for service accounts. Unlike a personal account, access objects and service account roles can be restricted. -- **Metadata** is used when deploying applications in clouds. Currently, this mode is supported on VMs and in Yandex Cloud Functions. +* **Anonymous** can be used on self-deployed local {{ ydb-short-name }} clusters that are inaccessible over the network. +* **Access Token** can be used when other modes are not supported server side or for setup/debugging purposes. It does not require that the client access IAM. However, if the IAM system supports an API for token rotation, fixed tokens issued by this IAM usually have a short validity period, which makes it necessary to update them manually in the IAM system on a regular basis. +* **Refresh Token** can be used when performing one-time manual operations under a personal account, for example, related to DB data maintenance, performing ad-hoc operations in the CLI, or running applications from a workstation. You can manually obtain this token from IAM once to have it last a long time and save it in an environment variable on a personal workstation to use automatically and with no additional authentication parameters on CLI launch. +* **Service Account Key** is mainly used for applications designed to run in environments where the **Metadata** mode is supported, when testing them outside these environments (for example, on a workstation). It can also be used for applications outside these environments, working as an analog of **Refresh Token** for service accounts. Unlike a personal account, service account access objects and roles can be restricted. +* **Metadata** is used when deploying applications in clouds. Currently, this mode is supported on virtual machines and in {{ sf-name }} {{ yandex-cloud }}. -The token to specify in request parameters can be obtained in the IAM system that the specific {{ ydb-short-name }} deployment is associated with. In particular, for the {{ ydb-short-name }} service, Yandex.Cloud uses Yandex.Passport OAuth and Yandex.Cloud service accounts. When using {{ ydb-short-name }} in a corporate context, centralized authentication systems that are standard for the company can be used. +The token to specify in request parameters can be obtained in the IAM system that the specific {{ ydb-short-name }} deployment is associated with. In particular, {{ ydb-short-name }} in {{ yandex-cloud }} uses Yandex.Passport OAuth and {{ yandex-cloud }} service accounts. When using {{ ydb-short-name }} in a corporate context, a company's standard centralized authentication system may be used. {% include [overlay/auth_choose.md](connect_overlay/auth_choose.md) %} -When using modes in which the {{ ydb-short-name }} client accesses the IAM system, the IAM URL that provides an API for issuing tokens can be set additionally. By default, the existing SDK and CLI make an attempt to access the Yandex.Cloud IAM API hosted at `iam.api.cloud.yandex.net:443`. +When using modes in which the {{ ydb-short-name }} client accesses the IAM system, the IAM URL that provides an API for issuing tokens can be set additionally. By default, existing SDKs and CLIs attempt to access the {{ yandex-cloud }} IAM API hosted at `iam.api.cloud.yandex.net:443`. ## Database location {#database} -Database location (`database`) is a string that defines where the queried database is located in the {{ ydb-short-name }} cluster. Represented as a [file path](https://en.wikipedia.org/wiki/Path_(computing)) with `/` used as a separator. It always starts with a `/`. +Database location (`database`) is a string that defines where the queried database is located in the {{ ydb-short-name }} cluster. Has the format [path to the file]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Path_(computing)){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Путь_к_файлу){% endif %} and uses the `/` character as separator. It always starts with a `/`. A {{ ydb-short-name }} cluster may have multiple databases deployed, and their location is defined by the cluster configuration. Like the endpoint, `database` for cloud databases is displayed in the management console on the desired database page, and can also be obtained via the CLI of the cloud provider. @@ -72,14 +72,14 @@ For cloud solutions, databases are created and hosted on the {{ ydb-short-name } {% note warning %} -Applications should not in any way interpret the number and value of `database` directories, since they are set in the {{ ydb-short-name }} cluster configuration. For example, when working with {{ ydb-short-name }} in Yandex.Cloud, the `database` current structure is `region_name/cloud_id/database_id`. However, this format may be changed in the future for new databases. +Applications should not in any way interpret the number and value of `database` directories, since they are set in the {{ ydb-short-name }} cluster configuration. When using {{ ydb-short-name }} in {{ yandex-cloud }}, `database` has the format `region_name/cloud_id/database_id`; however, this format may change going forward for new DBs. {% endnote %} Examples: -- `/ru-central1/b1g8skpblkos03malf3s/etn01q5ko6sh271beftr` is the Yandex.Cloud database with the `etn01q3ko8sh271beftr` ID in the `b1g8skpbljhs03malf3s` cloud, deployed in the `ru-central1` region. -- `/local` is the default database for custom deployment [using Docker](../../getting_started/ydb_docker.md) +* `/ru-central1/b1g8skpblkos03malf3s/etn01q5ko6sh271beftr` is a {{ yandex-cloud }} database with `etn01q3ko8sh271beftr` as ID deployed in the `b1g8skpbljhs03malf3s`cloud in the `ru-central1` region. +* `/local` is the default database for custom deployment [using Docker](../../getting_started/self_hosted/ydb_docker.md). {% include [overlay/database_example.md](connect_overlay/database_example.md) %} @@ -87,20 +87,19 @@ Examples: For information about how to define connection parameters on the client, see the following articles: -* [Connecting to and authenticating with a database in the {{ ydb-short-name }} CLI](../../reference/ydb-cli/connect.md) -* [Authentication in the {{ ydb-short-name }} SDK](../../reference/ydb-sdk/auth.md) +* [Connecting to and authenticating with a database in the {{ ydb-short-name }} CLI](../../reference/ydb-cli/connect.md). +* [Authentication in the {{ ydb-short-name }} SDK](../../reference/ydb-sdk/auth.md). ## Additional information {#addition} ### A root certificate for TLS {#tls-cert} -When using an encrypted protocol ([gRPC over TLS](https://grpc.io/docs/guides/auth/), or gRPCS), a network connection can only be continued if the client is sure that it receives a response from the genuine server that it is trying to connect to, rather than someone in-between intercepting its request on the network. This is ensured by verifications through a [chain of trust](https://en.wikipedia.org/wiki/Chain_of_trust), to enable which, the client needs to have a root certificate installed. +When using an encrypted protocol ([gRPC over TLS](https://grpc.io/docs/guides/auth/), or gRPCS), a network connection can only be continued if the client is sure that it receives a response from the genuine server that it is trying to connect to, rather than someone in-between intercepting its request on the network. This is assured by verifications through a [chain of trust]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Chain_of_trust){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Цепочка_доверия ){% endif %} which requires the client to have a root certificate installed to operate. -The OS that the client runs on already include a set of root certificates from the world's major certification authorities. However, the {{ ydb-short-name }} cluster owner can use its own CA that is not associated with any of the global ones, which is often the case in corporate environments, and is almost always used for self-deployment of clusters with connection encryption support. In this case, the cluster owner must somehow transfer its root certificate for use on the client side. This certificate can be installed in the certificate store of the OS where the client is run (manually by a user or a corporate team of OS admins), or embedded in the client itself (as in the {{ ydb-short-name }} CLI and SDK Yandex.Cloud). +The OS that the client runs on already include a set of root certificates from the world's major certification authorities. However, the {{ ydb-short-name }} cluster owner can use its own CA that is not associated with any of the global ones, which is often the case in corporate environments, and is almost always used for self-deployment of clusters with connection encryption support. In this case, the cluster owner must somehow transfer its root certificate for use on the client side. This certificate may be installed in the operating system's certificate store where the client runs (manually by a user or by a corporate OS administration team) or built into the client itself (as is the case for {{ yandex-cloud }} in {{ ydb-short-name }} CLI and SDK). ### API for getting IAM tokens {#token-refresh-api} -To rotate tokens, the {{ ydb-short-name }} SDK and CLI use a gRPC request to the Yandex.Cloud IAM API: [IamToken - create](https://cloud.yandex.com/en/docs/iam/api-ref/grpc/iam_token_service#Create). In **Refresh Token** mode, the token specified in the OAuth parameter is passed in the `yandex_passport_oauth_token` attribute. In **Service Account Key** mode, based on the specified attributes of the service account and encryption key, a JSON Web Token (JWT) with a short validity period is generated and passed in the `jwt` attribute. The source code for generating the JWT is available as part of the SDK (for example, the `get_jwt()` method in the [Python code](https://github.com/ydb-platform/ydb-python-sdk/blob/main/ydb/iam/auth.py)). +For token rotation, the {{ ydb-short-name }} SDK and CLI use a gRPC request to the {{ yandex-cloud }} IAM API [IamToken - create]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/iam/api-ref/grpc/iam_token_service#Create){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/iam/api-ref/grpc/iam_token_service#Create){% endif %}. In **Refresh Token** mode, the token specified in the OAuth parameter is passed in the `yandex_passport_oauth_token` attribute. In **Service Account Key** mode, a short-lived JWT token is generated from the specified service account attributes and an encryption key and passed in the `jwt` property. The source code for generating the JWT is available as part of the SDK (for example, the `get_jwt()` method in the [Python code](https://github.com/ydb-platform/ydb-python-sdk/blob/main/ydb/iam/auth.py)). In the {{ ydb-short-name }} SDK and CLI, you can substitute the host used for accessing the API for obtaining tokens. This makes it possible to implement a similar API in corporate contexts. - diff --git a/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md b/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md index 97ef4ef07e..55d5f64654 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md +++ b/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md @@ -1,11 +1,11 @@ ## Hierarchy of cluster elements {#hierarchy} {#domain} {#account} {#directory} {#dir} -To host databases in {{ ydb-short-name }}, use the following directory structure: ```/domain/account/directory/database```, where: +To host databases in {{ ydb-short-name }}, use the following directory structure: `/domain/account/directory/database`, where: -- *A domain* is the first-level element where all cluster resources are located. There can only be one domain per cluster. -- *An account* is a second-level element that defines the owner of a DB group. -- *A directory* is a third-level element set by the account owner for grouping their databases. -- *A database* is a fourth-level element that corresponds to the DB. +* _A domain_ is the first-level element where all cluster resources are located. There can only be one domain per cluster. +* _An account_ is a second-level element that defines the owner of a DB group. +* _A directory_ is a third-level element set by the account owner for grouping their databases. +* _A database_ is a fourth-level element that corresponds to the DB. At the top hierarchy level, the cluster contains a single domain that hosts one or more accounts, while accounts host one or more directories that host databases. diff --git a/ydb/docs/en/core/concepts/_includes/databases/cluster.md b/ydb/docs/en/core/concepts/_includes/databases/cluster.md index 816b7757b6..fc4fc5a78b 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/cluster.md +++ b/ydb/docs/en/core/concepts/_includes/databases/cluster.md @@ -3,4 +3,3 @@ _A {{ ydb-short-name }} cluster_ is a set of {{ ydb-short-name }} nodes that the load is distributed across and that communicate with each other through a network. A single cluster may host multiple databases, and specific cluster nodes are allocated for each database. One database is fully hosted in one cluster. There are {{ ydb-short-name }} clusters with a single data center and geo-distributed clusters. The smallest single-datacenter cluster consists of a single node. - diff --git a/ydb/docs/en/core/concepts/_includes/databases/compute.md b/ydb/docs/en/core/concepts/_includes/databases/compute.md index cf4dc20369..30b5586e1f 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/compute.md +++ b/ydb/docs/en/core/concepts/_includes/databases/compute.md @@ -1,4 +1,3 @@ ## Computing resources {#compute-resources} {{ ydb-short-name }} clusters can be deployed on bare metal, VMs, or in a container virtualization environment. - diff --git a/ydb/docs/en/core/concepts/_includes/databases/database.md b/ydb/docs/en/core/concepts/_includes/databases/database.md index d057ef34f7..6bc098e67b 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/database.md +++ b/ydb/docs/en/core/concepts/_includes/databases/database.md @@ -13,4 +13,3 @@ _A {{ ydb-short-name }} database ({{ ydb-short-name }} DB)_ is an isolated consi * Generates metrics that can be used to monitor the DB performance. Resources for the {{ ydb-short-name }} database (CPU, RAM, nodes, and disk space) are allocated within a {{ ydb-short-name }} cluster. - diff --git a/ydb/docs/en/core/concepts/_includes/databases/intro.md b/ydb/docs/en/core/concepts/_includes/databases/intro.md index fd685bdeff..ddf87b8818 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/intro.md +++ b/ydb/docs/en/core/concepts/_includes/databases/intro.md @@ -1,6 +1,6 @@ --- -title: "Terms and definitions YDB" -description: "A database (DB) YDB: is an isolated, consistent set of data that is accessed through the YDB, service, which provides scalability, fault tolerance, and automatic data replication." +title: "Terms and definitions {{ ydb-full-name }}" +description: "A database (DB) {{ ydb-full-name }}: is an isolated, consistent set of data that is accessed through the {{ ydb-full-name }}, service, which provides scalability, fault tolerance, and automatic data replication." --- -# Terms and definitions +# Terms and definitions diff --git a/ydb/docs/en/core/concepts/_includes/databases/regions.md b/ydb/docs/en/core/concepts/_includes/databases/regions.md index a21125b9df..1c84c96c6a 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/regions.md +++ b/ydb/docs/en/core/concepts/_includes/databases/regions.md @@ -6,4 +6,3 @@ _A wide geographic region_ is a territory where the distance between availabilit A geo-distributed {{ ydb-short-name }} cluster contains nodes located in different availability zones within a wide geographic region. {{ ydb-short-name }} performs synchronous data writes to each of the availability zones, ensuring uninterrupted performance if an availability zone fails. In geographically distributed clusters, you can choose a policy for distributing computing resources across data centers. This lets you find the right balance between minimum execution time and minimum downtime if a data center goes offline. - diff --git a/ydb/docs/en/core/concepts/_includes/databases/slots.md b/ydb/docs/en/core/concepts/_includes/databases/slots.md index 1139d05acc..6469a59c63 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/slots.md +++ b/ydb/docs/en/core/concepts/_includes/databases/slots.md @@ -3,4 +3,3 @@ _A slot_ is a part of the server resources allocated for running a single {{ ydb-short-name }} cluster node, it has a fixed size of 10CPU/50GB RAM. Slots are used if a {{ ydb-short-name }} cluster is deployed on bare-metal instances whose resources are sufficient to host multiple slots. If you use VMs for cluster deployment, their capacity is selected so that the use of slots is not required: one node serves one database and one database can use multiple nodes allocated to it. You can see a list of DB slots in the output of the `discovery list` command of the {{ ydb-short-name }} console client. - diff --git a/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md b/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md index b460eb8da9..8901b7ecab 100644 --- a/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md +++ b/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md @@ -2,7 +2,6 @@ A storage group is a redundant array of independent disks that are networked in a single logical unit. Storage groups increase fault tolerance through redundancy and improve performance. -Each storage group corresponds to a specific storage schema that affects the number of disks used, the failure model, and the redundancy factor. The ``block4-2`` schema is commonly used for single data center clusters, where the storage group is located on 8 disks in 8 racks, can withstand the failure of any two disks, and ensures a redundancy factor of 1.5. In multiple data center clusters, we use the ``mirror3dc`` schema, where storage groups are made up of 9 disks, 3 in each of the three data centers, which can survive the failure of a data center or disk, and ensures a redundancy factor of 3. +Each storage group corresponds to a specific storage schema that affects the number of disks used, the failure model, and the redundancy factor. The `block4-2` schema is commonly used for single data center clusters, where the storage group is located on 8 disks in 8 racks, can withstand the failure of any two disks, and ensures a redundancy factor of 1.5. In multiple data center clusters, we use the `mirror3dc` schema, where storage groups are made up of 9 disks, 3 in each of the three data centers, which can survive the failure of a data center or disk, and ensures a redundancy factor of 3. {{ ydb-short-name }} lets you allocate additional storage groups for available DBs as your data grows. - diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md b/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md index 7501678e61..7fae5905ae 100644 --- a/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md +++ b/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md @@ -1,4 +1,3 @@ -## Network Block Store Volume +## Network block storage volume {#volume} {{ ydb-short-name }} can be used as a platform for creating a wide range of data storage and processing systems, for example, by implementing a [network block device](https://en.wikipedia.org/wiki/Network_block_device) on {{ ydb-short-name }}. Network block devices implement an interface for a local block device, as well as ensure fault-tolerance (through redundancy) and good scalability in terms of volume size and the number of input/output operations per unit of time. The downside of a network block device is that any input/output operation on such device requires network interaction, which might increase the latency of the network device compared to the local device. You can deploy a common file system on a network block device and/or run an application directly on the block device, such as a database management system. - diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/dir.md b/ydb/docs/en/core/concepts/_includes/datamodel/dir.md index 05138506ef..fc682b2f73 100644 --- a/ydb/docs/en/core/concepts/_includes/datamodel/dir.md +++ b/ydb/docs/en/core/concepts/_includes/datamodel/dir.md @@ -1,4 +1,3 @@ ## Directories {#dir} For convenience, the service supports creating directories like in a file system, meaning the entire database consists of a directory tree, while tables and other entities are in the leaves of this tree (similar to files in the file system). A directory can host multiple subdirectories and tables. The names of the entities they contain are unique. - diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/folder.md b/ydb/docs/en/core/concepts/_includes/datamodel/folder.md deleted file mode 100644 index 5edb8057d3..0000000000 --- a/ydb/docs/en/core/concepts/_includes/datamodel/folder.md +++ /dev/null @@ -1,3 +0,0 @@ -## Directories - -For convenience, the service supports creating directories like in a file system, meaning the entire database consists of a directory tree, while tables and other entities are in the leaves of this tree (similar to files in the file system). A directory can host multiple subdirectories and tables. The names of the entities they contain are unique. diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/intro.md b/ydb/docs/en/core/concepts/_includes/datamodel/intro.md index 57acaa8bc0..72be848af7 100644 --- a/ydb/docs/en/core/concepts/_includes/datamodel/intro.md +++ b/ydb/docs/en/core/concepts/_includes/datamodel/intro.md @@ -1,5 +1,3 @@ # Data model and schema -This section describes the entities that {{ ydb-short-name }} uses within DBs. -The {{ ydb-short-name }} core lets you flexibly implement various storage primitives, so new entities may appear in the future. - +This section describes the entities that {{ ydb-short-name }} uses within DBs. The {{ ydb-short-name }} core lets you flexibly implement various storage primitives, so new entities may appear in the future. diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/pq.md b/ydb/docs/en/core/concepts/_includes/datamodel/pq.md index 34c72a32fb..c72feaff34 100644 --- a/ydb/docs/en/core/concepts/_includes/datamodel/pq.md +++ b/ydb/docs/en/core/concepts/_includes/datamodel/pq.md @@ -1,4 +1,3 @@ -## Persistent queues +## Persistent queue {#persistent-queue} A persistent queue consists of one or more partitions, where each partition is a [FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)) [message queue](https://en.wikipedia.org/wiki/Message_queue) ensuring reliable delivery between two or more components. Data messages are untyped and constitute a data blob. Partitioning is a parallel processing tool that helps ensure high queue bandwidth. Mechanisms are provided to implement at least once and exactly once persistent queue delivery guarantees. A persistent queue in {{ ydb-short-name }} is similar to a topic in [Apache Kafka](https://en.wikipedia.org/wiki/Apache_Kafka). - diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/table.md b/ydb/docs/en/core/concepts/_includes/datamodel/table.md index 5939748692..9175c5d338 100644 --- a/ydb/docs/en/core/concepts/_includes/datamodel/table.md +++ b/ydb/docs/en/core/concepts/_includes/datamodel/table.md @@ -1,93 +1,87 @@ ## Table {#table} -A table in {{ ydb-short-name }} is a [relational table](https://en.wikipedia.org/wiki/Table_(database)) that contains a set of related data consisting of rows and columns. Each row is a set of cells designed to store values of certain types according to the data schema. The data schema defines the names and types of table columns. An example of a data schema is shown below. +A table in {{ ydb-short-name }} is a [relational table](https://en.wikipedia.org/wiki/Table_(database)) that contains a set of related data consisting of rows and columns. Each row is a set of cells that are used for storing specific types of values according to the data schema. The data schema defines the names and types of table columns. An example of a data schema is shown below. The `Series` table consists of four columns named `SeriesId`, `ReleaseDate`, `SeriesInfo`, and `Title` and holding data of type `Uint64?` for the first two and `String?` for the others. The `SeriesId` column is declared the primary key. ![Datamodel_of_a_relational_table](../../_assets/datamodel_rtable.png) -<small>Figure 1. Sample table schema</small> - -Figure 1 shows the schema of a ```Series``` table with four columns, named ```SeriesId```, ```ReleaseDate```, ```SeriesInfo```, and ```Title```, with the ```Uint64?``` data type for the first two columns and ```String?``` for the others. The ```SeriesId``` column is declared the primary key. - -{{ ydb-short-name }} uses [YQL](../../datatypes.md) data types. [Simple YQL data types](../../../yql/reference/types/primitive.md) can be used as column types. All columns may contain a special NULL value to indicate a missing value. +{{ ydb-short-name }} uses [YQL](../../datatypes.md) as its data type. Columns may use [simple YQL data types](../../../yql/reference/types/primitive.md). All columns may contain the special `NULL` value to signify that a value is missing. {{ ydb-short-name }} tables always have one or more columns that make up the key ([primary key](https://en.wikipedia.org/wiki/Unique_key)). Each table row has a unique key value, so there can be no more than one row per key value. {{ ydb-short-name }} tables are always ordered by key. This means that you can efficiently make point reads by key and range-based queries by key or key prefix (actually using an index). In the example above, the key columns are highlighted in gray and marked with a special sign. Tables consisting only of key columns are supported. However, you can't create tables without a primary key. -Often, when you design a table schema, you already have a set of fields, which can naturally serve as the primary key. Be careful when selecting the key to avoid hotspots. -For example, if you insert data into a table with a monotonically increasing key, you write the data to the end of the table. But since {{ ydb-short-name }} splits table data by key range, your inserts are always processed by the same server, so you lose the main benefits of a distributed database. -To distribute the load evenly across different servers and avoid hotspots when working with large tables, we recommend hashing the natural key and using the hash as the first component of the primary key, as well as changing the order of the primary key components. +Often, when you design a table schema, you already have a set of fields, which can naturally serve as the primary key. Be careful when selecting the key to avoid hotspots. For example, if you insert data into a table with a monotonically increasing key, you write the data to the end of the table. But since {{ ydb-short-name }} splits table data by key range, your inserts are always processed by the same server, so you lose the main benefits of a distributed database. To distribute the load evenly across different servers and to avoid hotspots when processing large tables, we recommend hashing the natural key and using the hash as the first component of the primary key as well as changing the order of the primary key components. ### Partitioning tables {#partitioning} A database table can be sharded by primary key value ranges. Each shard of the table is responsible for a specific range of primary keys. Key ranges served by different shards do not overlap. Different table shards can be served by different distributed database servers (including ones in different locations). They can also move independently between servers to enable rebalancing or ensure shard operability if servers or network equipment goes offline. -If there is not a lot of data or load, the table may consist of a single shard. As the amount of data served by the shard or the load on the shard grows, {{ ydb-short-name }} automatically splits this shard into two shards. The data is split by the median value of the primary key if the shard size exceeds the threshold. If partitioning by load is used, the shard first collects a sample of the requested keys (that can be read, written, and deleted) and, based on this sample, selects a key for partitioning to evenly distribute the load across new shards. So in the case of load-based partitioning, the size of new shards may significantly vary. +If there is not a lot of data or load, the table may consist of a single shard. As the amount of data served by the shard or the load on the shard grows, {{ ydb-short-name }} automatically splits the shard into two shards. The data is split by the median value of the primary key if the shard size exceeds the threshold. If partitioning by load is used, the shard first collects a sample of the requested keys (that can be read, written, and deleted) and, based on this sample, selects a key for partitioning to evenly distribute the load across new shards. So in the case of load-based partitioning, the size of new shards may significantly vary. The size-based shard split threshold and automatic splitting can be configured (enabled/disabled) individually for each database table. -In addition to automatically splitting shards, you can create an empty table with a predefined number of shards. You can manually set the exact shard key split range or evenly split into a predefined number of shards. In this case, ranges are created based on the first component of the primary key. You can set even splitting for tables that have a Uint64 or Uint32 integer as the first component of the primary key. +In addition to automatically splitting shards, you can create an empty table with a predefined number of shards. You can manually set the exact shard key split range or evenly split it into a predefined number of shards. In this case, ranges are created based on the first component of the primary key. You can set even splitting for tables that have a Uint64 or Uint32 integer as the first component of the primary key. -Partitioning parameters refer to the table itself and not to secondary indexes built on its data. Each index is served by its own set of shards and decisions to split or merge its partitions are made independently based on the default settings. These settings may become available to users in the future like the settings of the main table. +Partitioning parameters refer to the table itself rather than to secondary indexes built from its data. Each index is served by its own set of shards and decisions to split or merge its partitions are made independently based on the default settings. These settings may become available to users in the future like the settings of the main table. -A split or merge operation usually takes about 500 milliseconds. During this time, the data involved in the operation becomes temporarily unavailable for reads and writes. Special wrapper methods in the {{ ydb-short-name }} SDK make automatic retries when receiving information saying that the shard is being split or merged, without raising it to the application level. Please note that if the system is overloaded for some reason (for example, due to a general shortage of CPU or insufficient DB disk throughput), split and merge operations may take longer. +A split or a merge usually takes about 500 milliseconds. During this time, the data involved in the operation becomes temporarily unavailable for reads and writes. Without raising it to the application level, special wrapper methods in the {{ ydb-short-name }} SDK make automatic retries when they discover that a shard is being split or merged. Please note that if the system is overloaded for some reason (for example, due to a general shortage of CPU or insufficient DB disk throughput), split and merge operations may take longer. The following table partitioning parameters are defined in the data schema: #### AUTO_PARTITIONING_BY_SIZE -* Type: Enum (`ENABLED`, `DISABLED`) -* Default value: `ENABLED` +* Type: `Enum` (`ENABLED`, `DISABLED`). +* Default value: `ENABLED`. -Automatic partitioning by partition size. If the size of a partition exceeds the value specified by the [`AUTO_PARTITIONING_PARTITION_SIZE_MB`](#auto_partitioning_partition_size_mb) parameter, it is enqueued for splitting. If the total size of two or more adjacent partitions is less than 50% of the [`AUTO_PARTITIONING_PARTITION_SIZE_MB`](#auto_partitioning_partition_size_mb) parameter value, they are enqueued for merging. +Automatic partitioning by partition size. If a partition size exceeds the value specified by the [AUTO_PARTITIONING_PARTITION_SIZE_MB](#auto_partitioning_partition_size_mb) parameter, it is enqueued for splitting. If the total size of two or more adjacent partitions is less than 50% of the [AUTO_PARTITIONING_PARTITION_SIZE_MB](#auto_partitioning_partition_size_mb) value, they are enqueued for merging. #### AUTO_PARTITIONING_BY_LOAD -* Type: Enum (`ENABLED`, `DISABLED`) -* Default value: `DISABLED` +* Type: `Enum` (`ENABLED`, `DISABLED`). +* Default value: `DISABLED`. Automatic partitioning by load. If a shard consumes more than 50% of the CPU for a few dozens of seconds, it is enqueued for splitting. If the total load on two or more adjacent shards uses less than 35% of a single CPU core within an hour, they are enqueued for merging. -Performing split or merge operations uses the CPU and takes time. Therefore, when dealing with varying load, in addition to enabling this mode, we recommend that you set the [`AUTO_PARTITIONING_MIN_PARTITIONS_COUNT`](#auto_partitioning_min_partitions_count) parameter to a value other than 1 so that a decrease in the load does not lead to a decrease in the number of partitions below the required one and there is no need to split them again when the load increases. +Performing split or merge operations uses the CPU and takes time. Therefore, when dealing with a variable load, we recommend both enabling this mode and setting [AUTO_PARTITIONING_MIN_PARTITIONS_COUNT](#auto_partitioning_min_partitions_count) to a value other than 1 so that decreased load does not cause the number of partitions to drop below the required value resulting in a need to split them again when load increases. When choosing the minimum number of partitions, it makes sense to consider that one table partition can only be hosted on one server and use no more than 1 CPU core for data update operations. Hence, you can set the minimum number of partitions for a table on which a high load is expected to at least the number of nodes (servers) or, preferably, to the number of CPU cores allocated to the database. #### AUTO_PARTITIONING_PARTITION_SIZE_MB -* Type: Uint64 -* Default value: 2000 MB ( 2GB ) +* Type: `Uint64`. +* Default value: `2000 MB` ( `2 GB` ). -The partition size threshold in MB. If exceeded, a shard is split. Valid when the [`AUTO_PARTITIONING_BY_SIZE`](#auto_partitioning_by_size) mode is enabled. +Partition size threshold in MB. If exceeded, a shard splits. Takes effect when the [AUTO_PARTITIONING_BY_SIZE](#auto_partitioning_by_size) mode is enabled. #### AUTO_PARTITIONING_MIN_PARTITIONS_COUNT -* Type: Uint64 -* Default value: 1 +* Type: `Uint64`. +* Default value: `1`. Partitions are only merged if their actual number exceeds the value specified by this parameter. When using automatic partitioning by load, we recommend that you set this parameter to a value other than 1, so that periodic load drops don't lead to a decrease in the number of partitions below the required one. #### AUTO_PARTITIONING_MAX_PARTITIONS_COUNT -* Type: Uint64 -* Default value: 50 +* Type: `Uint64`. +* Default value: `50`. Partitions are only split if their number doesn't exceed the value specified by this parameter. With any automatic partitioning mode enabled, we recommend that you set a meaningful value for this parameter and monitor when the actual number of partitions approaches this value, otherwise splitting of partitions will sooner or later stop under an increase in data or load, which will lead to a failure. #### UNIFORM_PARTITIONS -* Type: Uint64 -* Default value: Not applicable +* Type: `Uint64`. +* Default value: Not applicable. -The number of partitions for uniform initial table partitioning. The type of the primary key's first column must be Uint64 or Uint32. A created table is immediately divided into the specified number of partitions. +The number of partitions for uniform initial table partitioning. The primary key's first column must have type `Uint64` or `Uint32`. A created table is immediately divided into the specified number of partitions. -When automatic partitioning is enabled, make sure to set the correct [`AUTO_PARTITIONING_MIN_PARTITIONS_COUNT`](#auto_partitioning_min_partitions_count) parameter value so that all partitions are not merged into one immediately after creating the table. +When automatic partitioning is enabled, make sure to set the correct value for [AUTO_PARTITIONING_MIN_PARTITIONS_COUNT](#auto_partitioning_min_partitions_count) so as not to merge all partitions into one immediately after creating the table. #### PARTITION_AT_KEYS -* Type: Expression -* Default value: Not applicable +* Type: `Expression`. +* Default value: Not applicable. -Boundary values of keys for initial table partitioning. It's a list of boundary values separated by commas and surrounded with brackets. Each boundary value can be either a set of values of key columns (also separated by commas and surrounded with brackets) or a single value if only the values of the first key column are specified. Examples: ```(100, 1000)```, ```((100, "abc"), (1000, "cde"))```. +Boundary values of keys for initial table partitioning. It's a list of boundary values separated by commas and surrounded with brackets. Each boundary value can be either a set of values of key columns (also separated by commas and surrounded with brackets) or a single value if only the values of the first key column are specified. Examples: `(100, 1000)`, `((100, "abc"), (1000, "cde"))`. -When automatic partitioning is enabled, make sure to set the correct [`AUTO_PARTITIONING_MIN_PARTITIONS_COUNT`](#auto_partitioning_min_partitions_count) parameter value so that all partitions are not merged into one immediately after creating the table. +When automatic partitioning is enabled, make sure to set the correct value for [AUTO_PARTITIONING_MIN_PARTITIONS_COUNT](#auto_partitioning_min_partitions_count) so as not to merge all partitions into one immediately after creating the table. ### Reading data from replicas {#read_only_replicas} @@ -104,23 +98,23 @@ You can enable running read replicas for each shard of the table in the table da | Parameter name | Description | Type | Acceptable values | Update possibility | Reset capability | | ------------- | --------- | --- | ------------------- | --------------------- | ------------------ | -| ```READ_REPLICAS_SETTINGS``` | ```PER_AZ``` means using the specified number of replicas in each AZ and ```ANY_AZ``` in all AZs in total. | String | ```"PER_AZ:<count>"```, ```"ANY_AZ:<count>"```, where ```<count>``` is the number of replicas | Yes | No | +| `READ_REPLICAS_SETTINGS` | `PER_AZ` means using the specified number of replicas in each AZ and `ANY_AZ` in all AZs in total. | String | `"PER_AZ:<count>"`, `"ANY_AZ:<count>"`, where `<count>` is the number of replicas | Yes | No | The internal state of each of the followers is restored exactly and fully consistently from the leader state. -Besides the data status in storage, followers also receive a stream of updates from the leader. Updates are sent in real time, immediately after the commit to the log. However, they are sent asynchronously, resulting in some delay (usually no more than dozens of milliseconds, but sometimes longer in the event of cluster connectivity issues) in applying updates to followers relative to their commit on the leader. Therefore, reading data from followers is only supported in the [transaction mode](../transactions#modes) `StaleReadOnly()`. +Besides the data status in storage, followers also receive a stream of updates from the leader. Updates are sent in real time, immediately after the commit to the log. However, they are sent asynchronously, resulting in some delay (usually no more than dozens of milliseconds, but sometimes longer in the event of cluster connectivity issues) in applying updates to followers relative to their commit on the leader. Therefore, reading data from followers is only supported in the [transaction mode](../transactions.md#modes) `StaleReadOnly()`. If there are multiple followers, their delay from the leader may vary: although each follower of each of the shards retains internal consistency, artifacts may be observed between different shards. Please allow for this in your application code. For that same reason, it's currently impossible to perform cross-shard transactions from followers. ### Deleting expired data (TTL) {#ttl} -{{ ydb-short-name }} enables an automatic background delete of expired data. The table data schema may have a column with a Datetime or Timestamp value defined. Its value for all rows will be compared with the current time in the background. Rows for which the current time becomes greater than the column value, factoring in the specified delay, will be deleted. +{{ ydb-short-name }} supports automatic background deletion of expired data. A table data schema may define a column containing a `Datetime` or a `Timestamp` value. A comparison of this value with the current time for all rows will be performed in the background. Rows for which the current time becomes greater than the column value, factoring in the specified delay, will be deleted. | Parameter name | Type | Acceptable values | Update possibility | Reset capability | | ------------- | --- | ------------------- | --------------------- | ------------------ | -| ```TTL``` | Expression | ```Interval("<literal>") ON <column>``` | Yes | Yes | +| `TTL` | Expression | `Interval("<literal>") ON <column>` | Yes | Yes | -For more information about deleting expired data, see [Time to Live (TTL)](../../../concepts/ttl.md) +For more information about deleting expired data, see [Time to Live (TTL)](../../../concepts/ttl.md). ### Renaming a table {#rename} @@ -130,8 +124,8 @@ Operations are performed in isolation, the external process sees only two states The speed of renaming is determined by the type of data transactions currently running against the table and doesn't depend on the table size. -- [Renaming a table in YQL](../../../yql/reference/syntax/alter_table.md#rename) -- [Renaming a table via the CLI](../../../reference/ydb-cli/commands/tools/rename.md) +* [Renaming a table in YQL](../../../yql/reference/syntax/alter_table.md#rename) +* [Renaming a table via the CLI](../../../reference/ydb-cli/commands/tools/rename.md) ### Bloom filter {#bloom-filter} @@ -139,5 +133,5 @@ Using a [Bloom filter](https://en.wikipedia.org/wiki/Bloom_filter) lets you more | Parameter name | Type | Acceptable values | Update possibility | Reset capability | | ------------- | --- | ------------------- | --------------------- | ------------------ | -| ```KEY_BLOOM_FILTER``` | Enum | ```ENABLED```, ```DISABLED``` | Yes | No | +| `KEY_BLOOM_FILTER` | Enum | `ENABLED`, `DISABLED` | Yes | No | diff --git a/ydb/docs/en/core/concepts/_includes/distributed_storage/common_scheme_ydb.md b/ydb/docs/en/core/concepts/_includes/distributed_storage/common_scheme_ydb.md deleted file mode 100644 index c19ff72844..0000000000 --- a/ydb/docs/en/core/concepts/_includes/distributed_storage/common_scheme_ydb.md +++ /dev/null @@ -1,129 +0,0 @@ -## General YDB schema - -An approximate general YDB schema is shown below. - -![General schema](../../_assets/BS_overview.svg) - -### Nodes - -A single YDB installation consists of a *cluster* that is divided into *nodes*. A node is a single process in the system, usually kikimr. This node is part of a cluster and can exchange data with its other nodes via *Interconnect*. Each *node* has its own ID which is usually named NodeId. NodeID is an integer from 1, consisting of 20 bits. NodeID 0 is reserved for internal needs and usually indicates the current node or no node. - -A number of services are run on each node and implemented via *actors*. - -Nodes can be static and dynamic. - -A configuration of static nodes, that is, their complete list with the address for connecting via Interconnect specified, is stored in a configuration file and is read once when the process is started. A set of static nodes changes very rarely. This usually happens when expanding clusters or moving nodes from one physical machine to another. To change the set of static nodes, apply the updated configuration to **every** node and then perform a rolling restart of the entire cluster. - -Dynamic nodes are not known in advance and are added to the system as new processes are started. This may be due, for example, to the creation of new tenants in YDB installations as a database. When registering a dynamic node, its process first connects to one of the static nodes via gRPC, transmits information about itself through a special service called Node Broker, and receives the NodeID to log in with in response. The mechanism for assigning nodes is pretty much similar to the DHCP in the context of distributing IP addresses. - -### Tablets - -Special microservices called *tablets* are run on each node. Each tablet has a specific type and ID and is a singleton, meaning that only one tablet with a specific ID can be running in the entire cluster at any given time. A tablet can be started on any node that is suitable for it. An important characteristic of a tablet is its *generation* that increases with each subsequent run. Please note that due to the distributed nature of the system and in case of various kinds of issues, such as with network partitioning, a situation may arise when the same tablet will actually be running on two different nodes at the same time. However, BlobStorage guarantees that only one of them will be able to successfully complete operations that change its state and the generation that each successful operation is performed in will not decrease over time. - -You can find out on what node the tablet in the current generation is running through the *StateStorage* service. To send messages to tablets, use a special set of libraries named *tablet pipe*. With it, knowing the ID of the target tablet, you can easily send the desired message to it. - -A tablet can be divided into two parts: the basic tablet and the user logic. - -The basic tablet is a set of tables, each of which may consist of one or more key columns of an arbitrary type and a set of data columns. Each table may have its own schema. In addition, tables can be created and deleted while the tablet is running. The interface of the basic tablet lets you perform read and update operations on these tables. - -The user logic is located between the basic tablet and the user and lets you process specific requests for this type of tablet, reliably saving changes in BlobStorage. A commonly used template for tablet operation is storing all data in memory, reading it only at the start, and synchronously changing the data in memory and in storage after a successful commit. - -#### How does a tablet store data and what data is it? - -The basic tablet is an LSM tree that contains all of its table data. One level below the basic tablet is BlobStorage that, roughly speaking, is KeyValue storage that stores binary large objects (blobs). *BLOB* is a binary fragment from 1 byte to 10 MB in size, which has a fixed ID (that is usually called *BlobId* and is of the TLogoBlobID type) and contains related data. Storage is immutable, meaning that only one value corresponds to each ID and it cannot change over time. You can write and read a blob and then delete it when you no longer need it. - -For BlobStorage, blobs are an opaque entity. A tablet can store several types of blobs. The most frequently written blob is a log blob (meaning a recovery log). A tablet's log is arranged in a list of blobs, each of which contains information about the change being made to the tables. When run, the tablet finds the last blob in the log and then recursively reads all related blobs following the links. The log may also mention snapshot blobs, which is a type of blobs that contain data from multiple log blobs after merging them (the merge operation in the LSM tree). - -The tablet writes blobs of different types to different *channels*. A channel specifies the branch of storage to store blobs in and performs various functions, such as: - -1. Choosing the storage type (different channels can be linked to different types of storage devices: SSD, HDD, or NVME). -1. Load balancing, because each channel has a limit on IOPS, available space and bandwidth. -1. Specifying the data type. When restoring the log, only the blobs from the null channel are read, which lets you distinguish them from other blobs. - -#### Blob ID format - -Each blob has a 192-bit ID consisting of the following fields (in the order used for sorting): - -1. TabletId (64 bits): ID of the blob owner tablet. -1. Channel (8 bits): Channel sequence number. -1. Generation (32 bits): Number of the generation in which the tablet that wrote this blob was run. -1. Step (32 bits): Internal number of the blob group within the Generation. -1. Cookie (24 bits): ID that can be used if the Step is insufficient. -1. CrcMode (2 bits): Selects mode for redundant blob integrity control at the BlobStorage level. -1. BlobSize (26 bits): Blob data size. -1. PartId (4 bits): Part number when blob erasure coding is used. At the "BlobStorage <-> tablet" interaction level, this parameter is always 0, meaning the entire blob. - -Two blobs are considered different if at least one of the first five parameters (TabletId, Channel, Generation, Step, or Cookie) differs in their IDs. So it is impossible to write two blobs that only differ in BlobSize and/or CrcMode. - -For debugging purposes, there is string blob ID formatting that has interactions `[TabletId:Generation:Step:Channel:Cookie:BlobSize:PartId]`, for example, `[12345:1:1:0:0:1000:0]`. - -When writing a blob, the tablet selects the Channel, Step, and Cookie parameters. The TabletId is fixed and must indicate the tablet performing the write operation, while the Generation parameter must indicate the generation that the tablet performing the operation is running in. - -When performing reads, the blob ID is specified, which can be arbitrary, but preferably preset. - -#### Groups - -Blobs are written in a logical entity called *group*. On each node, a special actor called DS proxy is created for each group that the blob is written to. This actor is responsible for performing all operations related to the group. The actor is created automatically through the NodeWarden service that will be described below. - -Physically, a group is a set of multiple physical devices (OS block devices) that are located on different nodes so that the failure of one device correlates as little as possible with the failure of another device. These devices are usually located in different racks or different datacenters. On each of these devices, some space is allocated for the group, which is managed by a special service called *VDisk*. Each VDisk runs on top of a block device from which it is separated by another service called *PDisk*. Blobs are broken into fragments based on *erasure coding* with these fragments written to VDisks. Before splitting into fragments, optional encryption of the data in the group can be performed. - -This scheme is shown in the figure below. - -![PDisk, VDisk, and a group](../../_assets/Slide3_group_layout.svg) - -VDisks from different groups are shown as multicolored squares; one color stands for one group. - -A group can be treated as a set of VDisks: - -![Group](../../_assets/Slide_group_content.svg) - -Each VDisk within the group has a sequence number, the disks are numbered from 0 to N-1, where N is the number of disks in the group. - -In addition, the group disks are combined into fail domains, while the fail domains are combined into fail realms. As a rule, each fail domain has exactly one disk inside (although, in theory, it may have more, but this has found no application in practice), and multiple fail realms are only used for groups that host their data in three datacenters at once. In addition to the sequence number in the group, each VDisk is assigned an ID that consists of a fail realm index, fail domain index inside the fail realm, and the VDisk index inside the fail domain. In string form, this ID is written as `VDISK[GroupId:GroupGeneration:FailRealm:FailDomain:VDisk]`. - -All the fail realms have the same number of fail domains and all the fail domains have the same number of disks inside. The number of the fail realms, the number of the fail domains inside the fail realm, and the number of the disks inside the fail domain make up the geometry of the group. The geometry depends on the way the data is encoded in the group. For example, for block-4-2 numFailRealms = 1, numFailDomainsInFailRealm >= 8 (only 8 fail realms are used in practice), numVDisksInFailDomain >= 1 (strictly 1 fail domain is used in practice). For mirror-3-dc numFailRealms >= 3, numFailDomainsInFailRealm >= 3, and numVDisksInFailDomain >= 1 (3x3x1 are used). - -Each PDisk has an ID that consists of the number of the node that it is running on and the internal number of the PDisk inside this node. This ID is usually written as NodeId:PDiskId. For example, 1:1000. If you know the PDisk ID, you can calculate the service ActorId of this disk and send it a message. - -Each VDisk runs on top of a specific PDisk and has a *slot ID* consisting of three fields (NodeID:PDiskId:VSlotId) and the above-mentioned VDisk ID. Strictly speaking, there are different concepts: a slot is the space reserved on the PDisk and occupied by the VDisk, and the VDisk is a group component that occupies a certain slot and performs operations on it. Similarly to PDisks, if you know the slot ID, you can calculate the service ActorId of the running VDisk and send it a message. To send messages from the DS proxy to the VDisk, an intermediate actor called *BS_QUEUE* is used. - -The composition of each group is not fixed: it may change while using the system. For this purpose, the concept of "group generation" is introduced. Each "GroupId:GroupGeneration" pair corresponds to a fixed set of slots (a vector that consists of N slot IDs, where N is the size of the group), storing the data of the entire group. *Please note that a group generation and a tablet generation are not related in any way*. - -As a rule, groups of two adjacent generations differ by no more than one slot. - -#### Subgroups - -For each blob, a special concept of a *subgroup* is introduced, which is an ordered subset of group disks with a strictly fixed number of elements, depending on the type of encoding (the number of elements in the group must be at least the same), where the data of this blob will be stored. For single-datacenter groups with conventional encoding, this subset is selected as the first N elements of a cyclic disk permutation in the group, where the permutation depends on the BlobId hash. - -Each disk in the subgroup corresponds to a disk in the group, but is limited by the allowed number of stored blobs. For example, to encode block-4-2 with four data parts and two parity parts, the functional purpose of disks in the subgroup is as follows: - -| Number in the subgroup | Possible PartIds | -| ------------------- | ------------------- | -| 0 | 1 | -| 1 | 2 | -| 2 | 3 | -| 3 | 4 | -| 4 | 5 | -| 5 | 6 | -| 6 | 1,2,3,4,5,6 | -| 7 | 1,2,3,4,5,6 | - -In this case, PartID=1..4 corresponds to the data parts (which are obtained by splitting the original blob into 4 equal parts), and PartID=5..6 are parity parts. Disks numbered 6 and 7 in the subgroup are called *handoff disks*. Any part, either one or more, can be written to them. Disks 0..5 can only store the corresponding blob parts. - -In practice, when performing writes, the system tries to write 6 parts to the first 6 disks of the subgroup and, in the vast majority of cases, these attempts are successful. However, if any of the disks is not available, the write operation fails and the system uses handoff disks where parts of the disks that did not respond in time are sent. This may result in a situation when multiple parts of the same blob are written to one handoff disk. This is acceptable, although it makes no sense in terms of storage: each part must have its own unique disk. - -#### Tablet channel history - -As mentioned above, each group has a fixed amount of data that can fit into it and also divides the bandwidth by throughput and the number of operations per second between all consumers. The load on tablets may vary. As a result a group may become overloaded. In this regard, the concept of history is introduced, with which, for each tablet, knowing a blob's Channel and Generation, you can determine the group that this blob is written to. - -This mechanism works as follows: - -![Channel history](../../_assets/Slide_blob.svg) - -For each channel, the TTabletStorageInfo structure contains the TTabletChannelInfo substructure with generation ranges and the group number corresponding to each range. The ranges are strictly adjacent to each other, the last range is open. Group numbers may overlap in different ranges and even across different channels: this is not prohibited and is quite common. - -When writing a blob, a tablet selects the most recent range for the corresponding channel, since the write operation is always performed on behalf of the current generation of the tablet. When reading a blob, the group number is fetched based on the BlobId.Generation of the blob being read. - -#### Garbage collection - -#### Tablet suspension diff --git a/ydb/docs/en/core/concepts/_includes/distributed_storage/detailed_distributed_storage.md b/ydb/docs/en/core/concepts/_includes/distributed_storage/detailed_distributed_storage.md deleted file mode 100644 index ce160da18e..0000000000 --- a/ydb/docs/en/core/concepts/_includes/distributed_storage/detailed_distributed_storage.md +++ /dev/null @@ -1,357 +0,0 @@ -## BlobStorage implementation details - -### Managing BlobStorage resources on nodes via NodeWarden - -### How PDisk works - -#### Data format - -### How VDisk works - -#### Large and small blobs - -#### Fresh segment - -#### SSTable - -#### Syncing metadata - -#### Replicating data - -#### Data format - -##### Donor disks - -### How DS proxy works - -## BS_CONTROLLER - -### Communicating with NodeWarden - -### Box and Storage Pool - -### Self Heal - -### Entities and tables - -All information stored in BS_CONTROLLER can be grouped into: - -1. BS_CONTROLLER settings. -1. Low-level configuration (PDisks, VDisks, and groups). -1. Top-level configuration (Boxes and StoragePools). -1. Runtime information (persistent disk and group metrics, the status of scrubbing of individual VDisks, information about node drive serial numbers). -1. OperationLogs. - -The operation logic is built so that all table data at the start of the BS_CONTROLLER tablet is loaded into memory and stored there for the entire time of its operation (with the exception of OperationLog). When executing transactions, the data is updated in tables and in memory. - -The tables are discussed in more detail below. - -#### BS_CONTROLLER settings - -The settings are stored in the State table. - -#### Low-level configuration - -Low-level configuration includes information about the available cluster resources: PDisks, VDisks, and groups. These tables are interconnected via PK <-> FK links. - -#### Top-level configuration - -Top-level configuration stores data necessary for linking Boxes and nodes where they are located... - -#### Database schema - -Box - -| Column | ID | PK | Type | Default | Destination | -| ------------ | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| Name | 2 | | Utf8 | | | -| Generation | 3 | | Uint64 | | | - -BoxHost - -| Column | ID | PK | Type | Default | Destination | -| -------------- | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| FQDN | 3 | * | Utf8 | | | -| IcPort | 4 | * | Int32 | | | -| HostConfigId | 5 | | Uint64 | | | - -BoxHostV2 - -| Column | ID | PK | Type | Default | Destination | -| -------------- | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| FQDN | 2 | * | Utf8 | | | -| IcPort | 3 | * | Int32 | | | -| HostConfigId | 4 | | Uint64 | | | - -BoxStoragePool - -| Column | ID | PK | Type | Default | Destination | -| ---------------------------- | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| StoragePoolId | 2 | * | Uint64 | | | -| Name | 20 | | Utf8 | | | -| ErasureSpecies | 3 | | Int32 | | | -| RealmLevelBegin | 4 | | Int32 | | | -| RealmLevelEnd | 5 | | Int32 | | | -| DomainLevelBegin | 6 | | Int32 | | | -| DomainLevelEnd | 7 | | Int32 | | | -| NumFailRealms | 8 | | Int32 | | | -| NumFailDomainsPerFailRealm | 9 | | Int32 | | | -| NumVDisksPerFailDomain | 10 | | Int32 | | | -| VDiskKind | 11 | | Int32 | | | -| SpaceBytes | 12 | | Uint64 | | | -| WriteIOPS | 13 | | Uint64 | | | -| WriteBytesPerSecond | 14 | | Uint64 | | | -| ReadIOPS | 15 | | Uint64 | | | -| ReadBytesPerSecond | 16 | | Uint64 | | | -| InMemCacheBytes | 17 | | Uint64 | | | -| Kind | 18 | | Utf8 | | | -| NumGroups | 19 | | Uint32 | | | -| Generation | 21 | | Uint64 | | | -| EncryptionMode | 22 | | Uint32 | 0 | | -| SchemeshardId | 23 | | Uint64 | | | -| PathItemId | 24 | | Uint64 | | | -| RandomizeGroupMapping | 25 | | Bool | false | | - -BoxStoragePoolPDiskFilter - -| Column | ID | PK | Type | Default | Destination | -| --------------- | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| StoragePoolId | 2 | * | Uint64 | | | -| Type | 3 | * | Int32 | | | -| SharedWithOs | 4 | * | Bool | | | -| ReadCentric | 5 | * | Bool | | | -| Kind | 6 | * | Uint64 | | | - -BoxStoragePoolUser - -| Column | ID | PK | Type | Default | Destination | -| --------------- | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| StoragePoolId | 2 | * | Uint64 | | | -| UserId | 3 | * | String | | | - -BoxUser - -| Column | ID | PK | Type | Default | Destination | -| --------- | ---- | ---- | -------- | -------------- | ------------ | -| BoxId | 1 | * | Uint64 | | | -| UserId | 2 | * | String | | | - -DriveSerial - -| Column | ID | PK | Type | Default | Destination | -| ------------- | ---- | ---- | -------- | -------------- | ------------ | -| Serial | 1 | * | String | | | -| BoxId | 2 | | Uint64 | | | -| NodeId | 3 | | Uint32 | | | -| PDiskId | 4 | | Uint32 | | | -| Guid | 5 | | Uint64 | | | -| LifeStage | 6 | | Uint32 | | | -| Kind | 7 | | Uint64 | | | -| PDiskType | 8 | | Int32 | | | -| PDiskConfig | 9 | | String | | | - -DriveStatus - -| Column | ID | PK | Type | Default | Destination | -| ----------- | ---- | ---- | -------- | -------------- | ------------ | -| FQDN | 1 | * | Utf8 | | | -| IcPort | 2 | * | Int32 | | | -| Path | 3 | * | Utf8 | | | -| Status | 4 | | Uint32 | | | -| Timestamp | 5 | | Uint64 | | | - -Group - -| Column | ID | PK | Type | Default | Destination | -| ---------------------- | ---- | ---- | -------- | -------------- | ------------ | -| ID | 1 | * | Uint32 | | | -| Generation | 2 | | Uint32 | | | -| ErasureSpecies | 3 | | Uint32 | | | -| Owner | 4 | | Uint64 | | | -| DesiredPDiskCategory | 5 | | Uint64 | | | -| DesiredVDiskCategory | 6 | | Uint64 | | | -| EncryptionMode | 7 | | Uint32 | 0 | | -| LifeCyclePhase | 8 | | Uint32 | 0 | | -| MainKeyId | 9 | | String | | | -| EncryptedGroupKey | 10 | | String | | | -| GroupKeyNonce | 11 | | Uint64 | 0 | | -| MainKeyVersion | 12 | | Uint64 | 0 | | -| Down | 13 | | Bool | false | | -| SeenOperational | 14 | | Bool | false | | - -GroupLatencies - -| Column | ID | PK | Type | Default | Destination | -| ----------------------- | ---- | ---- | -------- | -------------- | ------------ | -| GroupId | 1 | * | Uint32 | | | -| PutTabletLogLatencyUs | 4 | | Uint32 | | | -| PutUserDataLatencyUs | 5 | | Uint32 | | | -| GetFastLatencyUs | 6 | | Uint32 | | | - -GroupStoragePool - -| Column | ID | PK | Type | Default | Destination | -| --------------- | ---- | ---- | -------- | -------------- | ------------ | -| GroupId | 1 | * | Uint32 | | | -| BoxId | 2 | | Uint64 | | | -| StoragePoolId | 3 | | Uint64 | | | - -HostConfig - -| Column | ID | PK | Type | Default | Destination | -| -------------- | ---- | ---- | -------- | -------------- | ------------ | -| HostConfigId | 1 | * | Uint64 | | | -| Name | 2 | | Utf8 | | | -| Generation | 3 | | Uint64 | | | - -HostConfigDrive - -| Column | ID | PK | Type | Default | Destination | -| -------------- | ---- | ---- | -------- | -------------- | ------------ | -| HostConfigId | 1 | * | Uint64 | | | -| Path | 2 | * | Utf8 | | | -| Type | 3 | | Int32 | | | -| SharedWithOs | 4 | | Bool | | | -| ReadCentric | 5 | | Bool | | | -| Kind | 6 | | Uint64 | | | -| PDiskConfig | 7 | | String | | | - -MigrationEntry - -| Column | ID | PK | Type | Default | Destination | -| --------------- | ---- | ---- | -------- | -------------- | ------------ | -| PlanName | 1 | * | String | | | -| EntryIndex | 2 | * | Uint64 | | | -| GroupId | 3 | | Uint32 | | | -| OriginNodeId | 4 | | Uint32 | | | -| OriginPDiskId | 5 | | Uint32 | | | -| OriginVSlotId | 6 | | Uint32 | | | -| TargetNodeId | 7 | | Uint32 | | | -| TargetPDiskId | 8 | | Uint32 | | | -| Done | 9 | | Bool | | | - -MigrationPlan - -| Column | ID | PK | Type | Default | Destination | -| --------- | ---- | ---- | -------- | -------------- | ------------ | -| Name | 1 | * | String | | | -| State | 2 | | Uint32 | | | -| Size | 3 | | Uint64 | | | -| Done | 4 | | Uint64 | | | - -Node - -| Column | ID | PK | Type | Default | Destination | -| ------------------- | ---- | ---- | -------- | -------------- | ------------ | -| ID | 1 | * | Uint32 | | | -| NextPDiskID | 2 | | Uint32 | | | -| NextGroupKeyNonce | 9 | | Uint64 | 0 | | - -OperationLog - -| Column | ID | PK | Type | Default | Destination | -| --------------- | ---- | ---- | -------- | ------------------- | ------------ | -| Index | 1 | * | Uint64 | | | -| Timestamp | 2 | | Uint64 | | | -| Request | 3 | | String | | | -| Response | 4 | | String | | | -| ExecutionTime | 5 | | Uint64 | TDuration::Zero() | | - -PDisk - -| Column | ID | PK | Type | Default | Destination | -| ---------------- | ---- | ---- | -------- | -------------- | ------------ | -| NodeID | 1 | * | Uint32 | | | -| PDiskID | 2 | * | Uint32 | | | -| Path | 3 | | Utf8 | | | -| Category | 4 | | Uint64 | | | -| Guid | 7 | | Uint64 | | | -| SharedWithOs | 8 | | Bool | | | -| ReadCentric | 9 | | Bool | | | -| NextVSlotId | 10 | | Uint32 | 1000 | | -| PDiskConfig | 11 | | String | | | -| Status | 12 | | Uint32 | | | -| Timestamp | 13 | | Uint64 | | | -| ExpectedSerial | 14 | | String | | | -| LastSeenSerial | 15 | | String | | | -| LastSeenPath | 16 | | String | | | - -PDiskMetrics - -| Column | ID | PK | Type | Default | Destination | -| --------- | ---- | ---- | -------- | -------------- | ------------ | -| NodeID | 1 | * | Uint32 | | | -| PDiskID | 2 | * | Uint32 | | | -| Metrics | 3 | | String | | | - -ScrubState - -| Column | ID | PK | Type | Default | Destination | -| ---------------------- | ---- | ---- | -------- | ------------------ | ------------ | -| NodeId | 1 | * | Uint32 | | | -| PDiskId | 2 | * | Uint32 | | | -| VSlotId | 3 | * | Uint32 | | | -| State | 5 | | String | | | -| ScrubCycleStartTime | 6 | | Uint64 | TInstant::Zero() | | -| ScrubCycleFinishTime | 8 | | Uint64 | TInstant::Zero() | | -| Success | 7 | | Bool | false | | - -State - -| Column | ID | PK | Type | Default | Destination | -| -------------------------- | ---- | ---- | -------- | --------------------------------------------- | ------------ | -| FixedKey | 1 | * | Bool | | | -| NextGroupID | 2 | | Uint32 | | | -| SchemaVersion | 4 | | Uint32 | 0 | | -| NextOperationLogIndex | 5 | | Uint64 | | | -| DefaultMaxSlots | 6 | | Uint32 | 16 | | -| InstanceId | 7 | | String | | | -| SelfHealEnable | 8 | | Bool | false | | -| DonorModeEnable | 9 | | Bool | true | | -| ScrubPeriodicity | 10 | | Uint32 | 86400*30 | | -| SerialManagementStage | 11 | | Uint32 | | | -| NextStoragePoolId | 12 | | Uint64 | 0 | | -| PDiskSpaceMarginPromille | 13 | | Uint32 | 150 | | -| GroupReserveMin | 14 | | Uint32 | 0 | | -| GroupReservePart | 15 | | Uint32 | 0 | | -| MaxScrubbedDisksAtOnce | 16 | | Uint32 | Max<ui32>() | | -| PDiskSpaceColorBorder | 17 | | Uint32 | NKikimrBlobStorage::TPDiskSpaceColor::GREEN | | - -VDiskMetrics - -| Column | ID | PK | Type | Default | Destination | -| ----------------- | ---- | ---- | -------- | -------------- | ------------ | -| GroupID | 1 | * | Uint32 | | | -| GroupGeneration | 2 | * | Uint32 | | | -| Ring | 3 | * | Uint32 | | | -| FailDomain | 4 | * | Uint32 | | | -| VDisk | 5 | * | Uint32 | | | -| Metrics | 11 | | String | | | - -VSlot - -| Column | ID | PK | Type | Default | Destination | -| --------------------- | ---- | ---- | -------- | ------------------ | ------------ | -| NodeID | 1 | * | Uint32 | | | -| PDiskID | 2 | * | Uint32 | | | -| VSlotID | 3 | * | Uint32 | | | -| Category | 4 | | Uint64 | | | -| GroupID | 5 | | Uint32 | | | -| GroupGeneration | 6 | | Uint32 | | | -| RingIdx | 7 | | Uint32 | | | -| FailDomainIdx | 8 | | Uint32 | | | -| VDiskIdx | 9 | | Uint32 | | | -| GroupPrevGeneration | 10 | | Uint32 | 0 | | -| Mood | 11 | | Uint32 | 0 | | -| LastSeenReady | 12 | | Uint64 | TInstant::Zero() | | - -### Messages via pipe - -### Transaction types - diff --git a/ydb/docs/en/core/concepts/_includes/distributed_storage/intro.md b/ydb/docs/en/core/concepts/_includes/distributed_storage/intro.md deleted file mode 100644 index 9828485727..0000000000 --- a/ydb/docs/en/core/concepts/_includes/distributed_storage/intro.md +++ /dev/null @@ -1,3 +0,0 @@ -# Disk subsystem of a cluster aka YDB BlobStorage - -YDB BlobStorage is a YDB subsystem that is responsible for reliable data storage. diff --git a/ydb/docs/en/core/concepts/_includes/index/intro.md b/ydb/docs/en/core/concepts/_includes/index/intro.md index c0781dae75..6a66cf5a2c 100644 --- a/ydb/docs/en/core/concepts/_includes/index/intro.md +++ b/ydb/docs/en/core/concepts/_includes/index/intro.md @@ -1,10 +1,10 @@ --- -title: YDB. DBMS overview -description: "YDB: is a horizontally scalable distributed fault-tolerant DBMS. YDB is designed to meet high performance requirements. For example, a typical server can handle dozens of thousands of queries per second. The system is designed to handle hundreds of petabytes of data." +title: Yandex Database (YDB). DBMS overview +description: "Yandex Database (YDB): is a horizontally scalable distributed fault-tolerant DBMS. YDB is designed to meet high performance requirements. For example, a typical server can handle dozens of thousands of queries per second. The system is designed to handle hundreds of petabytes of data." --- # {{ ydb-short-name }} overview -*{{ ydb-short-name }}* ({{ ydb-short-name }}) is a horizontally scalable distributed fault-tolerant DBMS. {{ ydb-short-name }} is designed to meet high performance requirements. For example, a typical server can handle dozens of thousands of queries per second. The system is designed to handle hundreds of petabytes of data. {{ ydb-short-name }} can operate in single data center and geo-distributed (cross data center) modes on a cluster of thousands of servers. +*{{ ydb-short-name }}* is a horizontally scalable distributed fault-tolerant DBMS. {{ ydb-short-name }} is designed to meet high performance requirements. For example, a typical server can handle dozens of thousands of queries per second. The system is designed to handle hundreds of petabytes of data. {{ ydb-short-name }} can operate in single data center and geo-distributed (cross data center) modes on a cluster of thousands of servers. {{ ydb-short-name }} provides: @@ -24,5 +24,5 @@ Database commands are mainly written in YQL, an SQL dialect. This gives the user {{ ydb-short-name }} natively supports different processing options, such as [OLTP](https://en.wikipedia.org/wiki/Online_transaction_processing) and [OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing). The current version offers limited analytical query support. This is why we can say that {{ ydb-short-name }} is currently an OLTP database. -{{ ydb-short-name }} is used in Yandex services as a high-performance [OLTP](https://en.wikipedia.org/wiki/Online_transaction_processing) DBMS. {{ yandex-cloud }} services such as Yandex Object Storage and Yandex Block Storage use {{ ydb-short-name }} for storing data and are based on its components. +{{ ydb-short-name }} is used in Yandex services as a high-performance [OLTP](https://en.wikipedia.org/wiki/Online_transaction_processing) DBMS. In particular, {{ yandex-cloud }} {{ objstorage-full-name}} use {{ ydb-short-name }} to store data and are based on its components. diff --git a/ydb/docs/en/core/concepts/_includes/index/when_use.md b/ydb/docs/en/core/concepts/_includes/index/when_use.md index 915fdf4880..a1ee985aad 100644 --- a/ydb/docs/en/core/concepts/_includes/index/when_use.md +++ b/ydb/docs/en/core/concepts/_includes/index/when_use.md @@ -1,4 +1,4 @@ -## Use cases +## Use cases {#use-cases} {{ ydb-short-name }} can be used as an alternative solution in the following cases: @@ -9,4 +9,3 @@ * In systems with unpredictable or seasonally fluctuating load (you can add/reduce computing resources on request and/or in serverless mode). * In high-load systems that shard load across relational DB instances. * When developing a new product that has no reliable forecast of expected load or is natively designed for an expected high load beyond the capabilities of traditional relational databases. - diff --git a/ydb/docs/en/core/concepts/_includes/limits-ydb.md b/ydb/docs/en/core/concepts/_includes/limits-ydb.md index 591a65d3b6..638b55e6d8 100644 --- a/ydb/docs/en/core/concepts/_includes/limits-ydb.md +++ b/ydb/docs/en/core/concepts/_includes/limits-ydb.md @@ -7,21 +7,21 @@ This section describes the parameters of limits set in {{ ydb-short-name }}. The table below shows the limits that apply to schema objects: tables, databases, and columns. The_Object_ column specifies the type of schema object that the limit applies to. The _Error type_ column shows the status that the query ends with if an error occurs. For more information about statuses, see [Error handling in the API](../../reference/ydb-sdk/error_handling.md). -| Object | Limit | Value | Explanation | Internal<br>name | Error<br>type | +| Objects | Limit | Value | Explanation | Internal<br>name | Error<br>type | | :--- | :--- | :--- | :--- | :---: | :---: | -| Database | Maximum path depth | 32 | Maximum number of nested path elements (directories, tables) | MaxDepth | SCHEME_ERROR | -| Database | Maximum number of paths (schema objects) | 200,000 | Maximum number of path elements (directories, tables) in the database | MaxPaths | GENERIC_ERROR | -| Database | Maximum number of tablets | 200,000 | Maximum number of tablets (table shards and system tablets) that can run in the database. An error is returned if a query to create, copy, or update a table exceeds this limit. When the maximum number of tablets in the database is reached, no automatic table sharding is performed | MaxShards | GENERIC_ERROR | -| Database | Maximum object name length | 255 | Limits the number of characters in the name of a schema object, such as a directory or table | MaxPathElementLength | SCHEME_ERROR | -| Database | Maximum ACL size | 10 KB | Maximum total size of all access control rules that can be saved for a single schema object | MaxAclBytesSize | GENERIC_ERROR | -| Directory | Maximum number of objects | 100,000 | Maximum number of tables and child directories created in a directory | MaxChildrenInDir | SCHEME_ERROR | -| Table | Maximum number of table shards | 35,000 | Maximum number of table shards | MaxShardsInPath | GENERIC_ERROR | -| Table | Maximum number of columns | 200 | Limits the total number of columns in a table | MaxTableColumns | GENERIC_ERROR | -| Table | Maximum column name length | 255 | Limits the number of characters in the name of a column | MaxTableColumnNameLength | GENERIC_ERROR | -| Table | Maximum number of columns in a primary key | 20 | Each table must have a primary key. The number of columns in the primary key may not exceed this limit | MaxTableKeyColumns | GENERIC_ERROR | -| Table | Maximum number of indexes | 20 | Maximum number of indexes other than the primary key index that can be created in a table | MaxTableIndices | GENERIC_ERROR | -| Table | Maximum number of followers | 3 | Maximum number of read-only replicas that can be specified when creating a table with followers | MaxFollowersCount | GENERIC_ERROR | -| Table | Maximum number of tables to copy | 1000 | Limit on the size of the list of tables for persistent table copy operations | MaxConsistentCopyTargets | GENERIC_ERROR | +| Database | Maximum path depth | 32 | Maximum number of nested path elements (directories, tables). | MaxDepth | SCHEME_ERROR | +| Database | Maximum number of paths (schema objects) | 200,000 | Maximum number of path elements (directories, tables) in a database. | MaxPaths | GENERIC_ERROR | +| Database | Maximum number of tablets | 200,000 | Maximum number of tablets (table shards and system tablets) that can run in the database. An error is returned if a query to create, copy, or update a table exceeds this limit. When a database reaches the maximum number of tablets, no automatic table sharding takes place. | MaxShards | GENERIC_ERROR | +| Database | Maximum object name length | 255 | Limits the number of characters in the name of a schema object, such as a directory or a table | MaxPathElementLength | SCHEME_ERROR | +| Database | Maximum ACL size | 10 KB | Maximum total size of all access control rules that can be saved for the schema object in question. | MaxAclBytesSize | GENERIC_ERROR | +| Directory | Maximum number of objects | 100,000 | Maximum number of tables and child directories created in a directory. | MaxChildrenInDir | SCHEME_ERROR | +| Table | Maximum number of table shards | 35,000 | Maximum number of table shards. | MaxShardsInPath | GENERIC_ERROR | +| Table | Maximum number of columns | 200 | Limits the total number of columns in a table. | MaxTableColumns | GENERIC_ERROR | +| Table | Maximum column name length | 255 | Limits the number of characters in a column name | MaxTableColumnNameLength | GENERIC_ERROR | +| Table | Maximum number of columns in a primary key | 20 | Each table must have a primary key. The number of columns in the primary key may not exceed this limit. | MaxTableKeyColumns | GENERIC_ERROR | +| Table | Maximum number of indexes | 20 | Maximum number of indexes other than the primary key index that can be created in a table. | MaxTableIndices | GENERIC_ERROR | +| Table | Maximum number of followers | 3 | Maximum number of read-only replicas that can be specified when creating a table with followers. | MaxFollowersCount | GENERIC_ERROR | +| Table | Maximum number of tables to copy | 1000 | Limit on the size of the table list for persistent table copy operations | MaxConsistentCopyTargets | GENERIC_ERROR | ## Size limits for stored data @@ -36,9 +36,8 @@ The table below lists the limits that apply to query execution. The _Call_ colum | Parameter | Value | Call | Explanation | Status<br>in case of<br>a violation<br>of the limit | | :--- | :--- | :--- | :--- | :---: | -| Maximum number of rows in query results | 1000 | ExecuteDataQuery | Complete results of some queries executed using the `ExecuteDataQuery` method may contain more rows than allowed. In this case, the maximum allowed number of rows will be returned in response to the query and the result will have the `truncated` flag | SUCCESS | -| Maximum query result size | 50 MB | ExecuteDataQuery | Complete results of some queries may exceed the set limit. In this case, the query fails and no data is returned | PRECONDITION_FAILED | -| Maximum number of sessions per cluster node | 1000 | CreateSession | Using the library for working with {{ ydb-short-name }}, an application can create sessions within a connection. Sessions are linked to a node. You can create a limited number of sessions with a single node | OVERLOADED | -| Maximum query text length | 10 KB | ExecuteDataQuery | Limit on the length of YQL query text | BAD_REQUEST | -| Maximum size of parameter values | 50 MB | ExecuteDataQuery | Limit on the total size of parameters passed when executing a previously prepared query | BAD_REQUEST | - +| Maximum number of rows in query results | 1000 | ExecuteDataQuery | Complete results of some queries executed using the `ExecuteDataQuery` method may contain more rows than allowed. In this case, the maximum allowed number of rows will be returned in response to the query and the result will have the `truncated` flag. | SUCCESS | +| Maximum query result size | 50 MB | ExecuteDataQuery | Complete results of some queries may exceed the set limit. In this case, a query will fail returning no data. | PRECONDITION_FAILED | +| Maximum number of sessions per cluster node | 1000 | CreateSession | Using the library for working with {{ ydb-short-name }}, an application can create sessions within a connection. Sessions are linked to a node. You can create a limited number of sessions with a single node. | OVERLOADED | +| Maximum query text length | 10 KB | ExecuteDataQuery | Limit on the length of YQL query text. | BAD_REQUEST | +| Maximum size of parameter values | 50 MB | ExecuteDataQuery | Limit on the total size of parameters passed when executing a previously prepared query. | BAD_REQUEST | diff --git a/ydb/docs/en/core/concepts/_includes/scan_query.md b/ydb/docs/en/core/concepts/_includes/scan_query.md index 0114586d1c..a7c187efb5 100644 --- a/ydb/docs/en/core/concepts/_includes/scan_query.md +++ b/ydb/docs/en/core/concepts/_includes/scan_query.md @@ -1,6 +1,6 @@ # Scan queries in {{ ydb-short-name }} -*Scan Queries* is a separate data access interface designed primarily for performing analytical ad hoc queries on a DB. +Scan Queries is a separate data access interface designed primarily for performing analytical ad hoc queries on a DB. This method of executing queries has the following unique features: @@ -30,15 +30,15 @@ Despite the fact that *Scan Queries* obviously don't interfere with the executio {% endnote %} -## How do I use it? +## How do I use it? {#how-use} Like other types of queries, *Scan Queries* are available via the [management console]({{ link-console-main }}) (the query must specify `PRAGMA Kikimr.ScanQuery = "true";`), [CLI](../../reference/ydb-cli/commands/scan-query.md), and [SDK](../../reference/ydb-sdk/index.md). {% if oss %} -### C++ SDK +### C++ SDK {#cpp} -To run a query using *Scan Queries*, use 2 methods from the `Ydb::TTableClient` class. +To run a query using *Scan Queries*, use 2 methods from the `Ydb::TTableClient` class: ```cpp class TTableClient { @@ -53,4 +53,3 @@ class TTableClient { ``` {% endif %} - diff --git a/ydb/docs/en/core/concepts/_includes/secondary_indexes.md b/ydb/docs/en/core/concepts/_includes/secondary_indexes.md index 9674b11680..9e41aec395 100644 --- a/ydb/docs/en/core/concepts/_includes/secondary_indexes.md +++ b/ydb/docs/en/core/concepts/_includes/secondary_indexes.md @@ -67,6 +67,7 @@ Creating an index is an asynchronous operation. If the client-server connection --columns title \ series ``` + * `--endpoint`: DB endpoint. * `--database`: Full DB path. * `-sync|-async`: Index type. @@ -229,4 +230,3 @@ If you don't specify the index type, a synchronous index is created by default. #### What's next For other examples of working with secondary indexes, see the [recommendations](../../best_practices/secondary_indexes.md). - diff --git a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md index a6e18f090e..a64ac12dd0 100644 --- a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md +++ b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md @@ -1,5 +1,5 @@ --- -title: Serverless and Dedicated modes in YDB +title: Serverless and Dedicated modes in Yandex Database description: "YDB databases can be created in two modes Dedicated and Serverless. Dedicated mode of operation assumes that resources for Tablet instances and for executing YQL queries are selected from resources explicitly allocated for the compute database. In the Serverless mode of operation, the YDB infrastructure determines how many computing resources need to be allocated to service the user base." keywords: - ydb @@ -7,6 +7,7 @@ keywords: - dedicated editable: false --- + # Serverless and Dedicated modes {{ ydb-short-name }} You can create and use multiple {{ ydb-short-name }} databases. When creating a database, one of two operating modes is selected for each database: Serverless or Dedicated. The mode can't be changed later. @@ -14,4 +15,3 @@ You can create and use multiple {{ ydb-short-name }} databases. When creating a * _Serverless_: A DB that doesn't require you to configure, administer, or monitor load or manage resources. To create a database, you only need to enter a name, and you'll get the URL for the connection. Payment is charged for the execution of queries and the actual amount of stored data. * _Dedicated_: You determine the computing resources that will be reserved for the database: CPU and RAM on the nodes, the number of nodes, and the storage size. You need to make sure there are sufficient resources to handle the load and add more when necessary. Payment is charged for dedicated resources per hour, regardless of their actual use. - diff --git a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md index c85c91f0dd..88ee85494a 100644 --- a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md +++ b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md @@ -39,4 +39,3 @@ The **Maximum amount of data** limit for a serverless database limits the amount You can change the **Maximum amount of data** limit interactively at any time, both via the graphical console and the CLI and raise or reduce it without limitations. This allows you to quickly adjust it as needed. We don't recommend setting the **Maximum amount of data** limit below the current actual amount because in this state, all data modification operations, including DELETE, become unavailable. You will only be able to reduce the amount of data with the DROP TABLE or DROP INDEX commands. If the limit is accidentally set below the actual volume, we recommend returning it to the operating value exceeding the actual volume with some redundancy. - diff --git a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md index 44803b1f0c..d26360dad4 100644 --- a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md +++ b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md @@ -1,4 +1,4 @@ -## {{ ydb-short-name }} architecture in different operating modes +## {{ ydb-short-name }} architecture in different operating modes {#arch-diff} ### Separate compute and storage layers {#separate-layers} @@ -10,7 +10,7 @@ It should be noted that the concept of a database comprises user tables and, acc ### {{ ydb-short-name }} Dedicated mode {#dedicated} -Dedicated mode assumes that resources for tablet instances and for executing YQL queries are selected from the compute resources explicitly allocated to the database. Compute resources are VMs that have a certain amount of vCPUs and memory. The task of selecting the optimal amount of resources for the DB is currently the user's responsibility. If there aren't enough resources to serve the load, the latency of requests increases, which may eventually lead to the denial of service for requests, such as that with the ```OVERLOADED``` return code. The user can add compute resources (VMs) to the database in the UI or CLI to ensure it has the necessary amount of computing resources. Adding compute resources to the DB is relatively fast and comparable to the time it takes to start a VM. After that, {{ ydb-short-name }} automatically balances tablet instances across the cluster based on the resources added. +Dedicated mode assumes that resources for tablet instances and for executing YQL queries are selected from the compute resources explicitly allocated to the database. Compute resources are VMs that have a certain amount of vCPUs and memory. The task of selecting the optimal amount of resources for the DB is currently the user's responsibility. If there aren't enough resources to serve the load, the latency of requests increases, which may eventually lead to the denial of service for requests, such as that with the `OVERLOADED` return code. The user can add compute resources (VMs) to the database in the UI or CLI to ensure it has the necessary amount of computing resources. Adding compute resources to the DB is relatively fast and comparable to the time it takes to start a VM. After that, {{ ydb-short-name }} automatically balances tablet instances across the cluster based on the resources added. ### {{ ydb-short-name }} Serverless mode {#serverless} diff --git a/ydb/docs/en/core/concepts/_includes/transactions.md b/ydb/docs/en/core/concepts/_includes/transactions.md index 1c662a047d..79ba0eba7c 100644 --- a/ydb/docs/en/core/concepts/_includes/transactions.md +++ b/ydb/docs/en/core/concepts/_includes/transactions.md @@ -2,7 +2,7 @@ This section describes the specifics of YQL implementation for {{ ydb-short-name }} transactions. -## Query language +## Query language {#query-language} The main tool for creating, modifying, and managing data in {{ ydb-short-name }} is a declarative query language called YQL. YQL is an SQL dialect that can be considered a database interaction standard. {{ ydb-short-name }} also supports a set of special RPCs that can be used, for example, to manage a tree schema or cluster. @@ -25,11 +25,11 @@ The constructs implemented in YQL can be divided into two classes: [data definit For more information about supported YQL constructs, see the [YQL documentation](../../yql/reference/index.md). -Listed below are the features and limitations of YQL support in {{ ydb-short-name }}, which might not be obvious at first glance and are worth noting. +Listed below are the features and limitations of YQL support in {{ ydb-short-name }}, which might not be obvious at first glance and are worth noting: * Multi-statement transactions (transactions made up of a sequence of YQL statements) are supported. Transactions may interact with client software, or in other words, client interactions with the database might look as follows: `BEGIN; make a SELECT; analyze the SELECT results on the client side; ...; make an UPDATE; COMMIT`. We should note that if the transaction body is fully formed before accessing the database, it will be processed more efficiently. -* {{ ydb-short-name }} does not support transactions that combine DDL and DML queries. The traditional [ACID](https://en.wikipedia.org/wiki/ACID) transaction paradigm only applies to DML queries, meaning that change data. DDL queries must be idempotent, meaning repeatable if an error occurs. If you need to apply an action to a schema, remember that each action is transactional, while a set of actions is not. -* The version of YQL in {{ ydb-short-name }} uses the [Optimistic Concurrency Control](https://en.wikipedia.org/wiki/Optimistic_concurrency_control) mechanism. Optimistic locking is applied to entities affected during a transaction. When the transaction is complete, the mechanism verifies that the locks have not been invalidated. For the user, locking optimism means that when transactions are competing with one another, the one that finishes first wins. Competing transactions fail with the ```Transaction locks invalidated``` error. +* {{ ydb-short-name }} does not support transactions that combine DDL and DML queries. The conventional notion [ACID]{% if lang == "en" %}(https://en.wikipedia.org/wiki/ACID){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/ACID){% endif %} of a transactions is applicable specifically to DML queries, that is, queries that change data. DDL queries must be idempotent, meaning repeatable if an error occurs. If you need to manipulate a schema, each manipulation is transactional, while a set of manipulations is not. +* The version of YQL in {{ ydb-short-name }} uses the [Optimistic concurrency control](https://en.wikipedia.org/wiki/Optimistic_concurrency_control) mechanism. Optimistic locking is applied to entities affected during a transaction. When the transaction is complete, the mechanism verifies that the locks have not been invalidated. For the user, locking optimism means that when transactions are competing with one another, the one that finishes first wins. Competing transactions fail with the `Transaction locks invalidated` error. * All changes made during the transaction accumulate in the database server memory and are committed when the transaction completes. If the locks are not invalidated, all the changes accumulated are committed atomically, but if at least one lock is invalidated, none of the changes are committed. The above model involves certain restrictions: changes made by a single transaction must fit inside the available memory, and the transaction "doesn't see" its changes. A transaction should be formed in such a way so that the first part of the transaction only reads data, while the second part of the transaction only changes data. The query structure then looks as follows: diff --git a/ydb/docs/en/core/concepts/_includes/ttl.md b/ydb/docs/en/core/concepts/_includes/ttl.md index 301a8ec884..a42166901b 100644 --- a/ydb/docs/en/core/concepts/_includes/ttl.md +++ b/ydb/docs/en/core/concepts/_includes/ttl.md @@ -14,7 +14,7 @@ An item with the `NULL` value in the TTL column is never deleted. The timestamp for deleting a table item is determined by the formula: -``` +```text expiration_time = valueof(ttl_column) + expire_after_seconds ``` @@ -27,7 +27,7 @@ TTL doesn't guarantee that the item will be deleted exactly at `expiration_time` Data is deleted by the *Background Removal Operation* (*BRO*), consisting of two stages: 1. Checking the values in the TTL column. -2. Deleting expired data. +1. Deleting expired data. *The BRO* has the following properties: @@ -43,17 +43,17 @@ Data is deleted by the *Background Removal Operation* (*BRO*), consisting of two ## Limitations {#restrictions} * The TTL column must be of one of the following types: - - `Date` - - `Datetime` - - `Timestamp` - - `Uint32` - - `Uint64` - - `DyNumber` -* The value of the TTL column of the numeric type (`Uint32`, `Uint64`, or `DyNumber`) is interpreted as a value from the [Unix era](https://en.wikipedia.org/wiki/Unix_time) set in: - - Seconds - - Milliseconds - - Microseconds - - Nanoseconds + * `Date` + * `Datetime` + * `Timestamp` + * `Uint32` + * `Uint64` + * `DyNumber` +* The value of the TTL column of the numeric type (`Uint32`, `Uint64`, or `DyNumber`) is interpreted as a value from the [Unix era]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Unix_time){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Unix-время ){% endif %} set in: + * Seconds + * Milliseconds + * Microseconds + * Nanoseconds * You can't specify multiple TTL columns. * You can't delete the TTL column. However, if this is required, you should first [disable TTL](#disable) for the table. @@ -61,9 +61,9 @@ Data is deleted by the *Background Removal Operation* (*BRO*), consisting of two Currently, you can manage TTL settings using: -* [YQL](../../yql/reference/index.md) -* [Console client {{ ydb-short-name }}]{% if audience != "external" %}(https://cloud.yandex.com/en-ru/docs/ydb/quickstart/yql-api/ydb-cli){% else %}(../../quickstart/yql-api/ydb-cli.md){% endif %}. -* {{ ydb-short-name }} {% if oss %}C++ and{% endif %} Python [SDK](../../reference/ydb-sdk/index.md) +* [YQL](../../yql/reference/index.md). +* [{{ ydb-short-name }} console client](../../reference/ydb-cli/index.md). +* {{ ydb-short-name }} {% if oss %}C++ and{% endif %} Python [SDK](../../reference/ydb-sdk/index.md). {% note info %} @@ -241,4 +241,3 @@ The current TTL settings can be obtained from the table description: ``` {% endlist %} - diff --git a/ydb/docs/en/core/concepts/cluster/_assets/Slide_blob.svg b/ydb/docs/en/core/concepts/cluster/_assets/Slide_blob.svg index 502ed357b3..b0ff8b6a77 100644 --- a/ydb/docs/en/core/concepts/cluster/_assets/Slide_blob.svg +++ b/ydb/docs/en/core/concepts/cluster/_assets/Slide_blob.svg @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="691px" height="551px" viewBox="-0.5 -0.5 691 551" content="<mxfile host="drawio.yandex-team.ru" modified="2021-07-15T16:05:40.464Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" etag="HF0g-8VF_2eGPBkH-fRg" version="12.7.0" type="device"><diagram id="LqqcKPgxwdzCRuipa-4Q" name="Page-1">3ZtRc5s4EMc/DTO9h3SQBBg/GidNc3PXyYw7vV7fFKMYWox8shzb/fQnjADDUocktpH74qBFYPhp/9LuKrbIeL65FXQR/c1DlljYDjcWubYwxraH1Z/Mss0tCA2d3DITcahtlWES/2TaaGvrKg7ZstZRcp7IeFE3Tnmasqms2agQfF3v9siT+rcu6IwBw2RKE2j9Jw5llFt9PKjsH1k8i4pvRt4wPzOnRWf9JsuIhny9ZyI3FhkLzmV+NN+MWZLRK7jk1334xdnywQRLZZcLxt6Hb1+Cu/8E+7ZBn/5EH++/Ply5bn6bJ5qs9Bvrp5XbAoHgqzRk2V1siwTrKJZssqDT7OxajbqyRXKeqBZSh488lXoUka/aNIlnqWok7FE9ZQAfWr/HExOSbfZM+iVuGZ8zKbaqiz5LNE/tUaTwlHU1PG7BPNobGmJrI9UuMStvXVFTBxrcSyAOnofIQuVWusmFjPiMpzS5qaxBHXPV5y/OFxrudyblVtOlK8kPo1eIxfZrdr/3btH8V99+17je1Fpb3frlGC35SkzZARCFQKmYMdnB6zIoB4dcsITK+Kmuxbbx05fe81g9c+kq2K77Cm66QP6k+qqGF5SP8XrHQMAvPtOHhMm78G0iO4KKkFdH40MV+S0ick6lIYcYoaHzawZ31Awankkz/us0MxKCbve6LbIOy+7fgwaN5avRH9nuof7qIH+CowoYA6ccR1QFGknv+i2VaIp+OwQSv6V+SUf94jOtecQ7j37B95DD+iUN/Tb6n0a/cFG5ZSkTii9Pe5cwwYZJGMCaSLboHZNjm4UJTnRjzn/ErH9QvlmgPAAqSPjDburuG5VrWPQLE8h7KkxIEzzDwgwfgAKIlhFdZIfTlUi2gaDTH9m6/ByrCmzekvkaQa6vhgfjgxfIs1G4uEIOhNlWuCid9eg0h60KbXE79Yqyzquo60wVECaUIQMRT2ky0ifmcRjmMR1bxj+ztFc7rQ4s1H3dwHKvs3upMG6pCxdHYo0ayYLbUiRqQY1PRbooUu2h9pyLx4z8OmYPUiZnpQwLLv7FQ8YD+znIbbPG6SDDpJjAWfjSKBPHMFeGqctvQNnBhlGGOQ++/GnZtQ2jDMPbbF6232Hvj8uHPXgW9nkjDRgiX75He6atgTBy/pxv7UwkF3TG7tJHDqi/KHlr8pdZBfQoc3DdX8sq1B5L1ArTPxVNbMb+aVU7rlWO3+Oyknz8zR+N1JjqMSYN7xg0Bv3EO6YY5knljktRB+yzbtSg05JWIrtFOyerh2CY8VS8kHG8hr3zgslLxQvOOj3zKktG/fGCaUjF65NpvNz+9Qh3B3RgoLEZHBg0IwOna2SAThYZEDN2ld+wwA87LvDEOfYC/zY/hgGubd1gyx9aI2fGUgt7dJ75XZLlEaj/lRlMnb1PBQTWFm4VlUW2MFflpj73C4lxyMxIBF4vd9I1nieeUXInMOxGh/SO+/desPbbvXsv3PAuBO86BPcfjTcFbwAyuMxcmOC7/ssz8c0SPMwbM1HXFG+awPtfnmBp1ewVvX9kbss/bCgYo91nYO8+0e4z2H26lmLh52dHuk+T6lmL180fVRxjlJpVkZY8a9gySOTlg6Sa1Q+M8hpd9TstcvM/</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="0" y="250" width="520" height="300" fill="#ffffff" stroke="#000000" pointer-events="all"/><path d="M 170 60 L 170 155 L 260 155 L 260 243.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 260 248.88 L 256.5 241.88 L 260 243.63 L 263.5 241.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="130" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 131px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TabletId</div></div></div></foreignObject><text x="170" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TabletId</text></switch></g><path d="M 250 60 L 250 110 L 75 110 L 75 253.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 75 258.88 L 71.5 251.88 L 75 253.63 L 78.5 251.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="210" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 211px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel</div></div></div></foreignObject><text x="250" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel</text></switch></g><path d="M 330 60 L 330 170 L 275 170 L 275 353.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 275 358.88 L 271.5 351.88 L 275 353.63 L 278.5 351.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="290" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 291px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Generation</div></div></div></foreignObject><text x="330" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Generation</text></switch></g><rect x="370" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 371px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Step</div></div></div></foreignObject><text x="410" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Step</text></switch></g><rect x="450" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 451px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Cookie</div></div></div></foreignObject><text x="490" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Cookie</text></switch></g><rect x="530" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 531px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">BlobSize</div></div></div></foreignObject><text x="570" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobSize</text></switch></g><rect x="610" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 611px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PartId</div></div></div></foreignObject><text x="650" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PartId</text></switch></g><path d="M 420 -200 L 415 -200 Q 410 -200 410 -190 L 410 70 Q 410 80 405 80 L 402.5 80 Q 400 80 405 80 L 407.5 80 Q 410 80 410 90 L 410 350 Q 410 360 415 360 L 420 360" fill="none" stroke="#000000" stroke-miterlimit="10" transform="rotate(-90,410,80)" pointer-events="all"/><rect x="385" y="90" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 100px; margin-left: 410px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">BlobId</div></div></div></foreignObject><text x="410" y="104" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobId</text></switch></g><rect x="155" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 170px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">64</div></div></div></foreignObject><text x="170" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">64</text></switch></g><rect x="240" y="0" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 250px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">8</div></div></div></foreignObject><text x="250" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">8</text></switch></g><rect x="315" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 330px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">32</div></div></div></foreignObject><text x="330" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">32</text></switch></g><rect x="395" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 410px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">32</div></div></div></foreignObject><text x="410" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">32</text></switch></g><rect x="475" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 490px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">24</div></div></div></foreignObject><text x="490" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">24</text></switch></g><rect x="545" y="0" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 570px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">28 (26)</div></div></div></foreignObject><text x="570" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">28 (26)</text></switch></g><rect x="640" y="0" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 650px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">4</div></div></div></foreignObject><text x="650" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">4</text></switch></g><rect x="15" y="260" width="120" height="280" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 267px; margin-left: 16px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TTabletStorageInfo</div></div></div></foreignObject><text x="75" y="279" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TTabletStorageInfo</text></switch></g><path d="M 125 310 L 170 310 L 170 405 L 208.63 405" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 213.88 405 L 206.88 408.5 L 208.63 405 L 206.88 401.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="25" y="290" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 310px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 0</div></div></div></foreignObject><text x="75" y="314" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 0</text></switch></g><rect x="25" y="330" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 350px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 1</div></div></div></foreignObject><text x="75" y="354" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 1</text></switch></g><rect x="25" y="370" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 390px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 2</div></div></div></foreignObject><text x="75" y="394" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 2</text></switch></g><rect x="25" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel N</div></div></div></foreignObject><text x="75" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel N</text></switch></g><rect x="215" y="360" width="120" height="180" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 367px; margin-left: 216px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TTabletChannelInfo</div></div></div></foreignObject><text x="275" y="379" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TTabletChannelInfo</text></switch></g><path d="M 325 410 L 398.63 410" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 410 L 396.88 413.5 L 398.63 410 L 396.88 406.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="390" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 410px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">0≤gen<10</div></div></div></foreignObject><text x="275" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">0≤gen<10</text></switch></g><rect x="405" y="390" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 410px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 12345</div></div></div></foreignObject><text x="455" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 12345</text></switch></g><path d="M 325 460 L 398.63 460" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 460 L 396.88 463.5 L 398.63 460 L 396.88 456.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="440" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 460px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">10≤gen<125</div></div></div></foreignObject><text x="275" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">10≤gen<125</text></switch></g><rect x="405" y="440" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 460px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 54321</div></div></div></foreignObject><text x="455" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 54321</text></switch></g><path d="M 325 510 L 398.63 510" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 510 L 396.88 513.5 L 398.63 510 L 396.88 506.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">125≤gen</div></div></div></foreignObject><text x="275" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">125≤gen</text></switch></g><rect x="405" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 12345</div></div></div></foreignObject><text x="455" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 12345</text></switch></g><rect x="425" y="260" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 275px; margin-left: 470px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 18px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Tablet</div></div></div></foreignObject><text x="470" y="280" fill="#000000" font-family="Helvetica" font-size="18px" text-anchor="middle">Tablet</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="691px" height="551px" viewBox="-0.5 -0.5 691 551" content="<mxfile host="drawio.yandex-team.ru" modified="2021-07-15T16:05:40.464Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" etag="HF0g-8VF_2eGPBkH-fRg" version="12.7.0" type="device"><diagram id="LqqcKPgxwdzCRuipa-4Q" name="Page-1">3ZtRc5s4EMc/DTO9h3SQBBg/GidNc3PXyYw7vV7fFKMYWox8shzb/fQnjADDUocktpH74qBFYPhp/9LuKrbIeL65FXQR/c1DlljYDjcWubYwxraH1Z/Mss0tCA2d3DITcahtlWES/2TaaGvrKg7ZstZRcp7IeFE3Tnmasqms2agQfF3v9siT+rcu6IwBw2RKE2j9Jw5llFt9PKjsH1k8i4pvRt4wPzOnRWf9JsuIhny9ZyI3FhkLzmV+NN+MWZLRK7jk1334xdnywQRLZZcLxt6Hb1+Cu/8E+7ZBn/5EH++/Ply5bn6bJ5qs9Bvrp5XbAoHgqzRk2V1siwTrKJZssqDT7OxajbqyRXKeqBZSh488lXoUka/aNIlnqWok7FE9ZQAfWr/HExOSbfZM+iVuGZ8zKbaqiz5LNE/tUaTwlHU1PG7BPNobGmJrI9UuMStvXVFTBxrcSyAOnofIQuVWusmFjPiMpzS5qaxBHXPV5y/OFxrudyblVtOlK8kPo1eIxfZrdr/3btH8V99+17je1Fpb3frlGC35SkzZARCFQKmYMdnB6zIoB4dcsITK+Kmuxbbx05fe81g9c+kq2K77Cm66QP6k+qqGF5SP8XrHQMAvPtOHhMm78G0iO4KKkFdH40MV+S0ick6lIYcYoaHzawZ31Awankkz/us0MxKCbve6LbIOy+7fgwaN5avRH9nuof7qIH+CowoYA6ccR1QFGknv+i2VaIp+OwQSv6V+SUf94jOtecQ7j37B95DD+iUN/Tb6n0a/cFG5ZSkTii9Pe5cwwYZJGMCaSLboHZNjm4UJTnRjzn/ErH9QvlmgPAAqSPjDburuG5VrWPQLE8h7KkxIEzzDwgwfgAKIlhFdZIfTlUi2gaDTH9m6/ByrCmzekvkaQa6vhgfjgxfIs1G4uEIOhNlWuCid9eg0h60KbXE79Yqyzquo60wVECaUIQMRT2ky0ifmcRjmMR1bxj+ztFc7rQ4s1H3dwHKvs3upMG6pCxdHYo0ayYLbUiRqQY1PRbooUu2h9pyLx4z8OmYPUiZnpQwLLv7FQ8YD+znIbbPG6SDDpJjAWfjSKBPHMFeGqctvQNnBhlGGOQ++/GnZtQ2jDMPbbF6232Hvj8uHPXgW9nkjDRgiX75He6atgTBy/pxv7UwkF3TG7tJHDqi/KHlr8pdZBfQoc3DdX8sq1B5L1ArTPxVNbMb+aVU7rlWO3+Oyknz8zR+N1JjqMSYN7xg0Bv3EO6YY5knljktRB+yzbtSg05JWIrtFOyerh2CY8VS8kHG8hr3zgslLxQvOOj3zKktG/fGCaUjF65NpvNz+9Qh3B3RgoLEZHBg0IwOna2SAThYZEDN2ld+wwA87LvDEOfYC/zY/hgGubd1gyx9aI2fGUgt7dJ75XZLlEaj/lRlMnb1PBQTWFm4VlUW2MFflpj73C4lxyMxIBF4vd9I1nieeUXInMOxGh/SO+/desPbbvXsv3PAuBO86BPcfjTcFbwAyuMxcmOC7/ssz8c0SPMwbM1HXFG+awPtfnmBp1ewVvX9kbss/bCgYo91nYO8+0e4z2H26lmLh52dHuk+T6lmL180fVRxjlJpVkZY8a9gySOTlg6Sa1Q+M8hpd9TstcvM/</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="0" y="250" width="520" height="300" fill="#ffffff" stroke="#000000" pointer-events="all"/><path d="M 170 60 L 170 155 L 260 155 L 260 243.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 260 248.88 L 256.5 241.88 L 260 243.63 L 263.5 241.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="130" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 131px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TabletId</div></div></div></foreignObject><text x="170" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TabletId</text></switch></g><path d="M 250 60 L 250 110 L 75 110 L 75 253.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 75 258.88 L 71.5 251.88 L 75 253.63 L 78.5 251.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="210" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 211px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel</div></div></div></foreignObject><text x="250" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel</text></switch></g><path d="M 330 60 L 330 170 L 275 170 L 275 353.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 275 358.88 L 271.5 351.88 L 275 353.63 L 278.5 351.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="290" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 291px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Generation</div></div></div></foreignObject><text x="330" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Generation</text></switch></g><rect x="370" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 371px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Step</div></div></div></foreignObject><text x="410" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Step</text></switch></g><rect x="450" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 451px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Cookie</div></div></div></foreignObject><text x="490" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Cookie</text></switch></g><rect x="530" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 531px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">BlobSize</div></div></div></foreignObject><text x="570" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobSize</text></switch></g><rect x="610" y="20" width="80" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 40px; margin-left: 611px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PartId</div></div></div></foreignObject><text x="650" y="44" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PartId</text></switch></g><path d="M 420 -200 L 415 -200 Q 410 -200 410 -190 L 410 70 Q 410 80 405 80 L 402.5 80 Q 400 80 405 80 L 407.5 80 Q 410 80 410 90 L 410 350 Q 410 360 415 360 L 420 360" fill="none" stroke="#000000" stroke-miterlimit="10" transform="rotate(-90,410,80)" pointer-events="all"/><rect x="385" y="90" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 100px; margin-left: 410px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">BlobId</div></div></div></foreignObject><text x="410" y="104" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">BlobId</text></switch></g><rect x="155" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 170px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">64</div></div></div></foreignObject><text x="170" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">64</text></switch></g><rect x="240" y="0" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 250px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">8</div></div></div></foreignObject><text x="250" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">8</text></switch></g><rect x="315" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 330px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">32</div></div></div></foreignObject><text x="330" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">32</text></switch></g><rect x="395" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 410px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">32</div></div></div></foreignObject><text x="410" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">32</text></switch></g><rect x="475" y="0" width="30" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 490px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">24</div></div></div></foreignObject><text x="490" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">24</text></switch></g><rect x="545" y="0" width="50" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 570px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">28 (26)</div></div></div></foreignObject><text x="570" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">28 (26)</text></switch></g><rect x="640" y="0" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 650px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">4</div></div></div></foreignObject><text x="650" y="14" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">4</text></switch></g><rect x="15" y="260" width="120" height="280" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 267px; margin-left: 16px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TTabletStorageInfo</div></div></div></foreignObject><text x="75" y="279" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TTabletStorageInfo</text></switch></g><path d="M 125 310 L 170 310 L 170 405 L 208.63 405" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 213.88 405 L 206.88 408.5 L 208.63 405 L 206.88 401.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="25" y="290" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 310px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 0</div></div></div></foreignObject><text x="75" y="314" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 0</text></switch></g><rect x="25" y="330" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 350px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 1</div></div></div></foreignObject><text x="75" y="354" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 1</text></switch></g><rect x="25" y="370" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 390px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel 2</div></div></div></foreignObject><text x="75" y="394" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel 2</text></switch></g><rect x="25" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 26px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Channel N</div></div></div></foreignObject><text x="75" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Channel N</text></switch></g><rect x="215" y="360" width="120" height="180" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 367px; margin-left: 216px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">TTabletChannelInfo</div></div></div></foreignObject><text x="275" y="379" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">TTabletChannelInfo</text></switch></g><path d="M 325 410 L 398.63 410" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 410 L 396.88 413.5 L 398.63 410 L 396.88 406.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="390" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 410px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">0≤gen<10</div></div></div></foreignObject><text x="275" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">0≤gen<10</text></switch></g><rect x="405" y="390" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 410px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 12345</div></div></div></foreignObject><text x="455" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 12345</text></switch></g><path d="M 325 460 L 398.63 460" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 460 L 396.88 463.5 L 398.63 460 L 396.88 456.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="440" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 460px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">10≤gen<125</div></div></div></foreignObject><text x="275" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">10≤gen<125</text></switch></g><rect x="405" y="440" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 460px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 54321</div></div></div></foreignObject><text x="455" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 54321</text></switch></g><path d="M 325 510 L 398.63 510" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 403.88 510 L 396.88 513.5 L 398.63 510 L 396.88 506.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="225" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 226px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">125≤gen</div></div></div></foreignObject><text x="275" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">125≤gen</text></switch></g><rect x="405" y="490" width="100" height="40" fill="#ffffff" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 510px; margin-left: 406px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Group 12345</div></div></div></foreignObject><text x="455" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Group 12345</text></switch></g><rect x="425" y="260" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 275px; margin-left: 470px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 18px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Таблетка</div></div></div></foreignObject><text x="470" y="280" fill="#000000" font-family="Helvetica" font-size="18px" text-anchor="middle">Таблетка</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/intro.md b/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/intro.md index a00da63b70..d3d6cd7701 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/intro.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/intro.md @@ -3,4 +3,3 @@ An approximate general {{ ydb-short-name }} schema is shown below. ![General schema](../../_assets/BS_overview.svg) - diff --git a/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/nodes.md b/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/nodes.md index 684a8f7b36..3ecbfb22b3 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/nodes.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/nodes.md @@ -1,12 +1,11 @@ -## Nodes +## Nodes {#nodes} -One {{ ydb-short-name }} installation consists of a *cluster* that is divided into *nodes*. A node is a single process in the system, usually kikimr. This node is part of a cluster and can exchange data with its other nodes via *Interconnect*. Each *node* has its own ID which is usually named NodeId. NodeID is an integer from 1, consisting of 20 bits. NodeID 0 is reserved for internal needs and usually indicates the current node or no node. +One {{ ydb-short-name }} installation consists of a *cluster* that is divided into *nodes*. A node is a single process in the system, usually kikimr. This node is part of a cluster and can exchange data with its other nodes via *Interconnect*. Each *node* has its own ID which is usually named NodeId. NodeID is a 20-bit integer equal to or greater than 1. NodeID 0 is reserved for internal needs and usually indicates the current node or no node. A number of services are run on each node and implemented via *actors*. Nodes can be static and dynamic. -A configuration of static nodes, that is, their complete list with the address for connecting via Interconnect specified, is stored in a configuration file and is read once when the process is started. A set of static nodes changes very rarely. This usually happens when expanding clusters or moving nodes from one physical machine to another. To change the set of static nodes, apply the updated configuration to **every** node and then perform a rolling restart of the entire cluster. - -Dynamic nodes are not known in advance and are added to the system as new processes are started. This may be due, for example, to the creation of new tenants in {{ ydb-short-name }} installations as a database. When registering a dynamic node, its process first connects to one of the static nodes via gRPC, transmits information about itself through a special service called Node Broker, and receives the NodeID to log in with in response. The mechanism for assigning nodes is pretty much similar to the DHCP in the context of distributing IP addresses. +A configuration of static nodes, that is, their complete list with the address for connecting via Interconnect specified, is stored in a configuration file and is read once when the process is started. A set of static nodes changes very rarely. This usually happens when expanding clusters or moving nodes from one physical machine to another. To change a set of static nodes, you must apply the updated configuration to **every** node and then perform a rolling restart of the entire cluster. +Dynamic nodes are not known in advance and are added to the system as new processes are started. This may be due, for example, to the creation of new tenants in {{ ydb-short-name }} installations as a database. When a dynamic node is registered, its process first connects to one of the static nodes via gRPC, transmits information about itself through a special service called Node Broker, and receives a NodeID to use to log into the system. The mechanism for assigning nodes is pretty much similar to the DHCP in the context of distributing IP addresses. diff --git a/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/tablets.md b/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/tablets.md index 9842fa66e5..1e8e2eaf0c 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/tablets.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/common_scheme_ydb/tablets.md @@ -1,6 +1,6 @@ -## Tablets +## Tablets {#tablets} -Special microservices called *tablets* are run on each node. Each tablet has a specific type and ID and is a singleton, meaning that only one tablet with a specific ID can be running in the entire cluster at any given time. A tablet can be started on any node that is suitable for it. An important characteristic of a tablet is its *generation* that increases with each subsequent run. Please note that due to the distributed nature of the system and in case of various kinds of issues, such as with network partitioning, a situation may arise when the same tablet will actually be running on two different nodes at the same time. However, BlobStorage guarantees that only one of them will be able to successfully complete operations that change its state and the generation that each successful operation is performed in will not decrease over time. +Special microservices called *tablets* are run on each node. Each tablet has a specific type and ID and is a singleton meaning that only one tablet with a specific ID can be running in the entire cluster at any given time. A tablet can launch on any suitable node. *Generation* is an important property of a tablet that increases with each subsequent launch. Please note that the distributed nature of the system and various kinds of issues, such as problems with network partitioning, may result in a situation whereby the same tablet will actually be running on two different nodes at the same time. However, BlobStorage guarantees that only one of them will be able successfully to complete operations that change its state and that the generation that each successful operation runs in will not decrease over time. You can find out on what node the tablet in the current generation is running through the *StateStorage* service. To send messages to tablets, use a special set of libraries named *tablet pipe*. With it, knowing the ID of the target tablet, you can easily send the desired message to it. @@ -8,31 +8,30 @@ A tablet can be divided into two parts: the basic tablet and the user logic. The basic tablet is a set of tables, each of which may consist of one or more key columns of an arbitrary type and a set of data columns. Each table may have its own schema. In addition, tables can be created and deleted while the tablet is running. The interface of the basic tablet lets you perform read and update operations on these tables. -The user logic is located between the basic tablet and the user and lets you process specific requests for this type of tablet, reliably saving changes in BlobStorage. A commonly used template for tablet operation is storing all data in memory, reading it only at the start, and synchronously changing the data in memory and in storage after a successful commit. +User logic is located between the basic tablet and the user and lets you process specific requests for this type of tablet reliably saving changes to BlobStorage. A running tablet commonly uses a template that stores all data in memory reading it only at the start, and synchronously changes the data in memory and in storage after a successful commit. -### How does a tablet store data and what data is it? +### How does a tablet store data and what are they like? {#storage} -The basic tablet is an LSM tree that contains all of its table data. One level below the basic tablet is BlobStorage that, roughly speaking, is KeyValue storage that stores binary large objects (blobs). *BLOB* is a binary fragment from 1 byte to 10 MB in size, which has a fixed ID (that is usually called *BlobId* and is of the TLogoBlobID type) and contains related data. Storage is immutable, meaning that only one value corresponds to each ID and it cannot change over time. You can write and read a blob and then delete it when you no longer need it. +A basic tablet is an LSM tree that holds all of its table data. One level below the basic tablet is BlobStorage that, roughly speaking, is KeyValue storage that stores binary large objects (blobs). *BLOB* is a binary fragment from 1 byte to 10 MB in size, which has a fixed ID (that is usually called *BlobId* and is of the TLogoBlobID type) and contains related data. Storage is immutable, meaning that only one value corresponds to each ID and it cannot change over time. You can write and read a blob and then delete it when you no longer need it. To learn more about blobs and distributed storages, see [here](../../distributed_storage.md). -For BlobStorage, blobs are an opaque entity. A tablet can store several types of blobs. The most frequently written blob is a log blob (meaning a recovery log). A tablet's log is arranged in a list of blobs, each of which contains information about the change being made to the tables. When run, the tablet finds the last blob in the log and then recursively reads all related blobs following the links. The log may also mention snapshot blobs, which is a type of blobs that contain data from multiple log blobs after merging them (the merge operation in the LSM tree). +For BlobStorage, blobs are an opaque entity. A tablet can store several types of blobs. The most frequently written blob is a (recovery) log blob. A tablet's log is arranged in a list of blobs, each of which contains information about the change being made to the tables. When run, the tablet finds the last blob in the log and then recursively reads all related blobs following the links. The log may also mention snapshot blobs, which are a type of blob that contain data from multiple log blobs after a merge (the merge operation in the LSM tree). The tablet writes blobs of different types to different *channels*. A channel specifies the branch of storage to store blobs in and performs various functions, such as: -1. Choosing the storage type (different channels can be linked to different types of storage devices: SSD, HDD, or NVME). -2. Load balancing, because each channel has a limit on IOPS, available space and bandwidth. -3. Specifying the data type. When restoring the log, only the blobs from the null channel are read, which lets you distinguish them from other blobs. +1. Selecting a storage type (different channels may be linked to different types of storage devices: SSD, HDD, or NVME). +1. Load balancing, because each channel has a limit on IOPS, available space and bandwidth. +1. Specifying the data type. When restoring the log, only the blobs from the null channel are read, which lets you distinguish them from other blobs. -### Tablet channel history +### Tablet channel history {#history} -As mentioned above, each group has a fixed amount of data that can fit into it and also divides the bandwidth by throughput and the number of operations per second between all consumers. The load on tablets may vary. As a result a group may become overloaded. In this regard, the concept of history is introduced, with which, for each tablet, knowing a blob's Channel and Generation, you can determine the group that this blob is written to. +As mentioned previously, each group has a constant amount of data that fits into it and shares the bandwidth's throughput and number of operations per second out to all consumers. The load on tablets may vary. As a result a group may become overloaded. In this regard, the concept of history is introduced, with which, for each tablet, knowing a blob's Channel and Generation, you can determine the group that this blob is written to. This mechanism works as follows: ![Channel history](../../_assets/Slide_blob.svg) -For each channel, the TTabletStorageInfo structure contains the TTabletChannelInfo substructure with generation ranges and the group number corresponding to each range. The ranges are strictly adjacent to each other, the last range is open. Group numbers may overlap in different ranges and even across different channels: this is not prohibited and is quite common. - -When writing a blob, a tablet selects the most recent range for the corresponding channel, since the write operation is always performed on behalf of the current generation of the tablet. When reading a blob, the group number is fetched based on the BlobId.Generation of the blob being read. +For each channel, the TTabletStorageInfo structure contains the TTabletChannelInfo substructure with generation ranges and the group number corresponding to each range. The ranges are strictly adjacent to each other, the last range is open. Group numbers may overlap in different ranges and even across different channels: this is legal and quite common. +When writing a blob, a tablet selects the most recent range for the corresponding channel since a write is always performed on behalf of a tablet's current generation. When reading a blob, the group number is fetched based on the BlobId.Generation of the blob being read. diff --git a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/detailed_distributed_storage.md b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/detailed_distributed_storage.md index 38d25100d2..5ab8faaddd 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/detailed_distributed_storage.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/detailed_distributed_storage.md @@ -37,12 +37,12 @@ All information stored in BS_CONTROLLER can be grouped into: 1. BS_CONTROLLER settings. -2. Low-level configuration (PDisks, VDisks, and groups). -3. Top-level configuration (Boxes and StoragePools). -4. Runtime information (persistent disk and group metrics, the status of scrubbing of individual VDisks, information about node drive serial numbers). -5. OperationLogs. +1. Low-level configuration (PDisks, VDisks, and groups). +1. Top-level configuration (Boxes and StoragePools). +1. Runtime information (persistent disk and group metrics, the status of scrubbing of individual VDisks, information about node drive serial numbers). +1. OperationLogs. -The operation logic is built so that all table data at the start of the BS_CONTROLLER tablet is loaded into memory and stored there for the entire time of its operation (with the exception of OperationLog). When executing transactions, the data is updated in tables and in memory. +The functional logic is built to load all table data (with the exception of OperationLog) into memory when the BS_CONTROLLER tablet starts and to keep them there for the entire time it is up. When executing transactions, the data is updated in tables and in memory. The tables are discussed in more detail below. @@ -354,4 +354,3 @@ VSlot ### Messages via pipe ### Transaction types - diff --git a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface.md b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface.md index 3dde12875d..98aadd8cb7 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface.md @@ -6,26 +6,26 @@ Each blob has a 192-bit ID consisting of the following fields (in the order used 1. TabletId (64 bits): ID of the blob owner tablet. 2. Channel (8 bits): Channel sequence number. -3. Generation (32 bits): Number of the generation in which the tablet that wrote this blob was run. -4. Step (32 bits): Internal number of the blob group within the Generation. -5. Cookie (24 bits): ID that can be used if the Step is insufficient. -6. CrcMode (2 bits): Selects mode for redundant blob integrity control at the BlobStorage level. +3. Generation (32 bits): Generation in which the tablet that captured this blob was run. +4. Step (32 bits): Blob group internal ID within Generation. +5. Cookie (24 bits): ID to use if Step is insufficient. +6. CrcMode (2 bits): Selects a mode for redundant blob integrity verification at the BlobStorage level. 7. BlobSize (26 bits): Blob data size. -8. PartId (4 bits): Part number when blob erasure coding is used. At the "BlobStorage <-> tablet" interaction level, this parameter is always 0, meaning the entire blob. +8. PartId (4 bits): Fragment number when using blob erasure coding. At the "BlobStorage <-> tablet" communication level, this parameter is always 0 referring to the entire blob. Two blobs are considered different if at least one of the first five parameters (TabletId, Channel, Generation, Step, or Cookie) differs in their IDs. So it is impossible to write two blobs that only differ in BlobSize and/or CrcMode. For debugging purposes, there is string blob ID formatting that has interactions `[TabletId:Generation:Step:Channel:Cookie:BlobSize:PartId]`, for example, `[12345:1:1:0:0:1000:0]`. -When writing a blob, the tablet selects the Channel, Step, and Cookie parameters. The TabletId is fixed and must indicate the tablet performing the write operation, while the Generation parameter must indicate the generation that the tablet performing the operation is running in. +When writing a blob, the tablet selects the Channel, Step, and Cookie parameters. TabletId is fixed and must point to the tablet performing the write operation, while Generation must indicate the generation that the tablet performing the operation is running in. When performing reads, the blob ID is specified, which can be arbitrary, but preferably preset. ### Groups -Blobs are written in a logical entity called *group*. On each node, a special actor called DS proxy is created for each group that the blob is written to. This actor is responsible for performing all operations related to the group. The actor is created automatically through the NodeWarden service that will be described below. +Blobs are written in a logical entity called *group*. A special actor called DS proxy is created on every node for each group that is written to. This actor is responsible for performing all operations related to the group. The actor is created automatically through the NodeWarden service that will be described below. -Physically, a group is a set of multiple physical devices (OS block devices) that are located on different nodes so that the failure of one device correlates as little as possible with the failure of another device. These devices are usually located in different racks or different datacenters. On each of these devices, some space is allocated for the group, which is managed by a special service called *VDisk*. Each VDisk runs on top of a block device from which it is separated by another service called *PDisk*. Blobs are broken into fragments based on *erasure coding* with these fragments written to VDisks. Before splitting into fragments, optional encryption of the data in the group can be performed. +Physically, a group is a set of multiple physical devices (OS block devices) that are located on different nodes so that the failure of one device correlates as little as possible with the failure of another device. These devices are usually located in different racks or different datacenters. On each of these devices, some space is allocated for the group, which is managed by a special service called *VDisk*. Each VDisk runs on top of a block storage device from which it is separated by another service called *PDisk*. Blobs are broken into fragments based on *erasure coding* with these fragments written to VDisks. Before splitting into fragments, optional encryption of the data in the group can be performed. This scheme is shown in the figure below. @@ -37,38 +37,37 @@ A group can be treated as a set of VDisks: ![Group](../../_assets/Slide_group_content.svg) -Each VDisk within the group has a sequence number, the disks are numbered from 0 to N-1, where N is the number of disks in the group. +Each VDisk within a group has a sequence number, and disks are numbered 0 to N-1, where N is the number of disks in the group. -In addition, the group disks are combined into fail domains, while the fail domains are combined into fail realms. As a rule, each fail domain has exactly one disk inside (although, in theory, it may have more, but this has found no application in practice), and multiple fail realms are only used for groups that host their data in three datacenters at once. In addition to the sequence number in the group, each VDisk is assigned an ID that consists of a fail realm index, fail domain index inside the fail realm, and the VDisk index inside the fail domain. In string form, this ID is written as `VDISK[GroupId:GroupGeneration:FailRealm:FailDomain:VDisk]`. +In addition, disks are combined into fail domains, and fail domains are combined into fail realms. As a rule, each fail domain comprises exactly one disk (although, in theory, it may have more but this has found no practical application), and multiple fail realms are only used for groups that host their data in three datacenters at once. Thus, in addition to a group sequence number, each VDisk is assigned an ID that consists of a fail realm index, the index that a fail domain has in a fail realm, and the index that a VDisk has in the fail domain. In string form, this ID is written as `VDISK[GroupId:GroupGeneration:FailRealm:FailDomain:VDisk]`. -All the fail realms have the same number of fail domains and all the fail domains have the same number of disks inside. The number of the fail realms, the number of the fail domains inside the fail realm, and the number of the disks inside the fail domain make up the geometry of the group. The geometry depends on the way the data is encoded in the group. For example, for block-4-2 numFailRealms = 1, numFailDomainsInFailRealm >= 8 (only 8 fail realms are used in practice), numVDisksInFailDomain >= 1 (strictly 1 fail domain is used in practice). For mirror-3-dc numFailRealms >= 3, numFailDomainsInFailRealm >= 3, and numVDisksInFailDomain >= 1 (3x3x1 are used). +All fail realms have the same number of fail domains, and all fail domains include the same number of disks. The number of the fail realms, the number of the fail domains inside the fail realm, and the number of the disks inside the fail domain make up the geometry of the group. The geometry depends on the way the data is encoded in the group. For example, for block-4-2 numFailRealms = 1, numFailDomainsInFailRealm >= 8 (only 8 fail realms are used in practice), numVDisksInFailDomain >= 1 (strictly 1 fail domain is used in practice). For mirror-3-dc numFailRealms >= 3, numFailDomainsInFailRealm >= 3, and numVDisksInFailDomain >= 1 (3x3x1 are used). Each PDisk has an ID that consists of the number of the node that it is running on and the internal number of the PDisk inside this node. This ID is usually written as NodeId:PDiskId. For example, 1:1000. If you know the PDisk ID, you can calculate the service ActorId of this disk and send it a message. -Each VDisk runs on top of a specific PDisk and has a *slot ID* consisting of three fields (NodeID:PDiskId:VSlotId) and the above-mentioned VDisk ID. Strictly speaking, there are different concepts: a slot is the space reserved on the PDisk and occupied by the VDisk, and the VDisk is a group component that occupies a certain slot and performs operations on it. Similarly to PDisks, if you know the slot ID, you can calculate the service ActorId of the running VDisk and send it a message. To send messages from the DS proxy to the VDisk, an intermediate actor called *BS_QUEUE* is used. +Each VDisk runs on top a specific PDisk and has a *slot ID* comprising three fields (NodeID:PDiskId:VSlotId) as well as the above-mentioned VDisk ID. Strictly speaking, there are different concepts: a slot is a reserved location on a PDISK occupied by a VDisk while a VDisk is an element of a group that occupies a certain slot and performs operations with the slot. Similarly to PDisks, if you know the slot ID, you can calculate the service ActorId of the running VDisk and send it a message. To send messages from the DS proxy to the VDisk, an intermediate actor called *BS_QUEUE* is used. -The composition of each group is not fixed: it may change while using the system. For this purpose, the concept of "group generation" is introduced. Each "GroupId:GroupGeneration" pair corresponds to a fixed set of slots (a vector that consists of N slot IDs, where N is the size of the group), storing the data of the entire group. *Please note that a group generation and a tablet generation are not related in any way*. +The composition of each group is not constant. It may change while the system is running. Hence the concept of a group generation. Each "GroupId:GroupGeneration" pair corresponds to a fixed set of slots (a vector that consists of N slot IDs, where N is equal to group size) that stores the data of an entire group. *Group generation is not to be confused with tablet generation since they are not in any way related*. As a rule, groups of two adjacent generations differ by no more than one slot. ### Subgroups -For each blob, a special concept of a *subgroup* is introduced, which is an ordered subset of group disks with a strictly fixed number of elements, depending on the type of encoding (the number of elements in the group must be at least the same), where the data of this blob will be stored. For single-datacenter groups with conventional encoding, this subset is selected as the first N elements of a cyclic disk permutation in the group, where the permutation depends on the BlobId hash. +A special concept of a *subgroup* is introduced for each blob. It is an ordered subset of group disks with a strictly constant number of elements that will store the blob's data and that depends on the encoding type (the number of elements in a group must be the same or greater). For single-datacenter groups with conventional encoding, this subset is selected as the first N elements of a cyclic disk permutation in the group, where the permutation depends on the BlobId hash. -Each disk in the subgroup corresponds to a disk in the group, but is limited by the allowed number of stored blobs. For example, to encode block-4-2 with four data parts and two parity parts, the functional purpose of disks in the subgroup is as follows: +Each disk in the subgroup corresponds to a disk in the group, but is limited by the allowed number of stored blobs. For example, for block-4-2 encoding with four data parts and two parity parts, the functional purpose of the disks in a subgroup is as follows: | Number in the subgroup | Possible PartIds | -| ------------------- | ------------------- | -| 0 | 1 | -| 1 | 2 | -| 2 | 3 | -| 3 | 4 | -| 4 | 5 | -| 5 | 6 | -| 6 | 1,2,3,4,5,6 | -| 7 | 1,2,3,4,5,6 | - -In this case, PartID=1..4 corresponds to the data parts (which are obtained by splitting the original blob into 4 equal parts), and PartID=5..6 are parity parts. Disks numbered 6 and 7 in the subgroup are called *handoff disks*. Any part, either one or more, can be written to them. Disks 0..5 can only store the corresponding blob parts. - -In practice, when performing writes, the system tries to write 6 parts to the first 6 disks of the subgroup and, in the vast majority of cases, these attempts are successful. However, if any of the disks is not available, the write operation fails and the system uses handoff disks where parts of the disks that did not respond in time are sent. This may result in a situation when multiple parts of the same blob are written to one handoff disk. This is acceptable, although it makes no sense in terms of storage: each part must have its own unique disk. - +| ---------------------- | ---------------- | +| 0 | 1 | +| 1 | 2 | +| 2 | 3 | +| 3 | 4 | +| 4 | 5 | +| 5 | 6 | +| 6 | 1,2,3,4,5,6 | +| 7 | 1,2,3,4,5,6 | + +In this case, PartID=1..4 corresponds to the data parts (which are obtained by splitting the original blob into 4 equal parts), and PartID=5..6 are parity fragments. Disks numbered 6 and 7 in the subgroup are called *handoff disks*. Any part, either one or more, can be written to them. Disks 0..5 can only store the corresponding blob parts. + +In practice, when performing writes, the system tries to write 6 parts to the first 6 disks of the subgroup and, in the vast majority of cases, these attempts are successful. However, if any of the disks is not available, a write operation cannot succeed, which is when handoff disks kick in receiving the parts belonging to the disks that did not respond in time. It may turn out that several fragments of the same blob are sent to the same handoff disk as a result of complicated brakes and races. This is acceptable although it makes no sense in terms of storage: each fragment must have its own unique disk. diff --git a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface_hidden.md b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface_hidden.md index 05d8f54d26..de01b80777 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface_hidden.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/distributed_storage_interface_hidden.md @@ -1,4 +1,3 @@ ### Garbage collection ### Tablet suspension - diff --git a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/intro.md b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/intro.md index 27f0431c91..92b360ec02 100644 --- a/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/intro.md +++ b/ydb/docs/en/core/concepts/cluster/_includes/distributed_storage/intro.md @@ -1,6 +1,5 @@ # Disk subsystem of a cluster aka {{ ydb-short-name }} BlobStorage -{{ ydb-short-name }} BlobStorage is a {{ ydb-short-name }} subsystem that is responsible for reliable data storage. +{{ ydb-short-name }} BlobStorage is a subsystem {{ ydb-short-name }} that assures reliable data storage. Lets you store *blobs* (binary fragments from 1 byte to 10 megabytes in size) with a unique identifier. - diff --git a/ydb/docs/en/core/concepts/cluster/index.md b/ydb/docs/en/core/concepts/cluster/index.md index 489074e143..7eb85e1dc3 100644 --- a/ydb/docs/en/core/concepts/cluster/index.md +++ b/ydb/docs/en/core/concepts/cluster/index.md @@ -2,7 +2,6 @@ The information in this section is mainly intended for {{ ydb-short-name }} administrators and developers. -In ["General {{ ydb-short-name }} schema"](common_scheme_ydb.md), you can find an overview about nodes and tablets. - -From ["Cluster's disk subsystem"](distributed_storage.md), you can learn about the {{ ydb-short-name }} distributed storage system. +The [General schema {{ ydb-short-name }}](common_scheme_ydb.md) provides general information on nodes and tablets. +The [Cluster disk subsystem](distributed_storage.md) section presents more detail on the features of a distributed {{ ydb-short-name }} storage system. diff --git a/ydb/docs/en/core/concepts/datatypes.md b/ydb/docs/en/core/concepts/datatypes.md index 7676dc957a..6fd29cf5df 100644 --- a/ydb/docs/en/core/concepts/datatypes.md +++ b/ydb/docs/en/core/concepts/datatypes.md @@ -1,2 +1 @@ -This page has been deleted, for information about data types, see[YQL Data Types](../yql/reference/types/index.md). - +This page has been deleted, for information about data types, see [YQL Data Types](../yql/reference/types/index.md).
\ No newline at end of file diff --git a/ydb/docs/en/core/concepts/distributed_storage.md b/ydb/docs/en/core/concepts/distributed_storage.md deleted file mode 100644 index 8288ec7f92..0000000000 --- a/ydb/docs/en/core/concepts/distributed_storage.md +++ /dev/null @@ -1,5 +0,0 @@ -{% include [concepts/index/intro.md](_includes/distributed_storage/intro.md) %} - -{% include [concepts/index/when_use.md](_includes/distributed_storage/common_scheme_ydb.md) %} - -{% include [concepts/index/when_use.md](_includes/distributed_storage/detailed_distributed_storage.md) %} diff --git a/ydb/docs/en/core/concepts/index.md b/ydb/docs/en/core/concepts/index.md index 976f963f23..ae247fd15d 100644 --- a/ydb/docs/en/core/concepts/index.md +++ b/ydb/docs/en/core/concepts/index.md @@ -1,4 +1,3 @@ - {% include [concepts/index/intro.md](_includes/index/intro.md) %} {% include [concepts/index/when_use.md](_includes/index/when_use.md) %} diff --git a/ydb/docs/en/core/concepts/limits-ydb.md b/ydb/docs/en/core/concepts/limits-ydb.md index 268aa3cd3d..2d0d5adcbd 100644 --- a/ydb/docs/en/core/concepts/limits-ydb.md +++ b/ydb/docs/en/core/concepts/limits-ydb.md @@ -1,3 +1 @@ - {% include [limits-ydb.md](_includes/limits-ydb.md) %} - diff --git a/ydb/docs/en/core/concepts/scan_query.md b/ydb/docs/en/core/concepts/scan_query.md index eebd21983f..e7e42c4124 100644 --- a/ydb/docs/en/core/concepts/scan_query.md +++ b/ydb/docs/en/core/concepts/scan_query.md @@ -1,2 +1 @@ - {% include [scan_query.md](_includes/scan_query.md) %} diff --git a/ydb/docs/en/core/concepts/secondary_indexes.md b/ydb/docs/en/core/concepts/secondary_indexes.md index 7a4630af67..a55bcc8a5e 100644 --- a/ydb/docs/en/core/concepts/secondary_indexes.md +++ b/ydb/docs/en/core/concepts/secondary_indexes.md @@ -1,3 +1 @@ - {% include [secondary_indexes.md](_includes/secondary_indexes.md) %} - diff --git a/ydb/docs/en/core/concepts/serverless_and_dedicated.md b/ydb/docs/en/core/concepts/serverless_and_dedicated.md index 103bfc35cf..a80ceb2658 100644 --- a/ydb/docs/en/core/concepts/serverless_and_dedicated.md +++ b/ydb/docs/en/core/concepts/serverless_and_dedicated.md @@ -1,6 +1,5 @@ - {% include [intro.md](_includes/serverless_and_dedicated/01_intro.md) %} {% include [sls_pars.md](_includes/serverless_and_dedicated/02_sls_pars.md) %} -{% include [arch_diff.md](_includes/serverless_and_dedicated/10_arch_diff.md) %}
\ No newline at end of file +{% include [arch_diff.md](_includes/serverless_and_dedicated/10_arch_diff.md) %} diff --git a/ydb/docs/en/core/concepts/toc_i.yaml b/ydb/docs/en/core/concepts/toc_i.yaml index fa3795c630..a925de540d 100644 --- a/ydb/docs/en/core/concepts/toc_i.yaml +++ b/ydb/docs/en/core/concepts/toc_i.yaml @@ -1,15 +1,15 @@ items: -- { name: Overview, href: index.md } -- { name: Terms and definitions, href: databases.md } -- { name: Connecting to and authenticating with a database, href: connect.md } -- { name: Data model and schema, href: datamodel.md } -- { name: Serverless and Dedicated operation modes, href: serverless_and_dedicated.md } -- { name: Data types, href: datatypes.md, hidden: true } # Deprecated -- { name: Transactions, href: transactions.md } -- { name: Secondary indexes, href: secondary_indexes.md } -- { name: Time to Live (TTL), href: ttl.md } -- { name: Scan queries, href: scan_query.md } -- { name: Database limits, href: limits-ydb.md } +- { name: Overview, href: index.md } +- { name: Terms and definitions, href: databases.md } +- { name: Connecting to and authenticating with a database, href: connect.md } +- { name: Data model and schema, href: datamodel.md } +- { name: Serverless and Dedicated operation modes, href: serverless_and_dedicated.md } +- { name: Data types, href: datatypes.md, hidden: true } # Deprecated +- { name: Transactions, href: transactions.md } +- { name: Secondary indexes, href: secondary_indexes.md } +- { name: Time to Live (TTL), href: ttl.md } +- { name: Scan queries, href: scan_query.md } +- { name: Database limits, href: limits-ydb.md } - name: YDB cluster items: - name: Overview diff --git a/ydb/docs/en/core/concepts/transactions.md b/ydb/docs/en/core/concepts/transactions.md index b2cf914638..01e3c32a82 100644 --- a/ydb/docs/en/core/concepts/transactions.md +++ b/ydb/docs/en/core/concepts/transactions.md @@ -1,3 +1 @@ - {% include [transactions.md](_includes/transactions.md) %} - diff --git a/ydb/docs/en/core/concepts/ttl.md b/ydb/docs/en/core/concepts/ttl.md index 11c1812deb..65436fe5e8 100644 --- a/ydb/docs/en/core/concepts/ttl.md +++ b/ydb/docs/en/core/concepts/ttl.md @@ -1,2 +1 @@ - {% include [ttl.md](_includes/ttl.md) %} diff --git a/ydb/docs/en/core/deploy/_includes/index.md b/ydb/docs/en/core/deploy/_includes/index.md new file mode 100644 index 0000000000..441adb6a58 --- /dev/null +++ b/ydb/docs/en/core/deploy/_includes/index.md @@ -0,0 +1,9 @@ +# Administration of YDB clusters + +This section provides information on the deployment and configuration of YDB clusters for administrators. Step-by-step tutorials for quick deployment intended for application developers are given in [Getting Started - Self-deployment](../../getting_started/self_hosted/index.md). + +{% note warning %} + +The section is under development. + +{% endnote %}
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/configuration/config.md b/ydb/docs/en/core/deploy/configuration/config.md index a37154ecc9..9ea38d81fa 100644 --- a/ydb/docs/en/core/deploy/configuration/config.md +++ b/ydb/docs/en/core/deploy/configuration/config.md @@ -206,5 +206,4 @@ For a configuration located in 3 availability zones, specify 3 rings. For a conf ## Sample cluster configurations -The [repository](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/yaml_config_examples/) provides model examples of cluster configurations for self-deployment. Check them out before deploying a cluster. - +The [repository](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/yaml_config_examples/) provides model examples of cluster configurations for self-deployment. Check them out before deploying a cluster. diff --git a/ydb/docs/en/core/deploy/configuration/toc_i.yaml b/ydb/docs/en/core/deploy/configuration/toc_i.yaml index 5daa365aec..a9206b825a 100644 --- a/ydb/docs/en/core/deploy/configuration/toc_i.yaml +++ b/ydb/docs/en/core/deploy/configuration/toc_i.yaml @@ -1,3 +1,3 @@ items: -- name: Creating a cluster configuration +- name: Cluster configuration href: config.md
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/index.md b/ydb/docs/en/core/deploy/index.md new file mode 100644 index 0000000000..aabc043742 --- /dev/null +++ b/ydb/docs/en/core/deploy/index.md @@ -0,0 +1 @@ +{% include [index.md](_includes/index.md) %}
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/manual/_includes/generate-ssl.md b/ydb/docs/en/core/deploy/manual/_includes/generate-ssl.md index e32f44ebcd..9e3fb6b77d 100644 --- a/ydb/docs/en/core/deploy/manual/_includes/generate-ssl.md +++ b/ydb/docs/en/core/deploy/manual/_includes/generate-ssl.md @@ -8,7 +8,7 @@ You can use existing TLS certificates. It's important that certificates support ## Create a CA key {# generate-ca} -Create a directory named `secure` to store the CA key and a directory named `certs` for certificates and node keys: +Create a directory named `secure` to store the CA key and one named `certs` for certificates and node keys: ```bash mkdir secure @@ -107,5 +107,4 @@ openssl ca -config ca.cnf -keyfile secure/ca.key -cert certs/ca.crt -policy sign -extensions signing_node_req -out certs/node.crt -outdir certs/ -in node.csr -batch ``` -Create similar certificate-key pairs for each node. - +Create similar certificate-key pairs for each node.
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/manual/_includes/prepare-configs.md b/ydb/docs/en/core/deploy/manual/_includes/prepare-configs.md index e907b0c060..1246a554e0 100644 --- a/ydb/docs/en/core/deploy/manual/_includes/prepare-configs.md +++ b/ydb/docs/en/core/deploy/manual/_includes/prepare-configs.md @@ -41,5 +41,4 @@ hosts: body: 3 data_center: 'zone-c' rack: '1' -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/manual/concepts.md b/ydb/docs/en/core/deploy/manual/concepts.md index e26c6e4df8..6e5d0bd90f 100644 --- a/ydb/docs/en/core/deploy/manual/concepts.md +++ b/ydb/docs/en/core/deploy/manual/concepts.md @@ -6,4 +6,3 @@ YDB consists of two components: * Static nodes that provide the data storage layer. * Dynamic nodes that implement data access and processing. Each database requires one or more separate dynamic nodes. - diff --git a/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md b/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md index cc61e87793..3a024353cb 100644 --- a/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md +++ b/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md @@ -10,7 +10,7 @@ Make sure you have SSH access to all servers. This is necessary to install artif Your network configuration must allow TCP connections on the following ports (by default): * 2135, 2136: GRPC for client-cluster interaction. -* 19001, 19002: Interconnect for intra-cluster node interaction. +* 19001, 19002 - Interconnect for intra-cluster node interaction. * 8765, 8766: The HTTP interface for cluster monitoring. Check out the [Production checklist](../production_checklist.md) and the recommended cluster topology and select the servers and disks to be used for data storage: @@ -29,7 +29,7 @@ sudo groupadd ydb sudo useradd ydb -g ydb ``` -To make sure the {{ ydb-short-name }} server has access to block store disks to run, add the user to start the process under to the disk group. +To make sure the {{ ydb-short-name }} server has access to block store disks to run, add the user to start the process under to the disk group: ```bash sudo usermod -aG disk ydb @@ -43,11 +43,11 @@ We don't recommend using disks that are used by other processes (including the O {% endnote %} -1. Create a partition on the selected disk +1. Create a partition on the selected disk. {% note alert %} -Be careful! The following operation will delete all partitions on the specified disks! +Be careful! The following step will delete all partitions on the specified disks! Make sure that you specified the disks that have no other data! {% endnote %} @@ -87,7 +87,7 @@ sudo cp -i ydbd-main-linux-amd64/lib/libiconv.so /opt/ydb/lib/ sudo cp -i ydbd-main-linux-amd64/lib/libidn.so /opt/ydb/lib/ ``` -3. Format the disk with the built-in command +3. Format the disk with the built-in command: ```bash sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib /opt/ydb/bin/ydbd admin bs disk obliterate /dev/disk/by-partlabel/ydb_disk_01 @@ -101,11 +101,11 @@ Prepare the configuration files: - Unprotected mode - In this mode, traffic between cluster nodes and between the client and cluster uses an unencrypted connection. Use this mode for testing purposes. + In this mode, traffic between cluster nodes and between client and cluster uses an unencrypted connection. Use this mode for testing purposes. {% include [prepare-configs.md](_includes/prepare-configs.md) %} - Save the {{ ydb-short-name }} configuration file as `/opt/ydb/cfg/config.yaml` + Save the {{ ydb-short-name }} configuration file as `/opt/ydb/cfg/config.yaml`. - Protected mode @@ -113,14 +113,14 @@ Prepare the configuration files: {% include [generate-ssl.md](_includes/generate-ssl.md) %} - Create directories for certificates on each node + Create directories for certificates on each node: ```bash mkdir /opt/ydb/certs chmod 0750 /opt/ydb/certs ``` - Copy the node certificates and keys + Copy the node certificates and keys: ```bash sudo -u ydb cp certs/ca.crt certs/node.crt certs/node.key /opt/ydb/certs/ @@ -137,7 +137,7 @@ Prepare the configuration files: path_to_certificate_file: "/opt/ydb/certs/node.crt" path_to_private_key_file: "/opt/ydb/certs/node.key" path_to_ca_file: "/opt/ydb/certs/ca.crt" - + grpc_config: cert: "/opt/ydb/certs/node.crt" key: "/opt/ydb/certs/node.key" @@ -153,7 +153,6 @@ Prepare the configuration files: {% list tabs %} - Manual - 1. Run {{ ydb-short-name }} storage on each node: ```bash @@ -167,7 +166,6 @@ Prepare the configuration files: TBD: how and where to write logs? Log rotation - Using systemd - 1. On each node, create a configuration file named `/etc/systemd/system/ydbd-storage.service` with the following content: ```text @@ -177,7 +175,7 @@ Prepare the configuration files: Wants=network-online.target StartLimitInterval=10 StartLimitBurst=15 - + [Service] Restart=always RestartSec=1 @@ -193,7 +191,7 @@ Prepare the configuration files: LimitNOFILE=65536 LimitCORE=0 LimitMEMLOCK=3221225472 - + [Install] WantedBy=multi-user.target ``` @@ -210,7 +208,7 @@ Prepare the configuration files: On one of the cluster nodes, run the command: ```bash -LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib ; /opt/ydb/bin/ydbd admin blobstorage config init --yaml-file /opt/ydb/cfg/config.yaml ; echo $? +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib ; /opt/ydb/bin/ydbd admin blobstorage config init --yaml-file /opt/ydb/cfg/config.yaml ; echo $? ``` The command execution code should be null. @@ -228,7 +226,6 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib ; /opt/ydb/bin/ydbd admin database {% list tabs %} - Manual - 1. Start the {{ ydb-short-name }} dynamic node for the /Root/testdb database: ```bash @@ -242,7 +239,6 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib ; /opt/ydb/bin/ydbd admin database Run additional dynamic nodes on other servers to ensure database availability. - Using systemd - 1. Create a configuration file named `/etc/systemd/system/ydbd-testdb.service` with the following content: ```text @@ -283,7 +279,7 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib ; /opt/ydb/bin/ydbd admin database ## Test the created database {# try-first-db} -1. Install the YDB CLI as described in [Installing the YDB CLI](../../reference/ydb-cli/install.md) +1. Install the YDB CLI as described in [Installing the YDB CLI](../../reference/ydb-cli/install.md). 2. Create a `test_table`: ```bash @@ -291,5 +287,4 @@ ydb -e grpc://<node1.domain>:2136 -d /Root/testdb scripting yql \ --script 'CREATE TABLE `testdir/test_table` (id Uint64, title Utf8, PRIMARY KEY (id));' ``` -Where node.domain is the FQDN of the server where the dynamic nodes serving the `/Root/testdb` database are running. - +Where node.domain is the FQDN of the server running the dynamic nodes that support the `/Root/testdb` database. diff --git a/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md b/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md index 25d0f75698..a8a620b479 100644 --- a/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md +++ b/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md @@ -195,7 +195,7 @@ Test how {{ ydb-short-name }} works: └─────────┘ ``` - Learn more about {{ ydb-short-name }} CLI commands in the [documentation](https://cloud.yandex.com/en/docs/ydb/oss/public/reference/ydb-cli/commands/). + For more on {{ ydb-short-name }} CLI commands, see the [documentation](../../../reference/ydb-cli/index.md). {% endlist %} diff --git a/ydb/docs/en/core/deploy/orchestrated/aws_eks.md b/ydb/docs/en/core/deploy/orchestrated/aws_eks.md index 0ac18840af..5e39db1a41 100644 --- a/ydb/docs/en/core/deploy/orchestrated/aws_eks.md +++ b/ydb/docs/en/core/deploy/orchestrated/aws_eks.md @@ -1,6 +1,6 @@ # Deploying {{ ydb-short-name }} in AWS EKS -To create a [{{ ydb-short-name }}](https://cloud.yandex.com/en/docs/ydb/) cluster using [{{ k8s }}](https://kubernetes.io/), follow these steps. +To use [{{ k8s }}](https://kubernetes.io/) to create a cluster [{{ ydb-short-name }}]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/ydb/){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/ydb/){% endif %}, follow the steps below. ## Before you start {#before-begin} diff --git a/ydb/docs/en/core/deploy/orchestrated/concepts.md b/ydb/docs/en/core/deploy/orchestrated/concepts.md index 8f119df782..96805396c3 100644 --- a/ydb/docs/en/core/deploy/orchestrated/concepts.md +++ b/ydb/docs/en/core/deploy/orchestrated/concepts.md @@ -9,7 +9,7 @@ Deploying {{ ydb-short-name }} in {{ k8s }} is a simple and easy way to install 1. The kubectl command line tool is installed and cluster access is configured. 1. [Dynamic Volume Provisioning](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) is supported in clusters. -For more information about Helm, see the [documentation](https://helm.sh/ru/docs/). +For more about Helm, review [documentation]{% if lang == "en" %}(https://helm.sh/docs/){% endif %}{% if lang == "ru" %}(https://helm.sh/ru/docs/){% endif %}. A Helm chart installs a controller in the {{ k8s }} cluster. It implements the logic required for deploying {{ ydb-short-name }} components. The controller is based on the [Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) pattern. diff --git a/ydb/docs/en/core/deploy/orchestrated/yc_managed_kubernetes.md b/ydb/docs/en/core/deploy/orchestrated/yc_managed_kubernetes.md index 9a265f2f77..be98c709ca 100644 --- a/ydb/docs/en/core/deploy/orchestrated/yc_managed_kubernetes.md +++ b/ydb/docs/en/core/deploy/orchestrated/yc_managed_kubernetes.md @@ -1,12 +1,12 @@ # Deploying {{ ydb-short-name }} in {{ managed-k8s-name }} -To create a [{{ ydb-short-name }}](https://cloud.yandex.com/en/docs/ydb/) cluster using [{{ k8s }}](https://kubernetes.io/), follow these steps. +To use [{{ k8s }}](https://kubernetes.io/) to create a cluster [{{ ydb-short-name }}]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/ydb/){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/ydb/){% endif %}, follow the steps below. ## Before you start {#before-begin} 1. Create a {{ k8s }} cluster. - You can use an existing {{ k8s }} cluster or [create](https://cloud.yandex.com/en/docs/managed-kubernetes/operations/kubernetes-cluster/kubernetes-cluster-create) a new one. + You can use an existing {{ k8s }} cluster or [create]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/managed-kubernetes/operations/kubernetes-cluster/kubernetes-cluster-create){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/managed-kubernetes/operations/kubernetes-cluster/kubernetes-cluster-create){% endif %} a new one. {% note warning %} @@ -16,7 +16,7 @@ To create a [{{ ydb-short-name }}](https://cloud.yandex.com/en/docs/ydb/) cluste 1. Install the {{ k8s }} CLI [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl). -1. [Define](https://cloud.yandex.com/en/docs/managed-kubernetes/operations/kubernetes-cluster/kubernetes-cluster-get-credetials) a kubectl configuration. +1. [Define]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/managed-kubernetes/operations/kubernetes-cluster/kubernetes-cluster-get-credetials){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/managed-kubernetes/operations/kubernetes-cluster/kubernetes-cluster-get-credetials){% endif %} a kubectl configuration. 1. Install the {{ k8s }} [Helm 3](https://helm.sh/docs/intro/install/) package manager. diff --git a/ydb/docs/en/core/deploy/production_checklist.md b/ydb/docs/en/core/deploy/production_checklist.md index 6f3295f58f..cfb6b345fa 100644 --- a/ydb/docs/en/core/deploy/production_checklist.md +++ b/ydb/docs/en/core/deploy/production_checklist.md @@ -1,19 +1,19 @@ ## Checklist for deploying your product environment -This section provides recommendations for deploying YDB in product environments. +This section provides recommendations for deploying {{ ydb-short-name }} in product environments. ## Topology When planning a deployment, it's important to choose the right cluster topology based on the required fault tolerance: * Mirror-3dc-3-nodes: This mode requires at least 3 servers with 3 disks in each. To ensure maximum fault tolerance, each server must be located in an independent datacenter. In this mode, a cluster keeps running if no more than 1 server fails. -* Mirror-3dc: This mode requires at least 9 servers. To ensure maximum fault tolerance, servers must be located in three independent data centers and different server racks in each of them. In this mode, a cluster keeps running if 1 datacenter fails completely and 1 server in another datacenter is out of service. +* Mirror-3dc: This mode requires at least 9 servers. To ensure maximum fault tolerance, servers must be located in three independent data centers and different server racks in each of them. In this mode, a cluster remains operational if 1 datacenter fails completely and 1 server crashes in another datacenter. * Block-4-2: This mode requires at least 8 servers in one datacenter. To ensure maximum fault tolerance, servers must be located in 8 independent racks. -TBD. mirror-3dc vs block-4-2: Whether we want the following in the doc: +TBD. mirror-3dc vs block-4-2: Whether we want the following in the doc: -- Much more network traffic -- Higher storage overhead +- Much more network traffic. +- Higher storage overhead. ## Hardware configuration @@ -22,5 +22,4 @@ For correct operation, we recommend using the x86_64 CPU architecture with suppo - SSE - ??? -## Software configuration - +## Software configuration
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/toc_i.yaml b/ydb/docs/en/core/deploy/toc_i.yaml new file mode 100644 index 0000000000..133119fd9b --- /dev/null +++ b/ydb/docs/en/core/deploy/toc_i.yaml @@ -0,0 +1,8 @@ +items: +- name: Deploying a YDB cluster + include: { mode: link, path: manual/toc_p.yaml } +- include: { mode: link, path: configuration/toc_p.yaml } +- name: Kubernetes + include: { mode: link, path: ../deploy/orchestrated/toc_p.yaml } +- name: Production checklist + href: production_checklist.md
\ No newline at end of file diff --git a/ydb/docs/en/core/deploy/toc_p.yaml b/ydb/docs/en/core/deploy/toc_p.yaml new file mode 100644 index 0000000000..94ce110868 --- /dev/null +++ b/ydb/docs/en/core/deploy/toc_p.yaml @@ -0,0 +1,4 @@ +items: +- name: Overview + href: index.md +- include: { mode: link, path: toc_i.yaml }
\ No newline at end of file diff --git a/ydb/docs/en/core/downloads/_includes/server/docker.md b/ydb/docs/en/core/downloads/_includes/server/docker.md index 8e218d4acc..a57f418151 100644 --- a/ydb/docs/en/core/downloads/_includes/server/docker.md +++ b/ydb/docs/en/core/downloads/_includes/server/docker.md @@ -1,3 +1,4 @@ -Version | Release date | Download -:--- | :--- | :--- -v.24.4.62 | 10.02.22 | `cr.yandex/crpl7ipeu79oseqhcgn2/ydb-oss:main`
\ No newline at end of file +| Version | Date of issue | Download | +| :--- | :--- | :--- | +| v.24.4.62 | 10.02.22 | `cr.yandex/crpl7ipeu79oseqhcgn2/ydb-oss:main` | + diff --git a/ydb/docs/en/core/downloads/_includes/server/linux.md b/ydb/docs/en/core/downloads/_includes/server/linux.md index 9ca653bc29..85f6db2f79 100644 --- a/ydb/docs/en/core/downloads/_includes/server/linux.md +++ b/ydb/docs/en/core/downloads/_includes/server/linux.md @@ -1,3 +1,5 @@ -Version | Release date | Download -:--- | :--- | :--- -v.22.2.5 | 14.02.22 | [Binary](https://binaries.ydb.tech/release/22.2.5/ydbd-22.2.5-linux-amd64.tar.gz)
\ No newline at end of file +| Version | Date of issue | Download | +| :--- | :--- | :--- | +| v.21.4.62 | 12.02.22 | [A binary](https://binaries.ydb.tech/ydbd-main-linux-amd64.tar.gzx) | +| v.22.2.5 | 14.02.22 | [A binary](https://binaries.ydb.tech/ydbd-22.2.5-linux-amd64.tar.gz) | + diff --git a/ydb/docs/en/core/downloads/_includes/server/source_code.md b/ydb/docs/en/core/downloads/_includes/server/source_code.md index c772d73a65..aa15cac223 100644 --- a/ydb/docs/en/core/downloads/_includes/server/source_code.md +++ b/ydb/docs/en/core/downloads/_includes/server/source_code.md @@ -1,3 +1,4 @@ -Version | Release date | Download -:--- | :--- | :--- -v.22.2.5 | 14.02.22 | [https://github.com/ydb-platform/ydb/tree/22.2.5](https://github.com/ydb-platform/ydb/tree/22.2.5)
\ No newline at end of file +| Version | Date of issue | Link | +| :--- | :--- | :--- | +| v.22.2.5 | 14.02.22 | [https://github.com/ydb-platform/ydb/tree/22.2.5](https://github.com/ydb-platform/ydb/tree/22.2.5) | + diff --git a/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_amd64.md b/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_amd64.md index 2e0936c6c2..43efe327c0 100644 --- a/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_amd64.md +++ b/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_amd64.md @@ -1,3 +1,4 @@ -Version | Release date | Download -:--- | :--- | :--- -v.1.6.0 | 24.12.21 | [Binary](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/darwin/amd64/ydb)
\ No newline at end of file +| Version | Date of issue | Download | +| :--- | :--- | :--- | +| v.1.6.0 | 24.12.21 | [Binary file](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/darwin/amd64/ydb) | + diff --git a/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_arm64.md b/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_arm64.md index 434f43ec4b..1e9f0fbc15 100644 --- a/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_arm64.md +++ b/ydb/docs/en/core/downloads/_includes/ydb-cli/darwin_arm64.md @@ -1,3 +1,4 @@ -Version | Release date | Download -:--- | :--- | :--- -v.1.6.0 | 24.12.21 | [Binary](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/darwin/arm64/ydb)
\ No newline at end of file +| Version | Date of issue | Download | +| :--- | :--- | :--- | +| v.1.6.0 | 24.12.21 | [Binary file](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/darwin/arm64/ydb) | + diff --git a/ydb/docs/en/core/downloads/_includes/ydb-cli/linux.md b/ydb/docs/en/core/downloads/_includes/ydb-cli/linux.md index 46f953b411..a46af0fb05 100644 --- a/ydb/docs/en/core/downloads/_includes/ydb-cli/linux.md +++ b/ydb/docs/en/core/downloads/_includes/ydb-cli/linux.md @@ -1,3 +1,4 @@ -Version | Release date | Download -:--- | :--- | :--- -v.1.6.0 | 24.12.21 | [Binary](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/linux/amd64/ydb)
\ No newline at end of file +| Version | Date of issue | Download | +| :--- | :--- | :--- | +| v.1.6.0 | 24.12.21 | [Binary file](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/linux/amd64/ydb) | + diff --git a/ydb/docs/en/core/downloads/_includes/ydb-cli/windows.md b/ydb/docs/en/core/downloads/_includes/ydb-cli/windows.md index d681ced001..e22917721f 100644 --- a/ydb/docs/en/core/downloads/_includes/ydb-cli/windows.md +++ b/ydb/docs/en/core/downloads/_includes/ydb-cli/windows.md @@ -1,3 +1,4 @@ -Version | Release date | Download -:--- | :--- | :--- -v.1.6.0 | 24.12.21 | [Binary](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/windows/amd64/ydb.exe)
\ No newline at end of file +| Version | Date of issue | Download | +| :--- | :--- | :--- | +| v.1.6.0 | 24.12.21 | [Binary file](https://storage.yandexcloud.net/yandexcloud-ydb/release/1.6.0/windows/amd64/ydb.exe) | + diff --git a/ydb/docs/en/core/downloads/index.md b/ydb/docs/en/core/downloads/index.md index 219e47d5dc..b68072af16 100644 --- a/ydb/docs/en/core/downloads/index.md +++ b/ydb/docs/en/core/downloads/index.md @@ -1,9 +1,9 @@ -# Загрузки +# Downloads ## {{ ydb-short-name }} CLI -The {{ ydb-short-name }} CLI provides software for managing your data in {{ ydb-short-name }}. -To learn how to use, see the [{{ ydb-short-name }} CLI documentation](../reference/ydb-cli/index.md). +The {{ ydb-short-name }} CLI provides software for managing your data in {{ ydb-short-name }}. +Review the documentation on using the [{{ ydb-short-name }} CLI](../reference/ydb-cli/index.md). {% list tabs %} @@ -23,12 +23,11 @@ To learn how to use, see the [{{ ydb-short-name }} CLI documentation](../referen {% include notitle [Windows](_includes/ydb-cli/windows.md) %} - {% endlist %} -## {{ ydb-short-name }} Server +## {{ ydb-short-name }} server -Software to run {{ ydb-short-name }} server. +Software to run a {{ ydb-short-name }} server. {% list tabs %} @@ -44,5 +43,4 @@ Software to run {{ ydb-short-name }} server. {% include notitle [docker](_includes/server/source_code.md) %} - {% endlist %} diff --git a/ydb/docs/en/core/downloads/toc_i.yaml b/ydb/docs/en/core/downloads/toc_i.yaml index 9f81d46da1..c7918a9864 100644 --- a/ydb/docs/en/core/downloads/toc_i.yaml +++ b/ydb/docs/en/core/downloads/toc_i.yaml @@ -1,5 +1,3 @@ items: - name: Downloads - href: index.md - - + href: index.md
\ No newline at end of file diff --git a/ydb/docs/en/core/faq/_includes/common.md b/ydb/docs/en/core/faq/_includes/common.md index 7d656a61f4..df3d0bd04d 100644 --- a/ydb/docs/en/core/faq/_includes/common.md +++ b/ydb/docs/en/core/faq/_includes/common.md @@ -1,6 +1,6 @@ --- -title: "YDB. FAQ" -description: "What is YDB? For what tasks is it worth using YDB, and for which virtual machines with databases? What part of the management and maintenance of databases does YDB take on? Answers to these and other questions in this article." +title: "Yandex Database. FAQ" +description: "What is Yandex Database? For what tasks is it worth using Yandex Database, and for which virtual machines with databases? What part of the management and maintenance of databases does Yandex Database take on? Answers to these and other questions in this article." --- # General questions about {{ ydb-short-name }} @@ -73,11 +73,8 @@ For more information, see [Paginated output](../../best_practices/paging.md). To speed up uploading large amounts of data, follow these recommendations: * When creating a table, explicitly specify the required number of partitions or their boundaries. This will help you effectively use system bandwidth as soon as you start uploading data by avoiding unnecessary re-partitioning of the table. - * Don't insert data in separate transactions for each row. It's more efficient to insert multiple rows at once (batch inserts). This reduces the overhead on the transaction mechanism itself. - * In addition to the previous step, within each transaction (batch), insert rows from the primary key-sorted set of data to minimize the number of partitions that the transaction affects. - * Avoid writing data sequentially in ascending or descending order of the primary key value to evenly distribute the load across all table partitions. For more information, see [Uploading large data volumes](../../best_practices/batch_upload.md). diff --git a/ydb/docs/en/core/faq/_includes/errors.md b/ydb/docs/en/core/faq/_includes/errors.md index 47d3f7f351..a9c637963c 100644 --- a/ydb/docs/en/core/faq/_includes/errors.md +++ b/ydb/docs/en/core/faq/_includes/errors.md @@ -1,10 +1,10 @@ # Errors -#### What should I do if I frequently get the error <q>Transaction locks invalidated</q>? {#locks-invalidated} +#### What should I do if I frequently get the "Transaction locks invalidated" error? {#locks-invalidated} Typically, if you get this error, repeat a transaction, as {{ ydb-short-name }} uses optimistic locking. If this error occurs frequently, it means that a large number of rows are being read in a transaction or that many transactions are competing for the same "hot" rows. It makes sense to view the queries running in the transaction and check if they're reading unnecessary rows. -#### Why does the error <q>Exceeded maximum allowed number of active transactions</q> occur? {#exceed-number-transactions} +#### Why does the error "Exceeded maximum allowed number of active transactions" occur? {#exceed-number-transactions} The logic on the client side should try to keep transactions as short as possible. diff --git a/ydb/docs/en/core/faq/_includes/sdk.md b/ydb/docs/en/core/faq/_includes/sdk.md index 8952f6662c..1b88be1744 100644 --- a/ydb/docs/en/core/faq/_includes/sdk.md +++ b/ydb/docs/en/core/faq/_includes/sdk.md @@ -1,15 +1,14 @@ # SDK -#### What may cause the error <q>Status: OVERLOADED Error: Pending previous query completion</q> in the C++ SDK? +#### What may cause the error "Status: OVERLOADED Error: Pending previous query completion" in the C++ SDK? -Q: When running two queries, I try to get a response from the future method of the second one. It returns: ```Status: OVERLOADED Why: <main>: Error: Pending previous query completion``` +Q: When running two queries, I try to get a response from the future method of the second one. It returns: `Status: OVERLOADED Why: <main>: Error: Pending previous query completion`. A: Sessions in the SDK are single-threaded. To run multiple queries at once, you need to create multiple sessions. #### What should I do if the SDK crashes when shutting down an application? {#what-to-do-if-the-sdk-crashes-urgently-when-the-app-is-shut-down} -Make sure not to wrap SDK components in a singleton, since their lifetime shouldn't exceed the execution time of the `main()` function. When a client is destroyed, session pools are emptied, so network navigation is required. But gRPC contains global static variables that might already be destroyed by this time. This disables gRPC. -If you need to declare a driver as a global object, invoke the `Stop(true)` function on the driver before exiting the `main()` function. +Make sure not to wrap SDK components in a singleton, since their lifetime shouldn't exceed the execution time of the `main()` function. When a client is destroyed, session pools are emptied, so network navigation is required. But gRPC contains global static variables that might already be destroyed by this time. This disables gRPC. If you need to declare a driver as a global object, invoke the `Stop(true)` function on the driver before exiting the `main()` function. #### What should I do if, when using a `fork()` system call, a program does not work properly in a child process? {#program-does-not-work-correctly-when-calling-fork} diff --git a/ydb/docs/en/core/faq/_includes/serverless.md b/ydb/docs/en/core/faq/_includes/serverless.md index b46c12093b..c7287c5bab 100644 --- a/ydb/docs/en/core/faq/_includes/serverless.md +++ b/ydb/docs/en/core/faq/_includes/serverless.md @@ -2,7 +2,7 @@ #### How do secondary indexes affect the request cost? -Operations with indexes are estimated according to the same rules as operations with tables. They are reflected in the request statistics and included in the total indicators that are used to calculate the cost in Request Units (RU). For more information, see the [pricing policy for the serverless {{ ydb-short-name }} API](https://cloud.yandex.com/en/docs/ydb/pricing/request_units_yql). +Operations with indexes are estimated according to the same rules as operations with tables. They are reflected in the request statistics and included in the total indicators that are used to calculate the cost in Request Units (RU). For more information, see the [pricing policy for the serverless {{ ydb-short-name }} API]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/ydb/pricing/request_units_yql){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/ydb/pricing/request_units_yql){% endif %}. When reading data from a table using an index, the request statistics will show the number of rows read from the index and their volume. diff --git a/ydb/docs/en/core/faq/_includes/yql.md b/ydb/docs/en/core/faq/_includes/yql.md index a8b5b33f16..4498af3792 100644 --- a/ydb/docs/en/core/faq/_includes/yql.md +++ b/ydb/docs/en/core/faq/_includes/yql.md @@ -4,7 +4,7 @@ #### How do I select table rows by a list of keys? {#explicit-keys} -You can select table rows from the specified list of values of the table's primary key (or key prefix) using the IN operator: +You can select table rows from the specified list of values of the table's primary key (or key prefix) using the `IN` operator: ```sql DECLARE $keys AS List<UInt64>; @@ -26,7 +26,7 @@ To select rows effectively, make sure that the value types in the parameters mat #### Is search by index performed for conditions containing the LIKE operator? {#like-index} -You can only use the LIKE operator to search by table index if it sets the row prefix: +You can only use the `LIKE` operator to search by table index if it sets the row prefix: ```sql SELECT * FROM string_key_table @@ -37,7 +37,7 @@ WHERE Key LIKE "some_prefix%"; 1000 rows is the response size limit per YQL query. If a response is shortened, it is flagged as `Truncated`. To output more table rows, you can use [paginated output](../../best_practices/paging.md) or the `ReadTable` operation. -#### What should I do if I get the <q>Datashard: Reply size limit exceeded</q> error? {#reply-size-exceeded} +#### What should I do if I get the "Datashard: Reply size limit exceeded" error? {#reply-size-exceeded} This error means that, when executing the query, an attempt was made to return more than 50 MB of data from one of the involved datashards, which exceeds the allowed limit. @@ -47,7 +47,7 @@ Recommendations: * If a Join operation is running, make sure that its method is [Index Lookup Join](#index-lookup-join). * If a simple selection is performed, make sure that it is done by keys, or add `LIMIT` in the query. -#### What should I do if I get the <q>Datashard program size limit exceeded</q> error? {#program-size-exceeded} +#### What should I do if I get the "Datashard program size limit exceeded" error? {#program-size-exceeded} This error means that the size of the program (including the parameter values) for one of the datashards exceeded the 50 MB limit. In most cases, this indicates an attempt to write more than 50 MB of records to database tables in one transaction. All modifying operations in a transaction such as `UPSERT`, `REPLACE`, `INSERT`, or `UPDATE` count as records. @@ -55,7 +55,7 @@ You need to reduce the total size of records in one transaction. Normally, we do #### How do I update only those values whose keys are not in the table? {#update-non-existent} -You can use LEFT JOIN to mark the keys that are missing from the table and then update their values: +You can use `LEFT JOIN` to mark the keys that are missing from the table and then update their values: ```sql DECLARE $values AS List<Struct<Key: UInt64, Value: String>>; @@ -74,8 +74,8 @@ WHERE t.Key IS NULL; Join operations in {{ ydb-short-name }} are performed in one of two ways: -* Common Join -* Index Lookup Join +* Common Join. +* Index Lookup Join. #### Common Join {#common-join} @@ -83,7 +83,7 @@ The contents of both tables (the left and right parts of a Join) are sent to the #### Index Lookup Join {#index-lookup-join} -For rows from the left part of a Join operation, a lookup is performed for the corresponding values in the right part. This method is used when the right part is a table and the Join operation key is the prefix of its primary key or of the secondary index key. In this method, limited selections are made from the right table instead of full reads. This lets you use it when working with large tables. +For rows from the left part of a `Join` operation, a lookup is performed for the corresponding values in the right part. This method is used when the right part is a table and the `Join` operation key is the prefix of its primary key or of the secondary index key. In this method, limited selections are made from the right table instead of full reads. This lets you use it when working with large tables. {% note info %} @@ -105,7 +105,7 @@ ON t.Key1 = d.Key1 AND t.Key2 = d.Key2; There is no explicit limit on the number of entries in the constant table, but mind the standard limit on the total size of query parameters (50 MB). -#### What is the best way to implement a query like (key1, key2) IN ((v1, v2), (v3, v4), ...) {#key-pairs-in}? +#### What is the best way to implement a query like (key1, key2) IN ((v1, v2), (v3, v4), ...)? {#key-pairs-in} It's better to write it using a JOIN with a constant table: diff --git a/ydb/docs/en/core/faq/all.md b/ydb/docs/en/core/faq/all.md index 8aa014db3b..5c253cdb17 100644 --- a/ydb/docs/en/core/faq/all.md +++ b/ydb/docs/en/core/faq/all.md @@ -1,4 +1,3 @@ - {% include [all.md](_includes/all.md) %} ## Serverless {#serverless} diff --git a/ydb/docs/en/core/faq/common.md b/ydb/docs/en/core/faq/common.md index bf3c23267c..47a7c34acf 100644 --- a/ydb/docs/en/core/faq/common.md +++ b/ydb/docs/en/core/faq/common.md @@ -1,8 +1 @@ - {% include [common.md](_includes/common.md) %} - -{% if audience == "external" %} - -{% include [qa-logs](../../_includes/qa-logs.md) %} - -{% endif %} diff --git a/ydb/docs/en/core/faq/errors.md b/ydb/docs/en/core/faq/errors.md index db4af81876..35ea268981 100644 --- a/ydb/docs/en/core/faq/errors.md +++ b/ydb/docs/en/core/faq/errors.md @@ -1,2 +1 @@ - {% include [errors.md](_includes/errors.md) %} diff --git a/ydb/docs/en/core/faq/index.md b/ydb/docs/en/core/faq/index.md index 48707dde45..12643df073 100644 --- a/ydb/docs/en/core/faq/index.md +++ b/ydb/docs/en/core/faq/index.md @@ -1,7 +1 @@ - {% include [index.md](_includes/index.md) %} - - - - - diff --git a/ydb/docs/en/core/faq/sdk.md b/ydb/docs/en/core/faq/sdk.md index 9832e66cf0..18bd227b1a 100644 --- a/ydb/docs/en/core/faq/sdk.md +++ b/ydb/docs/en/core/faq/sdk.md @@ -1,2 +1 @@ - {% include [sdk.md](_includes/sdk.md) %} diff --git a/ydb/docs/en/core/faq/serverless.md b/ydb/docs/en/core/faq/serverless.md index cfed22fac2..5429ea3430 100644 --- a/ydb/docs/en/core/faq/serverless.md +++ b/ydb/docs/en/core/faq/serverless.md @@ -1,2 +1 @@ - {% include [serverless.md](_includes/serverless.md) %} diff --git a/ydb/docs/en/core/faq/yql.md b/ydb/docs/en/core/faq/yql.md index f3f23af9cf..1bba08b228 100644 --- a/ydb/docs/en/core/faq/yql.md +++ b/ydb/docs/en/core/faq/yql.md @@ -1,2 +1 @@ - {% include [yql.md](_includes/yql.md) %} diff --git a/ydb/docs/en/core/getting_started/_includes/auth.md b/ydb/docs/en/core/getting_started/_includes/auth.md index 44c79df376..a2e68dab65 100644 --- a/ydb/docs/en/core/getting_started/_includes/auth.md +++ b/ydb/docs/en/core/getting_started/_includes/auth.md @@ -2,9 +2,8 @@ A local YDB database with self-deployment does not require authentication, that is, runs in [anonymous mode](../../concepts/connect.md#auth-modes). -Full information about all available authentication methods is given in the [DB connection](../../concepts/connect.md) article in the "Concepts" section. +Full information about all available authentication methods is given in the [DB connection](../../concepts/connect.md) article under "Concepts". ## Learn more about YDB {#next} -Proceed to the [YDB CLI - Getting started](../cli.md) article to learn more about YDB. - +Go to [YDB CLI: Getting started](../cli.md) to learn more about YDB.
\ No newline at end of file diff --git a/ydb/docs/en/core/getting_started/_includes/cli.md b/ydb/docs/en/core/getting_started/_includes/cli.md index 6799ebf215..341da386d9 100644 --- a/ydb/docs/en/core/getting_started/_includes/cli.md +++ b/ydb/docs/en/core/getting_started/_includes/cli.md @@ -2,10 +2,10 @@ ## Prerequisites {#prerequisites} -To execute commands via the CLI, you need the database connection parameters you've got when [creating](../create_db.md) it: +To run commands via the CLI, you will need database connection settings you can retrieve when [creating](../create_db.md) a connection: -- [Endpoint](../../concepts/connect.md#endpoint) -- [Database name](../../concepts/connect.md#database). +* [Endpoint](../../concepts/connect.md#endpoint). +* [Database name](../../concepts/connect.md#database). You may also need a token or login/password if the database requires [authentication](../auth.md). To execute the below scenario, you need to select an option for saving them in an environment variable. @@ -50,7 +50,7 @@ If the command is successful, a list of objects in the database is shown in resp ## Creating a connection profile {#profile} -To avoid specifying connection parameters every time you call the YDB CLI, use the [profile](../../reference/ydb-cli/profile/index.md). Creating the profile described below will also let you copy subsequent commands through the clipboard without editing them, regardless of what database you're using to complete the "Getting started" step. +To avoid specifying connection parameters every time you call the YDB CLI, use the [profile](../../reference/ydb-cli/profile/index.md). Creating the profile described below will also let you copy subsequent commands through the clipboard without editing them regardless of which database you're using to complete the "Getting started" scenario. [Create the profile](../../reference/ydb-cli/profile/create.md) `db1` using the following command: @@ -76,27 +76,27 @@ The {{ ydb-short-name }} CLI `scripting yql` command lets you execute any comman For example: -- Creating a table +* Creating a table: ```bash - {{ ydb-cli }} --profile db1 yql -s "create table t1(id uint64, primary key(id))" + {{ ydb-cli }} --profile db1 yql -s "create table t1( id uint64, primary key(id))" ``` -- Adding a record +* Adding a record: ```bash {{ ydb-cli }} --profile db1 yql -s "insert into t1(id) values (1)" ``` -- Data selections +* Data selects: ```bash {{ ydb-cli }} --profile db1 yql -s "select * from t1" ``` -If you get the error `Profile db1 does not exist`, it means that you failed to create it in the [previous step](#profile). +If you get the `Profile db1 does not exist` error, that means you neglected to create a profile in the [previous step](#profile). -## Specialized CLI сommands {#ydb-api} +## Specialized CLI commands {#ydb-api} Executing commands via `ydb yql` is a nice and easy way to get started. However, the YQL interface supports a part of the function set provided by the YDB API, and has to sacrifice efficiency for universality. @@ -104,5 +104,4 @@ The YDB CLI supports individual commands with complete sets of options for any e ## Learn more about YDB {#next} -Proceed to the [YQL - Getting started](../yql.md) article to learn more about YDB. - +Proceed to the [YQL - Getting started](../yql.md) article to learn more about YDB.
\ No newline at end of file diff --git a/ydb/docs/en/core/getting_started/_includes/cli/ls_example_generic.md b/ydb/docs/en/core/getting_started/_includes/cli/ls_example_generic.md index 6417d3b6d8..2a385d5489 100644 --- a/ydb/docs/en/core/getting_started/_includes/cli/ls_example_generic.md +++ b/ydb/docs/en/core/getting_started/_includes/cli/ls_example_generic.md @@ -1,11 +1,11 @@ For example, if: -* Endpoint: grpc://ydb.example.com:2136 -* Database name: /john/db1 -* The database doesn't require authentication, or the proper environment variable has been set, as described [here](../../auth.md) article. -* The database has just been created and contains no objects +* Endpoint: `grpc://ydb.example.com:2136`. +* Database name: `/john/db1`. +* The database doesn't require authentication, or the proper environment variable has been set, as described [here](../../auth.md). +* A database has just been created and contains no objects. -Then the command and its execution result will look like this: +the command will look like this: ```bash {{ ydb-cli }} -e grpc://ydb.example.com:2136 -d /john/db1 scheme ls diff --git a/ydb/docs/en/core/getting_started/_includes/cli/ls_example_local.md b/ydb/docs/en/core/getting_started/_includes/cli/ls_example_local.md index 578a6fc688..2e1419bff7 100644 --- a/ydb/docs/en/core/getting_started/_includes/cli/ls_example_local.md +++ b/ydb/docs/en/core/getting_started/_includes/cli/ls_example_local.md @@ -1,6 +1,6 @@ ### Connecting to a local database -If you deployed a local YDB using a scenario for self-deployment [in Docker](../../ydb_docker.md) with the suggested configuration, you can check a YDB connection using the command: +If you deployed a local YDB using a scenario for self-deployment [in Docker](../../self_hosted/ydb_docker.md) with the suggested configuration, you can check a YDB connection using the command: ```bash {{ ydb-cli }} -e grpc://localhost:2136 -d /local scheme ls diff --git a/ydb/docs/en/core/getting_started/_includes/create_db.md b/ydb/docs/en/core/getting_started/_includes/create_db.md index 0edfdee09c..a42e08b892 100644 --- a/ydb/docs/en/core/getting_started/_includes/create_db.md +++ b/ydb/docs/en/core/getting_started/_includes/create_db.md @@ -1,4 +1,4 @@ -# Creating a database - Getting started +# Creating a database: Getting started Detailed information about databases can be found in the article [Terms and definitions - Database](../../concepts/databases.md#database) in the "Concepts" section. @@ -8,11 +8,10 @@ Detailed information about databases can be found in the article [Terms and defi There are three methods you can use to deploy {{ ydb-short-name }}: -* [Using Docker](../ydb_docker.md). +* [Using Docker](../self_hosted/ydb_docker.md). * [In Kubernetes](../../deploy/orchestrated/concepts.md). -* [Locally, from a downloaded executable file](../ydb_local.md). +* [Locally, from a downloaded executable file](../self_hosted/ydb_local.md). ## Learn more about YDB {#next} After creating your database, proceed to the [Authentication - Getting started](../auth.md) article to learn more about YDB. - diff --git a/ydb/docs/en/core/getting_started/_includes/index.md b/ydb/docs/en/core/getting_started/_includes/index.md index e80bce9695..077c56ab67 100644 --- a/ydb/docs/en/core/getting_started/_includes/index.md +++ b/ydb/docs/en/core/getting_started/_includes/index.md @@ -11,4 +11,3 @@ {% include [yql.md](index/yql.md) %} {% include [sdk.md](index/sdk.md) %} - diff --git a/ydb/docs/en/core/getting_started/_includes/index/auth.md b/ydb/docs/en/core/getting_started/_includes/index/auth.md index d704b4463c..e69cc900cd 100644 --- a/ydb/docs/en/core/getting_started/_includes/index/auth.md +++ b/ydb/docs/en/core/getting_started/_includes/index/auth.md @@ -1,2 +1 @@ * [Authentication ](../../auth.md): Learn what you need to access the database. - diff --git a/ydb/docs/en/core/getting_started/_includes/index/cli.md b/ydb/docs/en/core/getting_started/_includes/index/cli.md index fd6d6bc205..e17513d8f4 100644 --- a/ydb/docs/en/core/getting_started/_includes/index/cli.md +++ b/ydb/docs/en/core/getting_started/_includes/index/cli.md @@ -1,2 +1 @@ * [Using the command line interface (CLI)](../../cli.md): Install the {{ ydb-short-name }} CLI, connect to the DB, and view the usage examples. - diff --git a/ydb/docs/en/core/getting_started/_includes/index/create_db.md b/ydb/docs/en/core/getting_started/_includes/index/create_db.md index d65b99d89c..81e30281d4 100644 --- a/ydb/docs/en/core/getting_started/_includes/index/create_db.md +++ b/ydb/docs/en/core/getting_started/_includes/index/create_db.md @@ -1,2 +1 @@ -- [Creating a database ](../../create_db.md): Create your own open-source {{ ydb-short-name }} database - +* [Creating a database ](../../create_db.md): Create your own open-source {{ ydb-short-name }} database. diff --git a/ydb/docs/en/core/getting_started/_includes/index/intro.md b/ydb/docs/en/core/getting_started/_includes/index/intro.md index 5526958d49..03cf6cda74 100644 --- a/ydb/docs/en/core/getting_started/_includes/index/intro.md +++ b/ydb/docs/en/core/getting_started/_includes/index/intro.md @@ -3,4 +3,3 @@ The articles in this section will tell you how to quickly get started with {{ ydb-short-name }}. Each article provides one or more simple scenarios of doing an action, and additionally includes a link to other documents describing all the available {{ ydb-short-name }} features. - diff --git a/ydb/docs/en/core/getting_started/_includes/index/sdk.md b/ydb/docs/en/core/getting_started/_includes/index/sdk.md index 8f551767ed..cd34153a1f 100644 --- a/ydb/docs/en/core/getting_started/_includes/index/sdk.md +++ b/ydb/docs/en/core/getting_started/_includes/index/sdk.md @@ -1,2 +1 @@ * [{{ ydb-short-name }} SDK](../../sdk.md): Get familiar with {{ ydb-short-name }} SDKs for different programming languages and run simple DB queries from sample apps. - diff --git a/ydb/docs/en/core/getting_started/_includes/index/yql.md b/ydb/docs/en/core/getting_started/_includes/index/yql.md index 2c2095a05e..5dbab8ad6b 100644 --- a/ydb/docs/en/core/getting_started/_includes/index/yql.md +++ b/ydb/docs/en/core/getting_started/_includes/index/yql.md @@ -1,2 +1 @@ -* [YQL](../../yql.md): Get familiar with YQL, the main query language for {{ ydb-short-name }}, an SQL dialect. - +* [YQL](../../yql.md): Get familiar with YQL, the primary query language for {{ ydb-short-name }} and a SQL dialect. diff --git a/ydb/docs/en/core/getting_started/_includes/sdk.md b/ydb/docs/en/core/getting_started/_includes/sdk.md index 7cd0b38c37..5a53ec55eb 100644 --- a/ydb/docs/en/core/getting_started/_includes/sdk.md +++ b/ydb/docs/en/core/getting_started/_includes/sdk.md @@ -6,9 +6,8 @@ Follow these steps to launch a simple app using {{ ydb-short-name }}: 1. [Install the {{ ydb-short-name }} SDK](../../reference/ydb-sdk/install.md) for the appropriate programming language. -2. Download and run a sample test app using the SDK for the installed programming language and study its code: - - [Python](../../reference/ydb-sdk/example/python/index.md) - - [Go](../../reference/ydb-sdk/example/go/index.md) +1. Download and run a sample test app using the SDK for the installed programming language and study its code: + * [Python](../../reference/ydb-sdk/example/python/index.md) + * [Go](../../reference/ydb-sdk/example/go/index.md) For more information about the {{ ydb-short-name }} SDK, see [Working with the {{ ydb-short-name }} SDK](../../reference/ydb-sdk/index.md). - diff --git a/ydb/docs/en/core/getting_started/_includes/useful_links.md b/ydb/docs/en/core/getting_started/_includes/useful_links.md index 6a151bcf0d..c8203a4e9a 100644 --- a/ydb/docs/en/core/getting_started/_includes/useful_links.md +++ b/ydb/docs/en/core/getting_started/_includes/useful_links.md @@ -2,7 +2,10 @@ {% if oss %} -* [{{ ydb-short-name }} OpenSource website](https://ydb.tech){% endif %} -* [Yandex.Cloud management console](https://console.cloud.yandex.com) -* [GitHub account ydb-platform](https://github.com/ydb-platform) +* [{{ ydb-short-name }} OpenSource](https://ydb.tech). +{% endif %} + +* [{{ yandex-cloud }} management console](https://console.cloud.yandex.com). + +* [GitHub account ydb-platform](https://github.com/ydb-platform). diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md index 5e3ab4fb0e..e69de29bb2 100644 --- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md +++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md @@ -1,20 +0,0 @@ -# Using the {{ ydb-short-name }} Docker container - -For debugging or testing, you can run the YDB [Docker](https://docs.docker.com/get-docker/) container. - -As a result of completing the instructions below, you'll get a local YDB database that can be accessed using the following: - -{% list tabs %} - -- gRPC - - [Endpoint ](../../../concepts/connect.md#endpoint): `grpc://localhost:2136` - - [Database location](../../../concepts/connect.md#database): `/local` - - [Authentication](../../../concepts/connect.md#auth-modes): Anonymous (without authentication) - -- gRPCs/TLS - - [Endpoint ](../../../concepts/connect.md#endpoint): `grpcs://localhost:2135` - - [Database location](../../../concepts/connect.md#database): `/local` - - [Authentication](../../../concepts/connect.md#auth-modes): Anonymous (without authentication) - -{% endlist %} - diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md index 49bb8670bc..e69de29bb2 100644 --- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md +++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md @@ -1,49 +0,0 @@ -## Starting {#start} - -The YDB Docker container uses the host system resources (CPU, RAM) within the limits allocated by the Docker settings. - -The YDB Docker container stores data in its file system whose sections are reflected in the host system directory. The start container command given below will create files in the current directory, so first create a working directory and then start the container from it: - -```bash -docker run -d --rm --name ydb-local -h localhost \ - -p 2135:2135 -p 8765:8765 -p 2136:2136 \ - -v $(pwd)/ydb_certs:/ydb_certs -v $(pwd)/ydb_data:/ydb_data \ - -e YDB_DEFAULT_LOG_LEVEL=NOTICE \ - -e GRPC_TLS_PORT=2135 -e GRPC_PORT=2136 -e MON_PORT=8765 \ - {{ ydb_local_docker_image}}:{{ ydb_local_docker_image_tag }} -``` - -If started successfully, you'll see the ID of the created container. - -### Startup parameters {#start-pars} - -`-d` means running the Docker container in the background. - -`--rm` means removing the container after its operation is completed. - -`--name` is the container name. Specify `ydb-local` to be able to perform the below instructions for stopping the container by copying text through the clipboard. - -`-h` is the container host name. Be sure to pass the `localhost` value. Otherwise, the container will be started with a random hostname. - -`-v` means mounting the host system directories into a container like `<host system directory>:<mount directory in the container>`. The YDB container uses the following mount directories: - -- `/ydb_data` for storing data. If this directory is not mounted, the container will be started without saving data to the host system disk. -- `/ydb_certs` for storing certificates to establish a TLS connection. The started container will write to this directory the certificates to be used for a TLS client connection. If this directory is not mounted, you won't be able to connect via TLS due to having no certificate information. - -`-e`: means setting environment variables in `<name>=<value>` format. The YDB container uses the following environment variables: - -- `YDB_DEFAULT_LOG_LEVEL`: The logging level. Acceptable values: `CRIT`, `ERROR`, `WARN`, `NOTICE`, and `INFO`. Defaults to `NOTICE`. -- `GRPC_PORT`: The port for unencrypted connections. Defaults to 2136. -- `GRPC_TLS_PORT`: The port for TLS connections. Defaults to 2135. -- `MON_PORT`: The port for the built-in web UI with [monitoring and introspection tools](../../../maintenance/embedded_monitoring/ydb_monitoring.md). Defaults to 8765. -- `YDB_PDISK_SIZE`: The size of the disk for storing data in `<NUM>GB` format (for example, `YDB_PDISK_SIZE=128GB`). Acceptable values: `64GB` and higher. Defaults to 64GB. -- `YDB_USE_IN_MEMORY_PDISKS`: Using disks in memory. Acceptable values are `true` and `false`, defaults to `false`. If enabled, the container's file system is not used for working with data, all data is only stored in the memory of a process and is lost when it's stopped. Currently, you can start the container on Apple M1 in this mode only. - -`-p` means publishing container ports on the host system. All applicable ports must be explicitly listed even if default values are used. - -{% note info %} - -It may take several minutes to initialize the Docker container, depending on the allocated resources. The database will not be available until the container is initialized. - -{% endnote %} - diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md index 4c2b3919a1..e69de29bb2 100644 --- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md +++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md @@ -1,24 +0,0 @@ -## Making queries {#request} - -Install the YDB CLI and execute queries as described in [YDB CLI - Getting started](../../cli.md), using the endpoint and database location specified at the beginning of this article. For example: - -```bash -ydb -e grpc://localhost:2136 -d /local scheme ls -``` - -To ensure a connection using TLS is successful, add the name of the file with the certificate to the connection parameters. The query in the example below should be executed from the same working directory that you used to start the container: - -```bash -ydb -e grpcs://localhost:2135 --ca-file ydb_certs/ca.pem -d /local scheme ls -``` - -A precompiled version of the [YDB CLI](../../../reference/ydb-cli/index.md) is also available within the image: - -```bash -docker exec <container_id> /ydb -e localhost:2136 -d /local scheme ls -``` - -, where - -`<container_id>`: The container ID output when you [start](#start) it. - diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/05_stop.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/05_stop.md index 7a102068b4..e69de29bb2 100644 --- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/05_stop.md +++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/05_stop.md @@ -1,8 +0,0 @@ -## Stopping {#stop} - -When everything is done, stop a Docker container: - -```bash -docker kill ydb-local -``` - diff --git a/ydb/docs/en/core/getting_started/_includes/yql.md b/ydb/docs/en/core/getting_started/_includes/yql.md index b8d7f11361..e4ef10340f 100644 --- a/ydb/docs/en/core/getting_started/_includes/yql.md +++ b/ydb/docs/en/core/getting_started/_includes/yql.md @@ -1,4 +1,4 @@ -# YQL - Getting started +# YQL: Getting started ## Introduction {#intro} @@ -6,7 +6,7 @@ YQL is a {{ ydb-short-name }} query language, a dialect of SQL. Specifics of its For more information about the YQL syntax, see the [YQL reference](../../yql/reference/index.md). -The examples below show how to get started with YQL and assume sequential execution of the steps described: queries in the ["Working with data"](#dml) section access data in tables created in the ["Working with a data schema"](#ddl) section. Follow the steps one by one so that the examples copied through the clipboard are executed successfully. +The examples below demonstrate how to get started with YQL and assume that the steps described will be completed sequentially: the queries in the [Working with data](#dml) section access data in the tables created in the [Working with a data schema](#ddl) section. Follow the steps one by one so that the examples copied through the clipboard are executed successfully. The {{ ydb-short-name }} YQL basic interface accepts a script that may consist of multiple commands and not a single command as input. @@ -16,9 +16,9 @@ In {{ ydb-short-name }}, you can make YQL queries to a database using: {% include [yql/ui_prompt.md](yql/ui_prompt.md) %} -- [{{ ydb-short-name }} CLI](#cli) +* [{{ ydb-short-name }} CLI](#cli). -- [{{ ydb-short-name }} SDK](../sdk.md) +* [{{ ydb-short-name }} SDK](../sdk.md). {% include [yql/ui_execute.md](yql/ui_execute.md) %} @@ -26,9 +26,9 @@ In {{ ydb-short-name }}, you can make YQL queries to a database using: To execute scripts using the {{ ydb-short-name }} CLI, first do the following: -- [Install the CLI](../cli.md#install). -- Define and check [DB connection parameters](../cli#scheme-ls). -- [Create a `db1` profile](../cli.md#profile) configured to connect to your database. +* [Install the CLI](../cli.md#install). +* Define and check [DB connection settings](../cli#scheme-ls). +* [Create a `db1` profile](../cli.md#profile) configured to connect to your database. Save the text of the scripts below to a file. Name it `script.yql` to be able to run the statements given in the examples by simply copying them through the clipboard. Next, run `{{ ydb-cli }} yql` indicating the use of the `db1` profile and reading the script from the `script.yql` file: @@ -51,7 +51,7 @@ CREATE TABLE series ( series_id Uint64, title Utf8, series_info Utf8, - release_date Uint64, + release_date Date, PRIMARY KEY (series_id) ); @@ -59,8 +59,8 @@ CREATE TABLE seasons ( series_id Uint64, season_id Uint64, title Utf8, - first_aired Uint64, - last_aired Uint64, + first_aired Date, + last_aired Date, PRIMARY KEY (series_id, season_id) ); @@ -69,18 +69,18 @@ CREATE TABLE episodes ( season_id Uint64, episode_id Uint64, title Utf8, - air_date Uint64, + air_date Date, PRIMARY KEY (series_id, season_id, episode_id) ); ``` -For a description of all features of working with tables, see the following sections of the YQL documentation: +For a description of everything you can do when working with tables, review the relevant sections of the YQL documentation: -- [`CREATE TABLE`](../../yql/reference/syntax/create_table.md): Creating a table and defining initial parameters. -- [`ALTER TABLE`](../../yql/reference/syntax/alter_table.md): Changing the composition of table columns and parameters. -- [`DROP TABLE`](../../yql/reference/syntax/drop_table.md): Deleting a table. +* [CREATE TABLE](../../yql/reference/syntax/create_table.md): Create a table and define its initial properties. +* [ALTER TABLE](../../yql/reference/syntax/alter_table.md): Modify a table's column structure and properties. +* [DROP TABLE](../../yql/reference/syntax/drop_table.md): Delete a table. -To execute the script via the {{ ydb-short-name }} CLI, follow the instructions given in the ["Executing YQL scripts in the {{ ydb-short-name }} CLI"](#cli) section in this article. +To execute a script via the {{ ydb-short-name }} CLI, follow the instructions provided under [Executing YQL scripts in the {{ ydb-short-name }} CLI](#cli) below. ### Getting a list of existing DB tables {#scheme-ls} @@ -88,7 +88,7 @@ Check that the tables are actually created in the database. {% include [yql/ui_scheme_ls.md](yql/ui_scheme_ls.md) %} -To get a list of existing DB tables via the {{ ydb-short-name }} CLI, be sure to meet the prerequisites of the ["Executing YQL scripts in the {{ ydb-short-name }} CLI"](#cli) section of this article and run [the `scheme ls` statement](../cli.md#ping): +To get a list of existing DB tables via the {{ ydb-short-name }} CLI, make sure that the prerequisites under [Executing YQL scripts in the {{ ydb-short-name }} CLI](#cli) below are complete and run [the `scheme ls` statement](../cli.md#ping): ```bash {{ ydb-cli }} --profile db1 scheme ls @@ -96,11 +96,11 @@ To get a list of existing DB tables via the {{ ydb-short-name }} CLI, be sure to ## Operations with data {#dml} -Commands for executing YQL queries and scripts in the YDB CLI and web interface are run in **Autocommit** mode, meaning that a transaction is committed automatically after a transaction is completed. +Commands for running YQL queries and scripts in the YDB CLI and the web interface run in Autocommit mode meaning that a transaction is committed automatically after it is completed. -### UPSERT : Adding data {#upsert} +### UPSERT: Adding data {#upsert} -The most efficient way to add data to {{ ydb-short-name }} is through the [`UPSERT`](../../yql/reference/syntax/upsert_into.md) statement. It inserts new data by primary keys regardless of whether data by these keys previously existed in the table. As a result, unlike regular `INSERT` and `UPDATE` statements, its execution does not require a pre-fetch of data on the server to verify if a key is unique. When working with {{ ydb-short-name }}, always consider `UPSERT` as the main way to add data and only use other statements when absolutely necessary. +The most efficient way to add data to {{ ydb-short-name }} is through the [`UPSERT`](../../yql/reference/syntax/upsert_into.md) statement. It inserts new data by primary keys regardless of whether data by these keys previously existed in the table. As a result, unlike regular `INSERT` and `UPDATE`, it does not require a data pre-fetch from the server to verify that a key is unique before it runs. When working with {{ ydb-short-name }}, always consider `UPSERT` as the main way to add data and only use other statements when absolutely necessary. All statements that write data to {{ ydb-short-name }} support working with both samples and multiple entries passed directly in a query. @@ -112,43 +112,43 @@ VALUES ( 1, "IT Crowd", - CAST(Date("2006-02-03") AS Uint64), + Date("2006-02-03"), "The IT Crowd is a British sitcom produced by Channel 4, written by Graham Linehan, produced by Ash Atalla and starring Chris O'Dowd, Richard Ayoade, Katherine Parkinson, and Matt Berry."), ( 2, "Silicon Valley", - CAST(Date("2014-04-06") AS Uint64), + Date("2014-04-06"), "Silicon Valley is an American comedy television series created by Mike Judge, John Altschuler and Dave Krinsky. The series focuses on five young men who founded a startup company in Silicon Valley." ) ; UPSERT INTO seasons (series_id, season_id, title, first_aired, last_aired) VALUES - (1, 1, "Season 1", CAST(Date("2006-02-03") AS Uint64), CAST(Date("2006-03-03") AS Uint64)), - (1, 2, "Season 2", CAST(Date("2007-08-24") AS Uint64), CAST(Date("2007-09-28") AS Uint64)), - (2, 1, "Season 1", CAST(Date("2014-04-06") AS Uint64), CAST(Date("2014-06-01") AS Uint64)), - (2, 2, "Season 2", CAST(Date("2015-04-12") AS Uint64), CAST(Date("2015-06-14") AS Uint64)) + (1, 1, "Season 1", Date("2006-02-03"), Date("2006-03-03")), + (1, 2, "Season 2", Date("2007-08-24"), Date("2007-09-28")), + (2, 1, "Season 1", Date("2014-04-06"), Date("2014-06-01")), + (2, 2, "Season 2", Date("2015-04-12"), Date("2015-06-14")) ; UPSERT INTO episodes (series_id, season_id, episode_id, title, air_date) VALUES - (1, 1, 1, "Yesterday's Jam", CAST(Date("2006-02-03") AS Uint64)), - (1, 1, 2, "Calamity Jen", CAST(Date("2006-02-03") AS Uint64)), - (2, 1, 1, "Minimum Viable Product", CAST(Date("2014-04-06") AS Uint64)), - (2, 1, 2, "The Cap Table", CAST(Date("2014-04-13") AS Uint64)) + (1, 1, 1, "Yesterday's Jam", Date("2006-02-03")), + (1, 1, 2, "Calamity Jen", Date("2006-02-03")), + (2, 1, 1, "Minimum Viable Product", Date("2014-04-06")), + (2, 1, 2, "The Cap Table", Date("2014-04-13")) ; ``` -To execute the script via the {{ ydb-short-name }} CLI, follow the instructions given in the ["Executing YQL scripts in the {{ ydb-short-name }} CLI"](#cli) section in this article. +To execute a script via the {{ ydb-short-name }} CLI, follow the instructions provided under [Executing YQL scripts in the {{ ydb-short-name }} CLI](#cli) below. -To learn more about the commands for writing data, see the YQL reference: +To learn more about commands for writing data, see the YQL reference: -- [`INSERT`](../../yql/reference/syntax/insert_into.md): Adds entries. -- [`REPLACE`](../../yql/reference/syntax/replace_into.md): Adds/updates entries. -- [`UPDATE`](../../yql/reference/syntax/update.md): Updates the specified fields. -- [`UPSERT`](../../yql/reference/syntax/upsert_into.md): Adds entries/updates the specified fields. +* [INSERT](../../yql/reference/syntax/insert_into.md): Add records. +* [REPLACE](../../yql/reference/syntax/replace_into.md): Add/update records. +* [UPDATE](../../yql/reference/syntax/update.md): Update specified fields. +* [UPSERT](../../yql/reference/syntax/upsert_into.md): Add records/modify specified fields. -### SELECT : Data selection {#select} +### SELECT : Data retrieval {#select} Make a select of the data added in the previous step: @@ -156,7 +156,7 @@ Make a select of the data added in the previous step: SELECT series_id, title AS series_title, - DateTime::ToDate(DateTime::FromDays(release_date)) AS release_date + release_date FROM series; ``` @@ -168,13 +168,13 @@ SELECT * FROM episodes; If there are several `SELECT` statements in the YQL script, its execution will return several samples, each of which can be accessed separately. Run the above `SELECT` statements as a single script. -To execute the script via the {{ ydb-short-name }} CLI, follow the instructions given in the ["Executing YQL scripts in the {{ ydb-short-name }} CLI"](#cli) section in this article. +To execute a script via the {{ ydb-short-name }} CLI, follow the instructions provided under [Executing YQL scripts in the {{ ydb-short-name }} CLI](#cli) below. To learn more about the commands for selecting data, see the YQL reference: -- [`SELECT`](../../yql/reference/syntax/select.md): Selects data. -- [`SELECT ... JOIN`](../../yql/reference/syntax/join.md): Joins tables when making a select. -- [`SELECT ... GROUP BY`](../../yql/reference/syntax/group_by.md): Groups data when making a select. +* [SELECT](../../yql/reference/syntax/select.md): Select data. +* [SELECT ... JOIN](../../yql/reference/syntax/join.md): Join tables in a select. +* [SELECT ... GROUP BY](../../yql/reference/syntax/group_by.md): Group data in a select. ### Parameterized queries {#param} @@ -182,11 +182,11 @@ Transactional applications working with a database are characterized by the exec To define parameters in the text of a YQL query, use the [DECLARE](../../yql/reference/syntax/declare.md) statement. -Methods for executing parameterized queries in the {{ ydb-short-name }} SDK are described in the [Test case](../../reference/ydb-sdk/example/index.md) section under "Parameterized queries" for the appropriate programming language. +Methods for executing parameterized queries in the {{ ydb-short-name }} SDK are described in the [Test case](../../reference/ydb-sdk/example/index.md) section under Parameterized queries for the appropriate programming language. When debugging a parameterized query in the {{ ydb-short-name }} SDK, you can test it by calling the {{ ydb-short-name }} CLI, copying the full text of the query without any edits, and setting parameter values. -Save the script for executing the parameterized query in a text file named `script.yql`: +Save the parameterized query script in a text file named`script.yql`: ```sql DECLARE $seriesId AS Uint64; @@ -198,7 +198,7 @@ INNER JOIN series AS sr ON sa.series_id = sr.series_id WHERE sa.series_id = $seriesId AND sa.season_id = $seasonId; ``` -To make a parameterized select query, be sure to meet the prerequisites of the ["Executing YQL scripts in the {{ ydb-short-name }} CLI"](#cli) section of this article and run: +To run a parameterized select query, make sure to complete the prerequisites under [Executing YQL scripts in the {{ ydb-short-name }} CLI](#cli) below and run: ```bash {{ ydb-cli }} --profile db1 yql -f script.yql -p '$seriesId=1' -p '$seasonId=1' @@ -213,4 +213,3 @@ You can learn more about YQL use cases by completing tasks from the [YQL tutoria ## Learn more about YDB {#next} Proceed to the [YDB SDK - Getting started](../sdk.md) article to learn more about YDB. - diff --git a/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_execute.md b/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_execute.md index 8f7e3ea6bd..88f68d5b2e 100644 --- a/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_execute.md +++ b/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_execute.md @@ -1,6 +1,6 @@ ### Built-in YDB web interface {#embedded} -To execute YQL queries and scripts on self-deployed YDB databases, you can use the [built-in YDB web interface](../../../maintenance/embedded_monitoring/overview.md). For a local deployment [using Docker](../../ydb_docker.md) with the default parameters, it is available at [http://localhost:8765](http://localhost:8765). +To execute YQL queries and scripts on self-deployed YDB databases, you can use the [built-in YDB web interface](../../../maintenance/embedded_monitoring/overview.md). For a local deployment [using Docker](../../self_hosted/ydb_docker.md) with the default parameters, it is available at [http://localhost:8765](http://localhost:8765). Select **Databases** in the menu on the left, click on the database in the list, and switch to the **Query** tab: diff --git a/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_prompt.md b/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_prompt.md index 151432baf3..874077207a 100644 --- a/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_prompt.md +++ b/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_prompt.md @@ -1,2 +1,2 @@ -- [Built-in web interface](#embedded) +* [Built-in web interface](#embedded) diff --git a/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_scheme_ls.md b/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_scheme_ls.md index e5fd20f672..ac6b1b1358 100644 --- a/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_scheme_ls.md +++ b/ydb/docs/en/core/getting_started/_includes/yql/ui_embedded_scheme_ls.md @@ -1,2 +1,2 @@ -In the built-in YDB web interface, the list of tables is shown on the left of the database page as a hierarchy. On the **Info** tab, you can see detailed information about the object selected in the hierarchy. +The built-in YDB web interface displays the list of tables as a hierarchy on the left-hand side of the database page. On the **Info** tab, you can see detailed information about the object selected in the hierarchy. diff --git a/ydb/docs/en/core/getting_started/_includes/yql/ui_execute.md b/ydb/docs/en/core/getting_started/_includes/yql/ui_execute.md index 16e7f9d06c..255f9ad5ae 100644 --- a/ydb/docs/en/core/getting_started/_includes/yql/ui_execute.md +++ b/ydb/docs/en/core/getting_started/_includes/yql/ui_execute.md @@ -1,2 +1 @@ - -{% include [ui_embedded_execute.md](ui_embedded_execute.md) %}
\ No newline at end of file +{% include [ui_embedded_execute.md](ui_embedded_execute.md) %} diff --git a/ydb/docs/en/core/getting_started/_includes/yql/ui_prompt.md b/ydb/docs/en/core/getting_started/_includes/yql/ui_prompt.md index 9550e1b18f..8676922f24 100644 --- a/ydb/docs/en/core/getting_started/_includes/yql/ui_prompt.md +++ b/ydb/docs/en/core/getting_started/_includes/yql/ui_prompt.md @@ -1,2 +1 @@ - -{% include [ui_embedded_prompt.md](ui_embedded_prompt.md) %}
\ No newline at end of file +{% include [ui_embedded_prompt.md](ui_embedded_prompt.md) %} diff --git a/ydb/docs/en/core/getting_started/index.md b/ydb/docs/en/core/getting_started/index.md index 12643df073..28128865c0 100644 --- a/ydb/docs/en/core/getting_started/index.md +++ b/ydb/docs/en/core/getting_started/index.md @@ -1 +1,6 @@ -{% include [index.md](_includes/index.md) %} +--- +title: Getting started with Yandex Database (YDB). Overview +--- + +# Getting started with {{ ydb-name }} + diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/index.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/index.md new file mode 100644 index 0000000000..a9a5e6ebc5 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/index.md @@ -0,0 +1,9 @@ +# Self-deployment of a database {{ ydb-short-name }} + +This section contains articles describing simple YDB deployment scenarios. They can be used by application developers to quickly deploy their own YDB database for development or testing purposes. + +* [Running YDB in Docker](../ydb_docker.md). +* [Running YDB from a binary file](../ydb_local.md). +* [Running YDB in Minikube](../ydb_minikube.md). + +For information about deploying YDB clusters for administrators, see [Administration](../../../deploy/index.md). diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/wget_auth_overlay.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/wget_auth_overlay.md new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/wget_auth_overlay.md diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker.md new file mode 100644 index 0000000000..041d08bf92 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker.md @@ -0,0 +1,13 @@ + +{% include [intro.md](ydb_docker/01_intro.md) %} + +{% include [install.md](ydb_docker/02_install.md) %} + +{% include [start.md](ydb_docker/03_start.md) %} + +{% include [request.md](ydb_docker/04_request.md) %} + +{% include [stop.md](ydb_docker/05_stop.md) %} + +{% include [license.md](ydb_docker/06_license.md) %} + diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/01_intro.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/01_intro.md new file mode 100644 index 0000000000..41af591d4a --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/01_intro.md @@ -0,0 +1,21 @@ +# Running {{ ydb-short-name }} in Docker + +For debugging or testing, you can run the YDB [Docker](https://docs.docker.com/get-docker/) container. + +## Connection parameters {#conn} + +As a result of completing the instructions below, you'll get a local YDB database that can be accessed using the following: + +{% list tabs %} + +- gRPC + * [Endpoint ](../../../../concepts/connect.md#endpoint): `grpc://localhost:2136`. + * [Database location](../../../../concepts/connect.md#database): `/local`. + * [Authentication ](../../../../concepts/connect.md#auth-modes): Anonymous (without authentication). + +- gRPCs/TLS + * [Endpoint ](../../../../concepts/connect.md#endpoint): `grpcs://localhost:2135`. + * [Database location](../../../../concepts/connect.md#database): `/local`. + * [Authentication ](../../../../concepts/connect.md#auth-modes): Anonymous (without authentication). + +{% endlist %} diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/02_install.md index 8069f28edd..8069f28edd 100644 --- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/02_install.md diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md new file mode 100644 index 0000000000..ab54c8d51f --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md @@ -0,0 +1,48 @@ +## Starting {#start} + +The YDB Docker container uses the host system resources (CPU, RAM) within the limits allocated by the Docker settings. + +The YDB Docker container stores data in its file system whose sections are reflected in the host system directory. The start container command given below will create files in the current directory, so first create a working directory and then start the container from it: + +```bash +docker run -d --rm --name ydb-local -h localhost \ + -p 2135:2135 -p 8765:8765 -p 2136:2136 \ + -v $(pwd)/ydb_certs:/ydb_certs -v $(pwd)/ydb_data:/ydb_data \ + -e YDB_DEFAULT_LOG_LEVEL=NOTICE \ + -e GRPC_TLS_PORT=2135 -e GRPC_PORT=2136 -e MON_PORT=8765 \ + {{ ydb_local_docker_image}}:{{ ydb_local_docker_image_tag }} +``` + +If started successfully, you'll see the ID of the created container. + +### Startup parameters {#start-pars} + +`-d` means running the Docker container in the background. + +`--rm` means removing the container after its operation is completed. + +`--name` is the container name. Specify `ydb-local` to be able to perform the below instructions for stopping the container by copying text through the clipboard. + +`-h` is the container host name. Be sure to pass the `localhost` value. Otherwise, the container will be started with a random hostname. + +`-v` means mounting the host system directories into a container like `<host system directory>:<mount directory in the container>`. The YDB container uses the following mount directories: + +- `/ydb_data` for storing data. If this directory is not mounted, the container will be started without saving data to the host system disk. +- `/ydb_certs` for storing certificates to establish a TLS connection. The started container will write to this directory the certificates to be used for a TLS client connection. If this directory is not mounted, you won't be able to connect via TLS due to having no certificate information. + +`-e`: means setting environment variables in `<name>=<value>`format. The YDB container uses the following environment variables: + +* `YDB_DEFAULT_LOG_LEVEL`: The logging level. Acceptable values: `CRIT`, `ERROR`, `WARN`, `NOTICE`, and `INFO`. Defaults to `NOTICE`. +* `GRPC_PORT`: The port for unencrypted connections. Defaults to 2136. +* `GRPC_TLS_PORT`: The port for TLS connections. Defaults to 2135. +* `MON_PORT`: The port for the built-in web UI with [monitoring and introspection tools](../../../../maintenance/embedded_monitoring/ydb_monitoring.md). Defaults to 8765. +* `YDB_PDISK_SIZE`: The size of the disk for storing data in `<NUM>GB` format (for example, `YDB_PDISK_SIZE=128GB`). Acceptable values: `64GB` and higher. Defaults to 64GB. +* `YDB_USE_IN_MEMORY_PDISKS`: Using disks in memory. Acceptable values are `true` and `false`, defaults to `false`. If enabled, the container's file system is not used for working with data, all data is only stored in the memory of a process and is lost when it's stopped. Currently, you can start the container on Apple M1 in this mode only. + +`-p` means publishing container ports on the host system. All applicable ports must be explicitly listed even if default values are used. + +{% note info %} + +It may take several minutes to initialize the Docker container, depending on the allocated resources. The database will not be available until the container is initialized. + +{% endnote %} diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/04_request.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/04_request.md new file mode 100644 index 0000000000..18e232ff80 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/04_request.md @@ -0,0 +1,24 @@ +## Making queries {#request} + +Install the YDB CLI and execute queries as described in [YDB CLI - Getting started](../../../cli.md), using the endpoint and database location specified at the beginning of this article. For example: + +```bash +ydb -e grpc://localhost:2136 -d /local scheme ls +``` + +To ensure a connection using TLS is successful, add the name of the file with the certificate to the connection parameters. The query in the example below should be executed from the same working directory that you used to start the container: + +```bash +ydb -e grpcs://localhost:2135 --ca-file ydb_certs/ca.pem -d /local scheme ls +``` + +A precompiled version of the [YDB CLI](../../../../reference/ydb-cli/index.md) is also available within the image: + +```bash +docker exec <container_id> /ydb -e localhost:2136 -d /local scheme ls +``` + +Where: + +`<container_id>`: The container ID output when you [start](#start) it. + diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/05_stop.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/05_stop.md new file mode 100644 index 0000000000..7a102068b4 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/05_stop.md @@ -0,0 +1,8 @@ +## Stopping {#stop} + +When everything is done, stop a Docker container: + +```bash +docker kill ydb-local +``` + diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/06_license.md index 4b6be5ea22..5b30437008 100644 --- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/06_license.md @@ -13,4 +13,3 @@ View all the included components and their licenses: ```bash docker run --rm -it --entrypoint cat {{ ydb_local_docker_image }} THIRD_PARTY_LICENSES ``` - diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md new file mode 100644 index 0000000000..245b8e908a --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md @@ -0,0 +1,77 @@ +# Running {{ ydb-short-name }} from a binary file + +This section describes how to deploy a local {{ ydb-short-name }} cluster using a compiled binary file. Currently, the system **only supports builds for Linux**. Support for Windows and MacOS builds will be added later. + +## Connection parameters {#conn} + +As a result of completing the steps below, you'll get a YDB database running on a local VM instance that you can connect to using the following: + +* [Endpoint ](../../../concepts/connect.md#endpoint): `grpc://localhost:2136`. +* [Database location](../../../concepts/connect.md#database): `/Root/test`. +* [Authentication ](../../../concepts/connect.md#auth-modes): Anonymous (without authentication). + +## Installation {#install} + +Create a working directory. Run the script for downloading an archive with the `ydbd` executable file and the necessary {{ ydb-short-name }} libraries, and a set of scripts and auxiliary files for starting and stopping the server: + +```bash +curl https://binaries.ydb.tech/local_scripts/install.sh | bash +``` + +{% include [wget_auth_overlay.md](wget_auth_overlay.md) %} + +## Starting {#start} + +The local YDB server can be started in disk or in-memory mode: + +{% list tabs %} + +- Storing data on disk + + * To store data on disk, when running the script for the first time, a 64 GB file named `ydb.data` is created in the working directory. Make sure you have enough free space to create it. + + * Run the following command from the working directory: + + ```bash + ./start.sh disk + ``` + +- Storing data in memory + + * Under in-memory data storage, the data is lost when stopping the server. + + * Run the following command from the working directory: + + ```bash + ./start.sh ram + ``` + +{% endlist %} + +The YDB server is started in the context of the current terminal window. Closing the terminal window stops the server. + +If you get an error saying `Failed to set up IC listener on port 19001 errno# 98 (Address already in use)` at startup, the server might have already been started and you should stop it with the `stop.sh` script (see below). + +## Stopping {#stop} + +To stop the server, run the following command in the working directory: + +```bash +./stop.sh +``` + +## Making queries via the YDB CLI {#cli} + +[Install the YDB CLI](../../../reference/ydb-cli/install.md) and execute queries as described in [YDB CLI - Getting started](../../cli.md) using the endpoint and database location specified [at the beginning of this article](#conn). For example: + +```bash +ydb -e grpc://localhost:2136 -d /Root/test scheme ls +``` + +## Working with the database via the Web UI {#web-ui} + +To work with the DB structure and data, you can also use the web interface embedded in the `ydbd` process. It is available at `http://localhost:8765`. For more information about the embedded web interface, see [Embedded UI](../../../maintenance/embedded_monitoring/ydb_monitoring.md). + +## Additional information {#advanced} + +Instructions for administrators on how to deploy clusters from multiple nodes and configure them are given in [Deploy YDB on-premises](../../../deploy/manual/deploy-ydb-on-premises.md) in the "Administration" section. diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_minikube.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_minikube.md new file mode 100644 index 0000000000..d7f4753715 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_minikube.md @@ -0,0 +1,3 @@ +# Running {{ ydb-short-name }} in Minikube + +The article is under development. diff --git a/ydb/docs/en/core/getting_started/self_hosted/index.md b/ydb/docs/en/core/getting_started/self_hosted/index.md new file mode 100644 index 0000000000..aabc043742 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/index.md @@ -0,0 +1 @@ +{% include [index.md](_includes/index.md) %}
\ No newline at end of file diff --git a/ydb/docs/en/core/getting_started/self_hosted/toc_i.yaml b/ydb/docs/en/core/getting_started/self_hosted/toc_i.yaml new file mode 100644 index 0000000000..58b47616c8 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/toc_i.yaml @@ -0,0 +1,7 @@ +items: +- name: Docker + href: ydb_docker.md +- name: Binary file + href: ydb_local.md +- name: Minikube + href: ydb_minikube.md
\ No newline at end of file diff --git a/ydb/docs/en/core/getting_started/self_hosted/toc_p.yaml b/ydb/docs/en/core/getting_started/self_hosted/toc_p.yaml new file mode 100644 index 0000000000..a6550f8117 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/toc_p.yaml @@ -0,0 +1,4 @@ +items: +- name: Overview + href: index.md +- include: { mode: link, path: toc_i.yaml } diff --git a/ydb/docs/en/core/getting_started/self_hosted/ydb_docker.md b/ydb/docs/en/core/getting_started/self_hosted/ydb_docker.md new file mode 100644 index 0000000000..968cfe6e2c --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/ydb_docker.md @@ -0,0 +1,2 @@ + +{% include [ydb_docker.md](_includes/ydb_docker.md) %} diff --git a/ydb/docs/en/core/getting_started/self_hosted/ydb_local.md b/ydb/docs/en/core/getting_started/self_hosted/ydb_local.md new file mode 100644 index 0000000000..5c5ade600b --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/ydb_local.md @@ -0,0 +1 @@ +{% include [ydb_local.md](_includes/ydb_local.md) %}
\ No newline at end of file diff --git a/ydb/docs/en/core/getting_started/self_hosted/ydb_minikube.md b/ydb/docs/en/core/getting_started/self_hosted/ydb_minikube.md new file mode 100644 index 0000000000..6540ec1ed5 --- /dev/null +++ b/ydb/docs/en/core/getting_started/self_hosted/ydb_minikube.md @@ -0,0 +1,2 @@ + +{% include [ydb_minikube.md](_includes/ydb_minikube.md) %} diff --git a/ydb/docs/en/core/getting_started/toc_i.yaml b/ydb/docs/en/core/getting_started/toc_i.yaml index 7dbd11c22b..8a878e9b32 100644 --- a/ydb/docs/en/core/getting_started/toc_i.yaml +++ b/ydb/docs/en/core/getting_started/toc_i.yaml @@ -12,20 +12,6 @@ items: - name: YDB SDK href: sdk.md - name: Self-deployment - items: - - name: Docker - href: ydb_docker.md - - name: Starting a local cluster - href: ydb_local.md - # when: audience == "tech" - - name: Creating a cluster configuration - include: { mode: link, path: ../deploy/configuration/toc_i.yaml } - # when: audience == "tech" - - name: Kubernetes - include: { mode: link, path: ../deploy/orchestrated/toc_p.yaml } - - name: Manual - include: { mode: link, path: ../deploy/manual/toc_p.yaml } - - name: Production checklist - href: ../deploy/production_checklist.md + include: { mode: link, path: self_hosted/toc_p.yaml } - name: Useful links href: useful_links.md
\ No newline at end of file diff --git a/ydb/docs/en/core/getting_started/ydb_docker.md b/ydb/docs/en/core/getting_started/ydb_docker.md index 11cc9317b6..04578fb40a 100644 --- a/ydb/docs/en/core/getting_started/ydb_docker.md +++ b/ydb/docs/en/core/getting_started/ydb_docker.md @@ -1,13 +1 @@ - -{% include [intro.md](_includes/ydb_docker/01_intro.md) %} - -{% include [install.md](_includes/ydb_docker/02_install.md) %} - -{% include [start.md](_includes/ydb_docker/03_start.md) %} - -{% include [request.md](_includes/ydb_docker/04_request.md) %} - -{% include [stop.md](_includes/ydb_docker/05_stop.md) %} - -{% include [license.md](_includes/ydb_docker/06_license.md) %} - +{% include [self_hosted/ydb_docker.md](self_hosted/_includes/ydb_docker.md) %} diff --git a/ydb/docs/en/core/getting_started/ydb_local.md b/ydb/docs/en/core/getting_started/ydb_local.md index 9d49cd69b4..3c18eb0f39 100644 --- a/ydb/docs/en/core/getting_started/ydb_local.md +++ b/ydb/docs/en/core/getting_started/ydb_local.md @@ -1,88 +1 @@ -# Starting a local cluster {{ ydb-short-name }} - -This section describes how to deploy a local {{ ydb-short-name }} cluster using a configuration in YAML format. - -{% note warning %} - -When a local database is running, some tasks may require a significant portion of the host system resources. - -{% endnote %} - -## Download {{ ydb-short-name }} {#download-ydb} - -Download and unpack an archive with the `ydbd` executable file and the libraries necessary for working with {{ ydb-short-name }}. Next, go to the directory with the artifacts: - -```bash -curl https://binaries.ydb.tech/ydbd-master-linux-amd64.tar.gz | tar -xz -cd ydbd-master-linux-amd64/ -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`/lib" -``` - -## Prepare a local cluster configuration {#prepare-configuration} - -Prepare a local cluster configuration that you want to deploy. To run a cluster with in-memory data storage, just copy the configuration. To deploy a cluster with data storage in a file, additionally create a 64GB file and specify the path to it in the configuration. - -{% list tabs %} - -- In memory - - ```bash - wget https://raw.githubusercontent.com/ydb-platform/ydb/main/ydb/deploy/yaml_config_examples/single-node-in-memory.yaml -O config.yaml - ``` - -- In a file - - ```bash - wget https://raw.githubusercontent.com/ydb-platform/ydb/main/ydb/deploy/yaml_config_examples/single-node-with-file.yaml -O config.yaml - dd if=/dev/zero of=/tmp/ydb-local-pdisk.data bs=1 count=0 seek=68719476736 - sed -i "s/\/tmp\/pdisk\.data/\/tmp\/ydb-local-pdisk\.data/g" config.yaml - ``` - -{% endlist %} - -## Start a static cluster node {#start-static-node} - -Start a static cluster node by running the command: - -```bash -./bin/ydbd server --yaml-config ./config.yaml --node 1 --grpc-port 2135 --ic-port 19001 --mon-port 8765 -``` - -Initialize storage with the command: - -```bash -./bin/ydbd admin blobstorage config init --yaml-file ./config.yaml -``` - -## Creating the first database {#create-db} - -To work with tables, you need to create at least one database and run a process serving this database. To do this, you need to run a set of commands: - -Create a database: - -```bash -./bin/ydbd admin database /<domain-name>/<db-name> create <storage-pool-kind>:<storage-unit-count> -``` - -For example, - -```bash -./bin/ydbd admin database /Root/test create ssd:1 -``` - -Start the process serving the database: - -```bash -./bin/ydbd server --yaml-config ./config.yaml --tenant /<domain-name>/<db-name> --node-broker <address>:<port> --grpc-port 31001 --ic-port 31003 --mon-port 31002 -``` - -For example, to run the process for the database created above, execute the following command. - -```bash -./bin/ydbd server --yaml-config ./config.yaml --tenant /Root/test --node-broker localhost:2135 --grpc-port 31001 --ic-port 31003 --mon-port 31002 -``` - -## Working with the database via the Web UI {#web-ui} - -To view the database structure and execute a YQL query, use the web interface embedded in the `ydbd` process. To do this, open your browser and go to `http://localhost:8765`. For more details about the embedded web interface, see [Embedded UI](../maintenance/embedded_monitoring/ydb_monitoring.md). - +{% include [self_hosted/ydb_local.md](self_hosted/_includes/ydb_local.md) %} diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/build/local_oss.md b/ydb/docs/en/core/how_to_edit_docs/_includes/build/local_oss.md index 8c8e8f00fe..90cd6fa9fa 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/build/local_oss.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/build/local_oss.md @@ -2,7 +2,7 @@ The documentation is built using the [YFM-Docs](https://github.com/yandex-cloud/yfm-docs) utility. -Learn how to install YFM-Docs on the [introductory page of the utility documentation](https://ydocs.tech/tools/docs/). +The procedure for installing YFM-Docs is described on the [introductory page of the documentation for this utility]{% if lang == "en" %}(https://ydocs.tech/en/tools/docs/){% endif %}{% if lang == "ru" %}(https://ydocs.tech/ru/tools/docs/){% endif %}. To build the {{ ydb-short-name }} OpenSource documentation, run the command: @@ -12,8 +12,8 @@ $ yfm -i <source_dir> -o <output_dir> --allowHTML Where: -- `source_dir` is the directory where the contents of [https://github.com/ydb-platform/ydb/tree/master/docs](https://github.com/ydb-platform/ydb/tree/master/docs) is cloned. -- `output_dir` is the output directory for HTML files. +* `source_dir` is the directory where the contents of [https://github.com/ydb-platform/ydb/tree/master/docs](https://github.com/ydb-platform/ydb/tree/master/docs) is cloned. +* `output_dir` is the output directory for HTML files. Building the documentation takes a few seconds and there should be no errors logged to the stdout log. @@ -31,6 +31,6 @@ python3 -m http.server 8888 -d ~/docs/ydboss With the server run in this way, the locally built documentation is available at the links: -- [http://localhost:8888/ru](http://localhost:8888/ru) (in Russian) -- [http://localhost:8888/en](http://localhost:8888/en) (in English) +* [http://localhost:8888/ru](http://localhost:8888/ru) (in Russian) +* [http://localhost:8888/en](http://localhost:8888/en) (in English) diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/build/tech.md b/ydb/docs/en/core/how_to_edit_docs/_includes/build/tech.md index f671bc04a3..f238f0a24c 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/build/tech.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/build/tech.md @@ -19,4 +19,3 @@ This overlay allows redefining the content, preserving the placement of articles Since the overlay of the `core` and `overlay` directories is only done when building the documentation, links from the articles in `overlay` to the articles in `core` won't be clickable in an integrated development environment (IDE) that knows nothing about the fact that some directories will be overlaid on top of each other during the build. {% endnote %} - diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/content.md b/ydb/docs/en/core/how_to_edit_docs/_includes/content.md index 94917ffd05..3626c8a682 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/content.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/content.md @@ -2,7 +2,7 @@ ## Introduction {#intro} -The source code of the documentation is created in [Markdown](https://en.wikipedia.org/wiki/Markdown) format with [YFM (Yandex Flavoured Markdown)](https://ydocs.tech/) extensions. An effective way to quickly learn these formats is to study the source code of the available {{ ydb-short-name }} documentation. +Documentation source code is created as [Markdown]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Markdown){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Markdown){% endif %} with the [YFM (Yandex Flavoured Markdown)]{% if lang == "en" %}(https://ydocs.tech/en/){% endif %}{% if lang == "ru" %}(https://ydocs.tech/ru/){% endif %} extensions. An effective way to quickly learn these formats is to study the source code of the available {{ ydb-short-name }} documentation. In addition to the formal rules described here, always keep in mind the following: if a rule is not formally described for some topic, you should look at how this has been done elsewhere in the documentation and do it by analogy. @@ -10,7 +10,7 @@ Also remember that there are exceptions to any rules and it is impossible to des ## Documentation core and customization -The OpenSource {{ ydb-short-name }} documentation lets you create customized documentation based on it for enterprise environments using {{ ydb-short-name }} or for cloud providers that provide the {{ ydb-short-name }} service in their ecosystems. +The OpenSource {{ ydb-short-name }} documentation lets you create customized derivative documentation sets for enterprise environments using {{ ydb-short-name }} or for cloud providers that provide access to the {{ ydb-short-name }} service through their ecosystems. When adding content, you should first choose where to add it: to the OpenSource core or to some customization. The general recommendation is to add content to the OpenSource block in such a way that it can be read in different contexts without the need for its specific adaptation. Only when this can't be done or the placement of some content in the OpenSource core is explicitly prohibited (for example, links to intranet resources in an enterprise context), you can proceed to adding content to the source code of the documentation customization. @@ -18,8 +18,8 @@ When adding content, you should first choose where to add it: to the OpenSource In the sections where the requirements differ for basic content and customization, there are two corresponding bookmarks: -- **Core**: The core of any documentation, the basic content. -- **Overlay**: Content that is overlaid on top of the core and adapting it to a custom build. +* **Core**: The core of any documentation, the basic content. +* **Overlay**: Content that is overlaid on top of the core and adapting it to a custom build. All the content of the OpenSource build is part of the core, and zero customization is applied when building it, so when you change it, you'll only need the "Core" bookmark. @@ -31,9 +31,9 @@ The basic structure of the source code directories is based on the subject of th Each subject directory must contain the "Overview" article with the `index.md` filename. The "Overview" article: -- Describes what the articles in this directory tell about. -- Optionally, provides a list of links to all or some of the most important articles. -- Optionally, provides a set of "See also" links to other related articles and sections. +* Describes what the articles in this directory tell about. +* Optionally, provides a list of links to all or some of the most important articles. +* Optionally, provides a set of "See also" links to other related articles and sections. The presence of the "Overview" article lets you refer to the entire directory rather than a specific article and convert articles into directories without losing the referential integrity. @@ -78,9 +78,9 @@ The presence of the "Overview" article lets you refer to the entire directory ra `subject1/article1.md`: ```markdown - + {% include [definition.md](_includes/article1/definition.md) %} - + {% include [examples.md](_includes/article1/examples.md) %} ``` @@ -106,7 +106,7 @@ The presence of the "Overview" article lets you refer to the entire directory ra When redefining the content, you can: - - Add additional content to the beginning or end of an article. + * Add additional content to the beginning or end of an article. `subject1/article1.md`: @@ -117,7 +117,7 @@ The presence of the "Overview" article lets you refer to the entire directory ra In addition to the basic authorization methods, our company uses nanotube-based authorization. ``` - - Insert additional content between include directives. + * Insert additional content between include directives. `subject1/article1.md`: @@ -133,7 +133,7 @@ The presence of the "Overview" article lets you refer to the entire directory ra The quick brown fox jumps over the lazy dog. ``` - - Remove some of the content of the original article from the build by removing the corresponding include directive. + * Remove some of the content of the original article from the build by removing the corresponding include directive. `subject1/article1.md`: @@ -155,10 +155,10 @@ The presence of the "Overview" article lets you refer to the entire directory ra ### Specifics of using the include directive {#include-hints} -- The `_includes` contents are not published, so it is useless and forbidden to refer to them, it can only be included in articles by the `{% include ... %}` directive. Unfortunately, when building documentation locally, the contents of _includes remain available and operational, and the error only occurs when deploying the documentation on the farm. -- Make sure to leave empty lines around the `{% include ... %}` directive, otherwise, it won't be executed during the build. -- Write a file name in square brackets so that there is something to click on when viewing it in the default viewer on github (which does not understand what include is), and so that one include in it visually differs from the other. -- After `{%` at the beginning and before `%}`, a space is required at the end, otherwise the include won't be executed during the build. +* The `_includes` contents are not published, so it is useless and forbidden to refer to them, it can only be included in articles by the `{% include ... %}` directive. Unfortunately, when building documentation locally, the contents of _includes remain available and operational, and the error only occurs when deploying the documentation on the farm. +* Make sure to leave empty lines around the `{% include ... %}` directive, otherwise, it won't be executed during the build. +* Write a file name in square brackets so that there is something to click on when viewing it in the default viewer on github (which does not understand what include is), and so that one include in it visually differs from the other. +* After `{%` at the beginning and before `%}`, a space is required at the end, otherwise the include won't be executed during the build. ### Other use cases for include {#include-reuse} @@ -187,7 +187,7 @@ Each article must be mentioned in the Table Of Contents (TOC) file, otherwise it ... ``` - 1. `toc_p.yaml`: Contains fixed content including the "Overview" article and a link to `toc_i.yaml`: + 2. `toc_p.yaml`: Contains fixed content including the "Overview" article and a link to `toc_i.yaml`: ```yaml items: @@ -263,9 +263,9 @@ There are two types of links: 1. To the source code of the documentation. These are always relative links to some .md file. The more transitions "to a level up" or entries to nested directories this link has, the more likely it is that the documentation is poorly structured. Ideally, links should not navigate more than one level up or one directory down the hierarchy: ```md - To keep a kitten active, you [need to feed it](../feeding/index.md). + To keep a kitten active, you [need to feed it] (../feeding/index.md). ``` -1. To resources external to the documentation. These are fully-qualified URLs in which no index is ever added: +2. To resources external to the documentation. These are fully-qualified URLs in which no index is ever added: ```md You can find a good choice of cat food at the [Pushok store](http://www.pushok.ru/catalog). @@ -276,7 +276,7 @@ Text inside the square brackets displayed when rendering documentation should be There are situations when the URL of a resource has its own value and should be displayed in the documentation, for example, when publishing links to a repository on Github. In this case, it must be duplicated inside both square and regular brackets, since YFM, unlike standard Markdown, does not automatically recognize URLs in text: ```md - {{ ydb-short-name }} repository on Github: [https://github.com/ydb-platform/ydb/tree/master/docs](https://github.com/ydb-platform/ydb/tree/master/docs) +{{ ydb-short-name }} repository on Github: [https://github.com/ydb-platform/ydb/tree/master/docs](https://github.com/ydb-platform/ydb/tree/master/docs) ``` ## Images {#pictures} @@ -291,15 +291,15 @@ The text specified in square brackets is displayed in the browser until the imag Desirable image formats: -- Charts: [.SVG](https://en.wikipedia.org/wiki/SVG) -- Screenshots: [.PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics) +* Charts: [.SVG]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Scalable_Vector_Graphics){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/SVG){% endif %} +* Screenshots: [.PNG]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Portable_Network_Graphics){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/PNG){% endif %} Since an image is part of an article, it is impossible to post the image without this article. If there is no text of the article yet, determine the subject directory for its placement and the file name of the future article and only specify a link to the image in the text (keep in mind that the [text of the article is placed in the `_includes` subdirectory](#articles)!), and do not include the article itself in the TOC until it is ready for publication. When inserting images, you can also specify: -- A hint to be shown when hovering over an image: `![Text](path/file "Hint")`. We don't recommend using it, since lots of modern devices have no mouse pointer. -- Image size: `![Text](path/file =XSIZExYSIZE)`. We recommend that you use it when specifying the XSIZE for SVG images so that they are expanded properly by the width of the documentation screen, regardless of the resolution they were saved with: `![Diagram1](../_assets/diagram1.svg =800x)`. If you only specify the X-size in this way, the Y-size is selected automatically with the proportions maintained. +* A hint to be shown when hovering over an image: `![Text](path/file "Hint")`. We don't recommend using it, since lots of modern devices have no mouse pointer. +* Image size: `![Text](path/file =XSIZExYSIZE)`. We recommend that you use it when specifying the XSIZE for SVG images so that they are expanded properly by the width of the documentation screen, regardless of the resolution they were saved with: `![Diagram1](../_assets/diagram1.svg =800x)`. If you only specify the X-size in this way, the Y-size is selected automatically with the proportions maintained. ## Backward compatibility {#compatibility} @@ -312,7 +312,7 @@ If you need to convert an article into a set of articles within a new directory, If you cannot but move an article, do the following: 1. At the previous location, publish an article saying "This article no longer exists, a new location is <here>, please update the link" or something like that. The main thing is to ensure that, when following the old link, the user does not receive the HTTP 404 Not found error and can understand where it has been moved, what it has been broken into, or that it has been actually deleted and why. -1. At the old location of the article in the TOC, give a link to it with the `hidden` flag enabled: +2. At the old location of the article in the TOC, give a link to it with the `hidden` flag enabled: ```yaml - name: Deprecated article @@ -320,5 +320,4 @@ If you cannot but move an article, do the following: hidden: true ``` -As a result, this article won't be listed anywhere in the TOC, but will be available when following a direct link provided that you keep it somewhere. - +As a result, this article won't be listed anywhere in the TOC, but will be available when following a direct link provided that you keep it somewhere.
\ No newline at end of file diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/contribute.md b/ydb/docs/en/core/how_to_edit_docs/_includes/contribute.md index 8a19c28e9f..75e00dbde3 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/contribute.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/contribute.md @@ -1,8 +1,7 @@ -# How to participate in the development of documentation +## How to participate in the development of documentation The source code of the {{ ydb-short-name }} documentation is open and published at [https://github.com/ydb-platform/ydb/tree/master/docs](https://github.com/ydb-platform/ydb/tree/master/docs). The {{ ydb-short-name }} team accepts requests for edits and updates to the {{ ydb-short-name }} documentation, which anyone can offer through [Pull Requests on github.com](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request). -Before creating a pull request, see the documentation development requirements described in the articles of this section and [check the build locally](../build.md). - +Before creating a pull request, see the documentation development requirements described in the articles of this section and [check the build locally](../build.md).
\ No newline at end of file diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/customize.md b/ydb/docs/en/core/how_to_edit_docs/_includes/customize.md index 8519355902..c5f09de906 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/customize.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/customize.md @@ -8,9 +8,9 @@ The `overlay` subdirectory is designed for customizing content and is technical A file with an article in `core` never contains content directly, it only contains one or more instructions of include blocks of this content stored in the `_includes` subdirectory. As a result, replacing this file in `overlay` does not lead to the need to copy the content, but lets you make the following types of its adaptation: -- Add additional content to the beginning or end of an article. -- Insert additional content between include directives. -- Remove some of the content of the original article from the build by removing the corresponding include directive. +* Add additional content to the beginning or end of an article. +* Insert additional content between include directives. +* Remove some of the content of the original article from the build by removing the corresponding include directive. Instructions for placing articles in core and overlay are given in the [Content creation guide - Articles](content.md#articles). @@ -26,7 +26,7 @@ As with articles, a proxy approach is used for TOC files as follows: 1. If there is no need to adjust the contents of the TOC in a certain directory, no toc* files are created in `overlay`. This results in using toc_p --> toc_i from core in the build. 1. If the contents of the TOC need to be adjusted in a certain directory, a file named `toc_p.yaml` is created in `overlay` with the `- include: { mode: link, path: toc_i.yaml }` from core added to its content and additional items for the adapted build added above or below. -It is a good practice to exclude the "Overview" item from toc_i.yaml and include it directly in toc_p.yaml. This article must be the first in each submenu and always has the same article name (index.md). Including a separate item in toc_p lets you add new articles to the adapted documentation before the articles from core, but keeping the "Overview" in the first place: +It is good practice not to include the "Overview" in toc_i.yaml but rather include it directly in toc_p.yaml instead. This article must be the first in each submenu and always has the same article name (index.md). Including a separate item in toc_p lets you add new articles to the adapted documentation before the articles from core, but keeping the "Overview" in the first place: toc_p.yaml in some corporate overlay: @@ -55,5 +55,4 @@ A TOC file name may not be `toc.yaml`, since the build tool searches for files w The only exception is the initial `toc.yaml` that is placed in the documentation build root and always contains the command to copy the core content and proceed to TOC handling in core: `include: { mode: merge, path: core/toc_m.yaml }`. -Instructions for making a TOC in core and overlay are given in the [Content creation guide - TOC](content.md#toc). - +Instructions for making a TOC in core and overlay are given in the [Content creation guide - TOC](content.md#toc).
\ No newline at end of file diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/index/advanced.md b/ydb/docs/en/core/how_to_edit_docs/_includes/index/advanced.md index 6508653300..4251959495 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/index/advanced.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/index/advanced.md @@ -1,4 +1,3 @@ ## Articles for advanced readers -- [Creating customized documentation](../customize.md) - +* [Creating customized documentation](../customize.md) diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/index/basic.md b/ydb/docs/en/core/how_to_edit_docs/_includes/index/basic.md index 4db6754f88..5579aae6bd 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/index/basic.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/index/basic.md @@ -1,6 +1,5 @@ ## Main articles -- [Content creation guide](../../content.md): Describes how to create articles in technical terms. -- [Structure of subject directories](../../subjects.md): Describes where to place certain content. -- [Building documentation](../../build.md): Describes how to build documentation. - +* [Content creation guide](../../content.md): Describes how to create articles in technical terms. +* [Structure of subject directories](../../subjects.md): Describes where to place certain content. +* [Building documentation](../../build.md): Describes how to build documentation. diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/index/intro.md b/ydb/docs/en/core/how_to_edit_docs/_includes/index/intro.md index 13385e4398..e9605e71c7 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/index/intro.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/index/intro.md @@ -3,4 +3,3 @@ ## Introduction The [https://github.com/ydb-platform/ydb/tree/master/docs](https://github.com/ydb-platform/ydb/tree/master/docs) repository contains the open source code of the {{ ydb-short-name }} documentation in Russian and English. Based on it, an OpenSource version of the {{ ydb-short-name }} documentation is built and published at [http://ydb.tech](http://ydb.tech). It is also used to create customized {{ ydb-short-name }} documentation versions for enterprise environments and cloud services. - diff --git a/ydb/docs/en/core/how_to_edit_docs/_includes/subjects.md b/ydb/docs/en/core/how_to_edit_docs/_includes/subjects.md index 9efb9f5c3b..0106c749bb 100644 --- a/ydb/docs/en/core/how_to_edit_docs/_includes/subjects.md +++ b/ydb/docs/en/core/how_to_edit_docs/_includes/subjects.md @@ -7,15 +7,15 @@ Documentation articles are arranged in a hierarchical structure of subject direc A topic description includes: 1. The target audience of the article. The audience depends on the role of a potential reader when working with {{ ydb-short-name }}, with the following three basic audiences: - - Developer of applications for {{ ydb-short-name }} - - {{ ydb-short-name }} administrator - - {{ ydb-short-name }} developer/contributor -1. Purpose: The reader's task or problem the solution of which is described in the content. + * Developer of applications for {{ ydb-short-name }}. + * {{ ydb-short-name }} administrator. + * {{ ydb-short-name }} developer/contributor. +2. Purpose: The reader's task or problem the solution of which is described in the content. Basically, the directory structure directly affects the structure of the documentation table of contents. Typical exceptions are: -- Intermediate stages of documentation creation. A new directory is created immediately to preserve the referential integrity in the future, but its content is still insufficient to be designed as a separate submenu in the table of contents. In this case, articles can be temporarily included in existing submenus. -- Historically established directories whose transfer is undesirable due to the loss of referential integrity. +* Intermediate stages of documentation creation. A new directory is created immediately to preserve the referential integrity in the future, but its content is still insufficient to be designed as a separate submenu in the table of contents. In this case, articles can be temporarily included in existing submenus. +* Historically established directories whose transfer is undesirable due to the loss of referential integrity. ## Level 1 structure @@ -25,10 +25,9 @@ The following subject directories are placed on level 1: | --- | ---------- | ---------- | | getting_started | All | Provide quick solutions to standard problems that arise when starting to work with a new database: what is it, how to install it, how to connect, how to perform elementary operations with data, where to go further in the documentation and on what issues. | | concepts | Application developer | Describe the main structural components of {{ ydb-short-name }} that one will deal with when developing applications for {{ ydb-short-name }}. Provide an insight into the role of each of these components in developing applications. Provide detailed information about component configuration options available to application developers. | -| reference, yql | Application developer | A reference guide for daily use on tools for accessing {{ ydb-short-name }} functions: CLI, YQL, and SDK | -| best_practices | Application developer | Common approaches to addressing the main challenges that arise when developing applications | +| reference, yql | Application developer | A reference guide for daily use on tools for accessing {{ ydb-short-name }} functions: CLI, YQL, and SDK. | +| best_practices | Application developer | Common approaches to addressing the main challenges that arise when developing applications. | | maintenance | Application developer | How to maintain your {{ ydb-short-name }} databases deployed on a large cluster administered by someone, or when independently deploying small databases for development: backups, monitoring, logs, and more. | -| troubleshooting | ? | Tools for identifying the cause of issues | -| how_to_edit_docs | Developers {{ ydb-short-name }} | How to update the {{ ydb-short-name }} documentation | -| faq | All | Questions and answers | - +| troubleshooting | ? | Tools for identifying the cause of issues. | +| how_to_edit_docs | Developers {{ ydb-short-name }} | How to update the {{ ydb-short-name }} documentation. | +| faq | All | Questions and answers |
\ No newline at end of file diff --git a/ydb/docs/en/core/how_to_edit_docs/informal.md b/ydb/docs/en/core/how_to_edit_docs/informal.md index e986f00243..0adcf1143f 100644 --- a/ydb/docs/en/core/how_to_edit_docs/informal.md +++ b/ydb/docs/en/core/how_to_edit_docs/informal.md @@ -2,4 +2,3 @@ 1. `DRY`. If you have to copy and paste some content, most likely you are doing something wrong. 1. `../../../...` If you have to add relative references that point to many levels up, most likely you are doing something wrong. - diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md index 3c1d97d71a..35d719d904 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md @@ -1,5 +1,5 @@ --- -title: "YDB backups" +title: "Yandex Database (YDB) backups" description: "This section describes supported methods for creating YDB database backups and restoring data from previously created backups. YDB lets you use the following destinations to create backups: CSV files on the file system and AWS S3-compatible storage." --- # Backups @@ -13,5 +13,4 @@ This section describes supported methods for creating {{ ydb-short-name }} datab Backups may negatively affect the database interaction indicators. Queries may take longer to execute. Before performing a database backup under load in production databases, test the process in the testing environment. -{% endnote %} - +{% endnote %}
\ No newline at end of file diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md index 8eaf4ac215..bf9d5e98af 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md @@ -7,4 +7,3 @@ Saving the structure of the `backup` directory in the `$YDB_DB_PATH` database to ``` For each directory in the database, a file system directory is created. For each table, a directory is created in the file system to place the structure description file in. Table data is saved to one or more `CSV` files, one file line per table row. - diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md index 7d8e38f8f5..b0279e77cb 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md @@ -16,7 +16,7 @@ my_backup_of_basic_example/ 3 directories, 6 files ``` -The structure of each table is saved in a file named `scheme.pb`. For example, the `episodes/scheme.pb` file stores the schema of the `episodes` table. The data of each table is saved in one or more files named like `data_xx.csv`, where xx is the file's sequence number. The name of the first file is `data_00.csv`. The file size limit is 100 MB.
+The structure of each table is saved in a file named `scheme.pb`. For example, the `episodes/scheme.pb` file stores the schema of the `episodes` table. The data of each table is saved in one or more files named like `data_xx.csv`, where xx is the file's sequence number. The name of the first file is `data_00.csv`. The file size limit is 100 MB. ### Saving table schemas @@ -25,4 +25,3 @@ Running the `{{ ydb-cli }} tools dump` command with the `--scheme-only` option o ``` {{ ydb-cli }} -e $YDB_ENDPOINT -d $YDB_DB_PATH tools dump -p $YDB_DB_PATH/examples -o my_backup_of_basic_example/ --scheme-only ``` - diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md index 471977fe8e..d493753424 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md @@ -15,4 +15,3 @@ The command below checks that all tables saved in the `my_backup_of_basic_exampl ``` {{ ydb-cli }} -e $YDB_ENDPOINT -d $YDB_DB_PATH tools restore -p $YDB_DB_PATH/restored_basic_example -i my_backup_of_basic_example/ --dry-run ``` - diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md index 4534f812c3..7f11294fca 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md @@ -4,7 +4,6 @@ Access keys are used for authentication and authorization in S3-compatible stora * Through the `--access-key` and `--secret-key` command line options. * Using the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. -* Through the `~/.aws/credentials` file created and used by the [AWS CLI](https://aws.amazon.com/cli/). +* Through the `~/.aws/credentials` file created and used by the [AWS CLI]{% if lang == "en" %}(https://aws.amazon.com/cli/){% endif %}{% if lang == "ru" %}(https://aws.amazon.com/ru/cli/){% endif %}. The settings apply in the order described above. For example, if you use all three ways to pass the access_key or secret_key value at the same time, the values passed through the command-line options will be used. - diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md index 95a14c7978..71fc34095a 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md @@ -2,5 +2,5 @@ First, connect the bucket with the {{ ydb-short-name }} database backup files in S3-compatible storage to make the database available through operations on the file system. -When done, upload the data from the backup in {{ ydb-short-name }} following the instructions given in [Restoring data from backups in the file system](#filesystem_restore). +When done, upload the data from the backup in {{ ydb-short-name }} following the instructions described in [Restoring data from backups in the file system](#filesystem_restore). diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md index 48c7350946..d2eef7d7bb 100644 --- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md +++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md @@ -7,4 +7,3 @@ To delete the table copies from the DB and the completed operation from the list ``` {{ ydb-cli }} -e $YDB_ENDPOINT -d $YDB_DB_PATH operation forget 'ydb://export/6?id=283824558378666&kind=s3' ``` - diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md b/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md index e3f52b2be8..a0f21dbf54 100644 --- a/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md +++ b/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md @@ -8,4 +8,3 @@ The main metrics of the system are displayed on the dashboard: * **Memory Usage**: RAM utilization by nodes. * **Disk Space Usage**: Disk space utilization by nodes. * **SelfPing**: The highest actual delivery time of deferred messages in the actor system over the measurement interval. Measured for messages with a 10 ms delivery delay. If this value grows, it might indicate microbursts of workload, high CPU utilization, or displacement of the {{ ydb-short-name }} process from CPU cores by other processes. - diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/hive.md b/ydb/docs/en/core/maintenance/embedded_monitoring/hive.md index 238a7cbb5b..db4985d1dc 100644 --- a/ydb/docs/en/core/maintenance/embedded_monitoring/hive.md +++ b/ydb/docs/en/core/maintenance/embedded_monitoring/hive.md @@ -67,4 +67,3 @@ Click **Reassign Groups** to open the window with parameters for balancing: After specifying all the parameters, click "Query" to get the number of channels moved and unlock the "Reassign" button. Clicking this button starts reassigning. - diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md b/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md index a2df6e35a5..8a0cda4147 100644 --- a/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md +++ b/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md @@ -12,4 +12,3 @@ Shows, for every other node: * system clock difference * connection availability * last written error - diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md b/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md index a68bdda591..1e3d4d9b30 100644 --- a/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md +++ b/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md @@ -37,4 +37,3 @@ To change the logging level: 1. To change the logging level for individual components, use the table under `Component log settings`. In the line with the name of the component whose logging level you want to change, in the `Component` column, select the desired logging level from the drop-down list in the `Log level` column. 1. To save changes, click `Submit` - diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md b/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md index b80620b059..9bb9e5d1ec 100644 --- a/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md +++ b/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md @@ -77,6 +77,7 @@ http://<endpoint>:8765/monitoring/node/<node-id>/ Information about the node is presented in the following sections: * **Pools**: CPU utilization broken down by the internal stream pools, with roughly the following pool functions: + * **System**: The tasks of critical system components. * **User**: User tasks, queries executed by tablets. * **Batch**: Long-running background tasks. @@ -86,12 +87,14 @@ Information about the node is presented in the following sections: High pool utilization might degrade performance and increase the system response time. * **Common info**: Basic information about the node: + * **Version**: The {{ ydb-short-name }} version. * **Uptime**: The node uptime. * **DC**: The availability zone where the node resides. * **Rack**: The ID of the rack where the node resides. * **Load average**: Average host CPU utilization for different time intervals: + * 1 minute. * 5 minutes. * 15 minutes. @@ -149,6 +152,7 @@ In the `Tenant Info` section, you can see the following information: * **Pools**: The total CPU utilization by the tenant nodes broken down by internal stream pools (for more information about pools, see the [tenant page](#tenant_page)). * **Metrics**: Data about tablet utilization for this tenant: + * **Memory**: The RAM utilized by tablets. * **CPU**: CPU utilized by tablets. * **Storage**: The amount of data stored by tablets. @@ -161,7 +165,7 @@ In the `Tenant Info` section, you can see the following information: The tenant page also includes the following tabs: * **HealthCheck**: The report regarding cluster issues, if any. -* **Storage**: The [list of storage groups](#tenant_storage_page) that includes information about which VDisks reside on which nodes and block store volumes. +* **Storage**: The [list of storage groups](#tenant_storage_page) that includes information about which VDisks reside on which nodes and devices. * **Compute**: The [list of nodes](#tenant_compute_page), which includes the nodes and tablets running on them. * **Schema**: The [tenant's schema](#tenant_scheme) that lets you view tables, execute YQL queries, view a list of the slowest queries and the most loaded shards. * **Network**: The [health of the cluster network](#tenant_network). @@ -223,4 +227,3 @@ The indicator colors have the following meaning: * **Red**: There are critical problems, the component is down (or runs with limitations). If a component includes other components, then in the absence of its own issues, the state is determined by aggregating the states of its parts. - diff --git a/ydb/docs/en/core/maintenance/manual/adding_storage_groups.md b/ydb/docs/en/core/maintenance/manual/adding_storage_groups.md index 8ab7c7660a..68a4b5580e 100644 --- a/ydb/docs/en/core/maintenance/manual/adding_storage_groups.md +++ b/ydb/docs/en/core/maintenance/manual/adding_storage_groups.md @@ -31,4 +31,3 @@ Command { ``` kikimr -s <endpoint> admin bs config invoke --proto-file DefineStoragePool.txt ``` - diff --git a/ydb/docs/en/core/maintenance/manual/balancing_load.md b/ydb/docs/en/core/maintenance/manual/balancing_load.md index 245bbcf236..86c02b1526 100644 --- a/ydb/docs/en/core/maintenance/manual/balancing_load.md +++ b/ydb/docs/en/core/maintenance/manual/balancing_load.md @@ -41,4 +41,3 @@ Command { ``` kikimr -s <endpoint> admin bs config invoke --proto-file DefineHostConfig.txt ``` - diff --git a/ydb/docs/en/core/maintenance/manual/change_actorsystem_configs.md b/ydb/docs/en/core/maintenance/manual/change_actorsystem_configs.md index 3fd05f34d5..f2b1c57cbe 100644 --- a/ydb/docs/en/core/maintenance/manual/change_actorsystem_configs.md +++ b/ydb/docs/en/core/maintenance/manual/change_actorsystem_configs.md @@ -1,5 +1,119 @@ # Changing an actor system's configuration +An actor system is the basis of YDB. Each component of the system is represented by one or more actors. +Each actor is allocated to a specific ExecutorPool corresponding to the actor's task. +Changing the configuration will help you more accurately distribute the number of reserved cores for each type of task. + +## Actor system config description + +The actor system configuration contains an enumeration of ExecutorPools, their mapping to task types, and the actor system scheduler configurations. + +The following task types and their respective pools are currently supported: + +* System: Designed to perform fast internal YDB operations. +* User: Includes the entire user load for handling and executing incoming requests. +* Batch: Tasks that have no strict time limit for execution, mainly the execution of background operations. +* IO: Responsible for performing any tasks with blocking operations (for example, writing logs to a file). +* IC: Interconnect, includes all the load associated with communication between nodes. + +Each pool is described by the Executor field as shown in the example below. + +```proto +Executor { + Type: BASIC + Threads: 9 + SpinThreshold: 1 + Name: "System" +} +``` + +A summary of the main fields: + +* **Type**: Currently, two types are supported, such as **BASIC** and **IO**. All pools, except **IO**, are of the **BASIC** type. +* **Threads**: The number of threads (concurrently running actors) in this pool. +* **SpinThreshold**: The number of CPU cycles before going to sleep if there are no tasks, which a thread running as an actor will take (affects the CPU usage and request latency under low loads). +* **Name**: The pool name to be displayed for the node in Monitoring. + +Mapping pools to task types is done by setting the pool sequence number in special fields. Pool numbering starts from 0. Multiple task types can be set for a single pool. + +List of fields with their respective tasks: + +* **SysExecutor**: System. +* **UserExecutor**: User. +* **BatchExecutor**: Batch. +* **IoExecutor**: IO. + +Example: + +```proto +SysExecutor: 0 +UserExecutor: 1 +BatchExecutor: 2 +IoExecutor: 3 +``` + +The IC pool is set in a different way, via ServiceExecutor, as shown in the example below. + +```proto +ServiceExecutor { + ServiceName: "Interconnect" + ExecutorId: 4 +} +``` + +The actor system scheduler is responsible for the delivery of deferred messages exchanged by actors and is set with the following parameters: + +* **Resolution**: The minimum time offset step in microseconds. +* **SpinThreshold**: Similar to the pool parameter, the number of CPU cycles before going to sleep if there are no messages. +* **ProgressThreshold**: The maximum time offset step in microseconds. + +If, for an unknown reason, the scheduler thread is stuck, it will send messages according to the lagging time, offsetting it by the **ProgressThreshold** value each time. + +We do not recommend changing the scheduler config. You should only change the number of threads in the pool configs. + +Example of the default actor system configuration: + +```proto +Executor { + Type: BASIC + Threads: 9 + SpinThreshold: 1 + Name: "System" +} +Executor { + Type: BASIC + Threads: 16 + SpinThreshold: 1 + Name: "User" +} +Executor { + Type: BASIC + Threads: 7 + SpinThreshold: 1 + Name: "Batch" +} +Executor { + Type: IO + Threads: 1 + Name: "IO" +} +Executor { + Type: BASIC + Threads: 3 + SpinThreshold: 10 + Name: "IC" + TimePerMailboxMicroSecs: 100 +} +SysExecutor: 0 +UserExecutor: 1 +IoExecutor: 3 +BatchExecutor: 2 +ServiceExecutor { + ServiceName: "Interconnect" + ExecutorId: 4 +} +``` + ## On static nodes Static nodes take the configuration of the actor system from the kikimr/cfg/sys.txt file. @@ -8,7 +122,7 @@ After changing the configuration, restart the node. ## On dynamic nodes -Dynamic nodes take the configuration from the CMS. To change it, you can use the following command. +Dynamic nodes take the configuration from the [CMS](cms.md). To change it, you can use the following command. ```proto ConfigureRequest { @@ -26,11 +140,7 @@ ConfigureRequest { } } } -``` +```bash kikimr -s <endpoint> admin console execute --domain=<domain> --retry=10 actorsystem.txt - ``` - - - diff --git a/ydb/docs/en/core/maintenance/manual/cluster_decomision.md b/ydb/docs/en/core/maintenance/manual/cluster_decomision.md deleted file mode 100644 index 44d4faef56..0000000000 --- a/ydb/docs/en/core/maintenance/manual/cluster_decomision.md +++ /dev/null @@ -1,4 +0,0 @@ -# Decommissioning nodes and disks - -**WILL BE SOON** - diff --git a/ydb/docs/en/core/maintenance/manual/cluster_expansion.md b/ydb/docs/en/core/maintenance/manual/cluster_expansion.md index 0c0d21a27a..9952b6c538 100644 --- a/ydb/docs/en/core/maintenance/manual/cluster_expansion.md +++ b/ydb/docs/en/core/maintenance/manual/cluster_expansion.md @@ -76,4 +76,3 @@ ``` kikimr -s <endpoint> admin bs config invoke --proto-file DefineBox.txt ``` - diff --git a/ydb/docs/en/core/maintenance/manual/cms.md b/ydb/docs/en/core/maintenance/manual/cms.md index 625399ae45..ea3e55a02b 100644 --- a/ydb/docs/en/core/maintenance/manual/cms.md +++ b/ydb/docs/en/core/maintenance/manual/cms.md @@ -41,4 +41,3 @@ The UsageScope field is optional and is needed to use settings for a specific te ``` ./kikimr -s <endpoint> admin console configs update <protobuf-file> ``` - diff --git a/ydb/docs/en/core/maintenance/manual/disk_end_space.md b/ydb/docs/en/core/maintenance/manual/disk_end_space.md index 48a511a90b..39c63f95c4 100644 --- a/ydb/docs/en/core/maintenance/manual/disk_end_space.md +++ b/ydb/docs/en/core/maintenance/manual/disk_end_space.md @@ -22,7 +22,7 @@ During data replication, the load on all the group's VDisks increases, and respo 3. Run the wipe command for the VDisk. - All data stored by the VDisk will be permanently deleted, and after that, the VDisk will begin restoring the data by reading it from the other VDisks in the group. + All data stored on a VDisk will be permanently deleted, whereupon the VDisk will begin restoring the data by reading them from the other VDisks in the group. ```bash kikimr admin blobstorage group reconfigure wipe --domain <Domain number> --node <Node ID> --pdisk <pdisk-id> --vslot <Slot number> @@ -38,19 +38,19 @@ If the block store volume is running out of space, you can apply defragmentation 3. Check if you can [restart the process](node_restarting.md#restart_process). -4. Stop the process +4. Stop the process. ```bash sudo systemctl stop kikimr ``` -5. Format the block store volume +5. Format the block store volume. ```bash sudo kikimr admin blobstorage disk obliterate <path to the store volume part label> ``` -6. Run the process +6. Run the process. ```bash sudo systemctl start kikimr @@ -59,4 +59,3 @@ If the block store volume is running out of space, you can apply defragmentation ## Moving individual VDisks from full block store volumes If defragmentation can't help freeing up space on the block store volume, you can [move](moving_vdisks.md#moving_disk) individual VDisks. - diff --git a/ydb/docs/en/core/maintenance/manual/failure_model.md b/ydb/docs/en/core/maintenance/manual/failure_model.md index fd567cd2de..878465e73a 100644 --- a/ydb/docs/en/core/maintenance/manual/failure_model.md +++ b/ydb/docs/en/core/maintenance/manual/failure_model.md @@ -16,4 +16,3 @@ If multiple VDisks have failed in the group, SelfHeal stops moving VDisks. If th ## The number of failed VDisks has exceeded the failure model {#exceeded_the_failure_model} The availability and operability of the system might be lost. Make sure to revive at least one VDisk without losing the data stored on it. - diff --git a/ydb/docs/en/core/maintenance/manual/index.md b/ydb/docs/en/core/maintenance/manual/index.md index e35a8c7ded..c534ac74c3 100644 --- a/ydb/docs/en/core/maintenance/manual/index.md +++ b/ydb/docs/en/core/maintenance/manual/index.md @@ -22,4 +22,3 @@ A {{ ydb-short-name }} cluster lets you: * [Configure](change_actorsystem_configs.md) the actor system on your nodes. * Edit configs via [CMS](cms.md). * [Add](adding_storage_groups.md) new storage groups. - diff --git a/ydb/docs/en/core/maintenance/manual/moving_vdisks.md b/ydb/docs/en/core/maintenance/manual/moving_vdisks.md index c9aab4bd81..09fa0c8289 100644 --- a/ydb/docs/en/core/maintenance/manual/moving_vdisks.md +++ b/ydb/docs/en/core/maintenance/manual/moving_vdisks.md @@ -16,27 +16,26 @@ If SelfHeal is disabled or fails to move VDisks, you'll have to run this operati 1. Make sure that the VDisk has actually failed. - Write down the node's FQDN, ic-port, VDisk path, and pdisk-id + Write down the node's FQDN, ic-port, VDisk path, and pdisk-id. -2. Go to any cluster node +2. Go to any cluster node. -3. Move the VDisk +3. Move the VDisk. ```bash kikimr admin bs config invoke --proto 'Command { UpdateDriveStatus { HostKey: { Fqdn: "<host>" IcPort: <ic-port>} Path: "<Path to the storage volume part label>" PDiskId: <pdisk-id> Status: BROKEN } }' ``` -## Enable the VDisk back after reassignment {#return_a_device_to_work} +## Enable the VDisk back after reassignment {#return_a_device_to_work} -1. In Monitoring, make sure that the PDisk is actually operable +1. In Monitoring, make sure that the PDisk is actually operable. - Write down the node's FQDN, ic-port, store path, and pdisk-id + Write down the node's FQDN, ic-port, store path, and pdisk-id. -2. Go to any cluster node +2. Go to any cluster node. -3. Enable the PDisk back +3. Enable the PDisk back. ```bash kikimr admin bs config invoke --proto 'Command { UpdateDriveStatus { HostKey: { Fqdn: "<host>" IcPort: <ic-port>} Path: "<Path to the storage volume part label>" PDiskId: <pdisk-id> Status: ACTIVE } }' ``` - diff --git a/ydb/docs/en/core/maintenance/manual/node_restarting.md b/ydb/docs/en/core/maintenance/manual/node_restarting.md index 433c336512..aa8747f27f 100644 --- a/ydb/docs/en/core/maintenance/manual/node_restarting.md +++ b/ydb/docs/en/core/maintenance/manual/node_restarting.md @@ -6,7 +6,7 @@ To make sure that the process is stoppable, follow these steps. 1. Access the node via SSH. -1. Execute the command +1. Execute the command: ```bash kikimr cms request restart host {node_id} --user {user} --duration 60 --dry --reason 'some-reason' @@ -14,13 +14,13 @@ To make sure that the process is stoppable, follow these steps. If the process is stoppable, you'll see `ALLOW`. -1. Stop the process +1. Stop the process: ```bash sudo service kikimr stop ``` -1. Restart the process if needed +1. Restart the process if needed: ```bash sudo service kikimr start @@ -38,4 +38,3 @@ Go to the [Hive web-viewer](../embedded_monitoring/hive.md) page. Click "View Nodes" to see a list of all nodes. Before disabling the node, first disable the transfer of tablets through the Active button, then click Drain, and wait for all the tablets to be moved away. - diff --git a/ydb/docs/en/core/maintenance/manual/scrubbing.md b/ydb/docs/en/core/maintenance/manual/scrubbing.md index 4da321e362..08627ec2b6 100644 --- a/ydb/docs/en/core/maintenance/manual/scrubbing.md +++ b/ydb/docs/en/core/maintenance/manual/scrubbing.md @@ -4,4 +4,3 @@ The Scrub settings let you adjust the interval from the beginning of the previou `$ kikimr admin bs config invoke --proto 'Command { UpdateSettings { ScrubPeriodicitySeconds: 86400 MaxScrubbedDisksAtOnce: 1 } }'` If ScrubPeriodicitySeconds is 0, Scrubbing is disabled. - diff --git a/ydb/docs/en/core/maintenance/manual/selfheal.md b/ydb/docs/en/core/maintenance/manual/selfheal.md index 0e95492974..0f9011c946 100644 --- a/ydb/docs/en/core/maintenance/manual/selfheal.md +++ b/ydb/docs/en/core/maintenance/manual/selfheal.md @@ -7,7 +7,7 @@ SelfHeal includes two parts. Detecting faulty disks and moving them carefully to SelfHeal is enabled by default. Below are instructions how to enable or disable SelfHeal. -1. Enabling detection +1. Enabling detection: Open the page @@ -17,11 +17,11 @@ Below are instructions how to enable or disable SelfHeal. Status field: Enable - Or via the CLI + Or via the CLI: - * Go to any node + * Go to any node. - * Create a file with modified configurations + * Create a file with modified configurations. Sample config.txt file @@ -41,13 +41,13 @@ Below are instructions how to enable or disable SelfHeal. } ``` - * Update the config on the cluster + * Update the config on the cluster: ```bash kikimr admin console configs update config.txt ``` -2. Enable SelfHeal +2. Enable SelfHeal: ```bash kikimr -s <endpoint> admin bs config invoke --proto 'Command{EnableSelfHeal{Enable: true}}' @@ -60,12 +60,12 @@ Disabled in a similar way by setting the value to false. viewer -> Cluster Management System -> CmsConfigItems If there are no settings yet, click Create, if there are, click the "pencil" icon in the corner. -* **Status**: Enables/disables Self Heal in the CMS. +* **Status**: Enables/disables Self Heal in the CMS. * **Dry run**: Enables/disables the mode in which the CMS doesn't change the BSC setting. * **Config update interval (sec.)**: BSC config update interval. * **Retry interval (sec.)**: Config update retry interval. -* **State update interval (sec.)**: PDisk state update interval, the State is what we're monitoring (through a whiteboard, for example) -* **Timeout (sec.)**: PDisk state update timeout. +* **State update interval (sec.)**: PDisk state update interval, the State is what we're monitoring (through a whiteboard, for example). +* **Timeout (sec.)**: PDisk state update timeout * **Change status retries**: The number of retries to change the PDisk Status in the BSC, the Status is what is stored in the BSC (ACTIVE, FAULTY, BROKEN, and so on). * **Change status retry interval (sec.)**: Interval between retries to change the PDisk Status in the BSC. The CMS is monitoring the disk state with the **State update interval**. If the disk remains in the same state for several **Status update interval** cycles, the CMS changes its Status in the BSC. Next are the settings for the number of update cycles through which the CMS will change the disk Status. If the disk State is Normal, the disk is switched to the ACTIVE Status. Otherwise, the disk is switched to the FAULTY status. The 0 value disables changing the Status for the state (this is done for Unknown by default). @@ -107,4 +107,3 @@ To enable the donor disks, run the following command: `$ kikimr admin bs config invoke --proto 'Command { UpdateSettings { EnableDonorMode: true } }'` Similarly, when changing the setting to `false`, the command disables the mode. - diff --git a/ydb/docs/en/core/operations/manual/operation.md b/ydb/docs/en/core/operations/manual/operation.md deleted file mode 100644 index 92d3c5b8b2..0000000000 --- a/ydb/docs/en/core/operations/manual/operation.md +++ /dev/null @@ -1,525 +0,0 @@ -# Maintaining a cluster's disk subsystem - -## Extending a cluster with static nodes {#expand_cluster} - -1. Add information about new nodes to NameserviceConfig in the names.txt file. - - ``` - Node { - NodeId: 1 - Port: <IR port> - Host: "<old-host>" - InterconnectHost: "<old-host>" - Location { - DataCenter: "DC1" - Module: "M1" - Rack: "R1" - Unit: "U1" - } - } - Node { - NodeId: 2 - Port: <IR port> - Host: "<new-host>" - InterconnectHost: "<new-host>" - Location { - DataCenter: "DC1" - Module: "M2" - Rack: "R2" - Unit: "U2" - } - } - ClusterUUID: "<cluster-UUID>" - AcceptUUID: "<cluster-UUID>" - ``` - -1. Update the NameserviceConfig via CMS. - -1. Add new nodes to DefineBox. - - Sample proto file for DefineBox. - - ``` - Command { - DefineHostConfig { - HostConfigId: 1 - Drive { - Path: "<device-path>" - Type: SSD - PDiskConfig { - ExpectedSlotCount: 2 - } - } - } - } - Command { - DefineBox { - BoxId: 1 - Host { - Key { - Fqdn: "<old-host>" - IcPort: <IR port> - } - HostConfigId: 1 - } - Host { - Key { - Fqdn: "<new-host>"| - IcPort: <IR port> - } - HostConfigId: 1 - } - } - } - ``` - - Using the command - - ``` - kikimr -s <endpoint> admin bs config invoke --proto-file DefineBox.txt - ``` - -## Decommissioning nodes and disks - -**WILL BE SOON** - -## SelfHeal {#selfheal} - -During cluster operation, individual block store volumes used by YDB or entire nodes may fail. To maintain the cluster's uptime and fault tolerance when it's impossible to promptly fix the failed nodes or volumes, YDB provides SelfHeal. - -SelfHeal includes two parts. Detecting faulty disks and moving them carefully to avoid data loss and disintegration of storage groups. - -SelfHeal is enabled by default. -Below are instructions how to enable or disable SelfHeal. - -1. Enabling detection. - - Open the page - - ```http://localhost:8765/cms#show=config-items-25``` - - It can be enabled via the viewer -> Cluster Management System -> CmsConfigItems - - Status field: Enable - - Or via the CLI - - * Go to any node. - - * Create a file with modified configs. - - Sample config.txt file. - - ``` - Actions { - AddConfigItem { - ConfigItem { - Config { - CmsConfig { - SentinelConfig { - Enable: true - } - } - } - } - } - } - ``` - - * Update the config on the cluster. - - ```bash - kikimr admin console configs update config.txt - ``` - -1. Enable SelfHeal. - - ```bash - kikimr -s <endpoint> admin bs config invoke --proto 'Command{EnableSelfHeal{Enable: true}}' - ``` - -### SelfHeal settings - -viewer -> Cluster Management System -> CmsConfigItems -If there are no settings yet, click Create, if there are, click the "pencil" icon in the corner. - -* **Status**: Enables/disables Self Heal in the CMS. -* **Dry run**: Enables/disables the mode in which the CMS doesn't change the BSC setting. -* **Config update interval (sec.)**: BSC config update interval. -* **Retry interval (sec.)**: Config update retry interval. -* **State update interval (sec.)**: PDisk state update interval, the State is what we're monitoring (through a whiteboard, for example). -* **Timeout (sec.)**: PDisk state update timeout. -* **Change status retries**: The number of retries to change the PDisk Status in the BSC, the Status is what is stored in the BSC (ACTIVE, FAULTY, BROKEN, and so on). -* **Change status retry interval (sec.)**: Interval between retries to change the PDisk Status in the BSC. The CMS is monitoring the disk state with the **State update interval**. If the disk remains in the same state for several **Status update interval** cycles, the CMS changes its Status in the BSC. -Next are the settings for the number of update cycles through which the CMS will change the disk Status. If the disk State is Normal, the disk is switched to the ACTIVE Status. Otherwise, the disk is switched to the FAULTY status. The 0 value disables changing the Status for the state (this is done for Unknown by default). -For example, with the default settings, if the CMS is monitoring the state of the Initial disk for 5 Status update interval cycles of 60 seconds each, the disk Status will be changed to FAULTY. -* **Default state limit**: For States with no setting specified, this default value can be used. For unknown PDisk States that have no setting, this value is used, too. This value is used if no value is set for States such as Initial, InitialFormatRead, InitialSysLogRead, InitialCommonLogRead, and Normal. -* **Initial**: PDisk starts initializing. Transition to FAULTY. -* **InitialFormatRead**: PDisk is reading its format. Transition to FAULTY. -* **InitialFormatReadError**: PDisk has received an error when reading its format. Transition to FAULTY. -* **InitialSysLogRead**: PDisk is reading the system log. Transition to FAULTY. -* **InitialSysLogReadError**: PDisk has received an error when reading the system log. Transition to FAULTY. -* **InitialSysLogParseError**: PDisk has received an error when parsing and checking the consistency of the system log. Transition to FAULTY. -* **InitialCommonnLogRead**: PDisk is reading the common VDisk log. Transition to FAULTY. -* **InitialCommonnLogReadError**: PDisk has received an error when reading the common Vdisk log. Transition to FAULTY. -* **InitialCommonnLogParseError**: PDisk has received an error when parsing and checking the consistency of the common log Transition to FAULTY. -* **CommonLoggerInitError**: PDisk has received an error when initializing internal structures to be logged to the common log. Transition to FAULTY. -* **Normal**: PDisk has completed initialization and is running normally. Transition to ACTIVE will occur after this number of Cycles (that is, by default, if the disk is Normal for 5 minutes, it's switched to ACTIVE). -* **OpenFileError**: PDisk has received an error when opening a disk file. Transition to FAULTY. -* **Missing**: The node responds, but this PDisk is missing from its list. Transition to FAULTY. -* **Timeout**: The node didn't respond within the specified timeout. Transition to FAULTY. -* **NodeDisconnected**: The node has disconnected. Transition to FAULTY. -* **Unknown**: Something unexpected, for example, the TEvUndelivered response to the state request. Transition to FAULTY. - -## Enabling/disabling donor disks - -If donor disks are disabled, when transferring the Vdisk, its data is lost and has to be restored according to the selected erasure. - -The recovery operation is more expensive than regular data transfers. Data loss also occurs, which may lead to data loss when going beyond the failure model. - -To prevent the above problems, there are donor disks. - -When transferring disks with donor disks enabled, the old VDisk remains alive until the new one transfers all the data from it to itself. - -The donor disk is the old VDisk after the transfer, which continues to store its data and only responds to read requests from the new VDisk. - -When receiving a request to read data that the new VDisk has not yet transferred, it redirects the request to the donor disk. - -To enable the donor disks, run the following command: - -`$ kikimr admin bs config invoke --proto 'Command { UpdateSettings { EnableDonorMode: true } }'` - -Similarly, when changing the setting to `false`, the command to disable the mode. - -## Scrubbing - -### Enabling/Disabling - -**WILL BE SOON** - -### Scrubbing settings - -The Scrub settings let you adjust the interval from the beginning of the previous disk scrubbing cycle to that of the next one and the maximum number of disks that can be scrubbed simultaneously. The default value is 1 month. -`$ kikimr admin bs config invoke --proto 'Command { UpdateSettings { ScrubPeriodicitySeconds: 86400 MaxScrubbedDisksAtOnce: 1 } }'` - -**WILL BE SOON** - -## Move one vdisk from a block store volume {#moving_vdisk} - -To move a disk from a block store volume, log in to the node via ssh and execute the following command: - -```bash -kikimr admin bs config invoke --proto 'Command { ReassignGroupDisk { GroupId: <Storage group ID> GroupGeneration: <Storage group generation> FailRealmIdx: <FailRealm> FailDomainIdx: <FailDomain> VDiskIdx: <Slot number> } }' -``` - -You can find the parameters for the command in the viewer (link). - -## Move vdisks from a broken/missing block store volume {#removal_from_a_broken_device} - -If SelfHeal is disabled or fails to move vdisks, you'll have to run this operation manually. - -1. Make sure that the disk has actually failed. - - Write down the node's fqdn, ic-port, disk path, and pdiskId. - -1. Go to any cluster node. - -1. Move the disk. - - ```bash - kikimr admin bs config invoke --proto 'Command { UpdateDriveStatus { HostKey: { Fqdn: "<Host>" IcPort: <IC Port>} Path: "<Path to the device part label>" PDiskId: <ID PDisk> Status: BROKEN } }'|||UNTRANSLATED_CONTENT_END||| - ``` - -## Enable the disk back after reassignment {#return_a_device_to_work} - -1. In Monitoring, make sure that the disk is actually operable. - - Write down the node's fqdn, ic-port, disk path, and pdiskId. - -1. Go to any cluster node. - -1. Re-enable the disk. - - ```bash - kikimr admin bs config invoke --proto 'Command { UpdateDriveStatus { HostKey: { Fqdn: "<Host>" IcPort: <IC Port>} Path: "<Path to the storage volume part label>" PDiskId: <PDisk ID> Status: ACTIVE } }' - ``` - -## Stopping/restarting a YDB process on a node {#restart_process} - -To make sure that the process is stoppable, follow these steps. - -1. Access the node via ssh. - -1. Execute the command - - ```bash - kikimr cms request restart host {node_id} --user {user} --duration 60 --dry --reason 'some-reason' - ``` - - If the process is stoppable, you'll see `ALLOW`. - -1. Stop the process - - ```bash - sudo service kikimr stop - ``` - -1. Restart the process if needed - - ```bash - sudo service kikimr start - ``` - -## Replacing equipment {#replace_hardware} - -Before replacing equipment, make sure that the YDB process is [stoppable](#restart_process). -If the replacement is going to take a long time, first move all the vdisks from this node and wait until replication is complete. -After replication is complete, you can safely shut down the node. - -To disable a dynamic node, you may also need to drain the tablets to avoid the effect on running queries. - -Go to a hive or tenant hive's web monitoring page. -Click "View Nodes" to see a list of all nodes running under this hive. - -It provides various information about running tablets and resources used. -On the right of the list, there are buttons with the following actions for each node: - -* **Active**: Enables/disables the node to move tablets to this node. -* **Freeze**: Disables tablets to be deployed on other nodes. -* **Kick**: Moves all tablets from the node at once. -* **Drain**: Smoothly moves all tablets from the node. - -Before disabling the node, first disable the transfer of tablets through the Active button, then click Drain, and wait for all the tablets to be moved away. - -## Adding storage groups - -To add storage groups, you need to redefine the config of the pool you want to extend. - -Before that, you need to get the config of the desired pool. You can do this with the following command: - -```proto -Command { - ReadStoragePool{ - BoxId: <box-id> - // StoragePoolId: <storage-pool-id> - Name: <pool name> - } -} -``` - -``` -kikimr -s <endpoint> admin bs config invoke --proto-file ReadStoragePool.txt -``` - -Insert the obtained pool config into the protobuf below and edit the **NumGroups** field value in it. - -```proto -Command { - DefineStoragePool { - <pool config> - } -} -``` - -``` -kikimr -s <endpoint> admin bs config invoke --proto-file DefineStoragePool.txt -``` - -## Changing the number of slots for VDisks on the PDisk - -To add storage groups, redefine the host config by increasing the number of disk slots for it. - -Before that, you need to get the config to be changed. You can do this with the following command: - -```proto -Command { - TReadHostConfig{ - HostConfigId: <host-config-id> - } -} -``` - -``` -kikimr -s <endpoint> admin bs config invoke --proto-file ReadHostConfig.txt -``` - -Insert the obtained config into the protobuf below and edit the **PDiskConfig/ExpectedSlotCount** field value in it. - -```proto -Command { - TDefineHostConfig { - <host config> - } -} -``` - -``` -kikimr -s <endpoint> admin bs config invoke --proto-file DefineHostConfig.txt -``` - -## Cluster health issues {#cluster_liveness_issues} - -### No more than 2 disks belonging to the block-4-2 storage group failed {#storage_group_lost_two_disk} - -In this kind of failure, no data is lost, the system maintains operability, and read and write queries are executed successfully. Performance might degrade because of the load handover from the failed disks to the operable ones. - -If 2 disks are unavailable at the same time, we recommend reviving at least one of them or replacing one disk to start the replication process. This will provide some room for maneuver in the event a third disk fails before replication completes. - -### More than 2 disks belonging to the block-4-2 storage group failed{#exceeded_the_failure_modele} - -The availability and operability of the system might be lost. Make sure to revive at least one disk without losing the data stored on it. - -## Disk subsystem issues {#storage_issues} - -When the disk space is used up, the database may start responding to all queries with an error. To keep the database healthy, we recommend deleting a part of the data or adding block store volumes to extend the cluster. - -Below are instructions that can help you add or free up disk space. - -### Defragment vdisk - -As disks run, their data becomes fragmented. You can find out the disk's fragmentation rate on the vdisk monitoring page. We don't recommend defragmenting disks with a fragmentation ratio of 20% or less. - -According to the failure model, the cluster survives the loss of two vdisks in the same group without data loss. If all vdisks in the group are up and there are no vdisks with the error or replication status, then deleting data from one vdisk will result in the vdisk recovering it in a compact format. Please keep in mind that data storage redundancy will be decreased until automatic data replication is complete. - -During data replication, the load on all the group's vdisks increases, and response times may deteriorate. - -1. View the fragmentation coefficient on the vdisk page in the viewer (link). - - If its value is more than 20%, defragmentation can help free up disk space. - -1. Check the status of the group that hosts the vdisk. There should be no vdisks that are unavailable or in the error or replication status in the group. - - You can view the status of the group in the viewer (link). - -1. Run the wipe command for the vdisk. - - All data stored by the vdisk will be permanently deleted, and after that, the vdisk will begin restoring the data by reading it from the other vdisks in the group. - - ```bash - kikimr admin blobstorage group reconfigure wipe --domain <Domain number> --node <Node ID> --pdisk <PDisk ID> --vslot <Slot number> - ``` - - You can view the details for the command in the viewer (link). - -If the block store volume is running out of space, you can apply defragmentation to the entire block store volume. - -1. Check the health of the groups in the cluster. There shouldn't be any problem groups on the same node with the problem block store volume. - -1. Log in via SSH to the node hosting this disk. - -1. Check if it is possible to restart the process (link to the maintenance file). - -1. Stop the process. - - ```bash - sudo systemctl stop kikimr - ``` - -1. Format the disk. - - ```bash - sudo kikimr admin blobstorage disk obliterate <path to the store volume part label> - ``` - -1. Run the process. - - ```bash - sudo systemctl start kikimr - ``` - -### Distribute vdisks evenly across block store volumes - -If vdisks aren't evenly distributed across block store volumes, you can [move them](#moving_vdisks) one at a time from overloaded store volumes. - -### Distribute the load evenly across groups - -At the bottom of the hive web monitoring page, there is a button named "Reassign Groups". -Click it to open the window with parameters for balancing: - -* **Storage pool**: Pool of storage groups for balancing. -* **Storage group**: If the previous item is not specified, you can specify only one group separately. -* **Type**: Type of tablets that balancing will be performed for. -* **Channels**: Range of channels that balancing will be performed for. -* **Percent**: Percentage of the total number of tablet channels that will be moved as a result of balancing. -* **Inflight**: The number of tablets being moved to other groups at the same time. - -After specifying all the parameters, click "Query" to get the number of channels moved and unlock the "Reassign" button. -Clicking this button starts balancing. - -## Changing settings in the CMS - -### Get the current settings - -The following command will let you get the current settings for a cluster or tenant. - -``` -./kikimr -s <endpoint> admin console configs load --out-dir <directory-for-configs> -``` - -``` -./kikimr -s <endpoint> admin console configs load --out-dir <directory-for-configs> --tenant <tenant-name> -``` - -### Update the settings - -First, you need to pull the desired config as indicated above and then prepare a protobuf file with an update request. - -``` -Actions { - AddConfigItem { - ConfigItem { - Cookie: "<cookies>" - UsageScope { - TenantAndNodeTypeFilter { - Tenant: "<tenant-name>" - } - } - Config { - <config-name> { - <full config> - } - } - } - } -} -``` - -The UsageScope field is optional and is needed to use settings for a specific tenant. - -``` -./kikimr -s <endpoint> admin console configs update <file-with-settings> -``` - -## Changing an actor system's configuration - -### On static nodes - -Static nodes take the configuration of the actor system from a file located at kikimr/cfg/sys.txt. - -After changing the configuration, restart the node. - -### On dynamic nodes - -Dynamic nodes take the configuration from the CMS. To change it, you can use the following command. - -```proto -ConfigureRequest { - Actions { - AddConfigItem { - ConfigItem { - // UsageScope: { ... } - Config { - ActorSystemConfig { - <actor system config> - } - } - MergeStrategy: 3 - } - } - } -} -``` - -kikimr -s <endpoint> admin console execute --domain=<domain> --retry=10 actorsystem.txt - -``` diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_cloud.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_cloud.md index 0660f7c088..ea76108aea 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_cloud.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_cloud.md @@ -1,5 +1,4 @@ -- If the value of the `IAM_TOKEN` environment variable is set, the **Access Token** authentication mode is used, where this variable value is passed. -- Otherwise, if the value of the `YC_TOKEN` environment variable is set, the **Refresh Token** authentication mode is used and the token to transfer to the IAM endpoint is taken from this variable value when repeating the request. -- Otherwise, if the value of the `USE_METADATA_CREDENTIALS` environment variable is set to 1, the **Metadata** authentication mode is used. -- Otherwise, if the value of the `SA_KEY_FILE` environment variable is set, the **Service Account Key** authentication mode is used and the key is taken from the file whose name is specified in this variable. - +* If the value of the `IAM_TOKEN` environment variable is set, the **Access Token** authentication mode is used, where this variable value is passed. +* Otherwise, if the value of the `YC_TOKEN` environment variable is set, the **Refresh Token** authentication mode is used and the token to transfer to the IAM endpoint is taken from this variable value when repeating the request. +* Otherwise, if the value of the `USE_METADATA_CREDENTIALS` environment variable is set to 1, the **Metadata** authentication mode is used. +* Otherwise, if the value of the `SA_KEY_FILE` environment variable is set, the **Service Account Key** authentication mode is used and the key is taken from the file whose name is specified in this variable. diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_static.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_static.md index fbed4967db..6b2b62cb05 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_static.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/env_static.md @@ -1,2 +1 @@ -- If the value of the `YDB_USER` or `YDB_PASSWORD` environment variable is set, the username and password based authentication mode is used. The username is read from the `YDB_USER` variable. If it is not set, an error saying `User password was provided without user name` is returned. The password is read from the `YDB_PASSWORD` variable. If it is not set, then, depending on whether the `--no-password` command-line option is specified, either an empty password is used or a password is requested interactively. - +* If the value of the `YDB_USER` or `YDB_PASSWORD` environment variable is set, the username and password based authentication mode is used. The username is read from the `YDB_USER` variable. If it is not set, an error saying `User password was provided without user name` is returned. The password is read from the `YDB_PASSWORD` variable. If it is not set, then, depending on whether the `--no-password` command-line option is specified, either an empty password is used or a password is requested interactively. diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud.md index 837fdae778..2e4db90e10 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud.md @@ -1,5 +1,4 @@ -- `--iam-token-file <filepath>` : The **Access Token** authentication mode is used based on the contents of the file specified in this option value. -- `--yc-token-file <filepath>` : The **Refresh Token** authentication mode is used based on the contents of the file specified in this option value. -- `--use-metadata-credentials` : The **Metadata** authentication mode is used. -- `--sa-key-file <filepath>` : The **Service Account Key** authentication mode is used with the key and other parameters taken from the JSON file specified in this option value. - +* `--iam-token-file <filepath>` : The **Access Token** authentication mode is used based on the contents of the file specified in this option value. +* `--yc-token-file <filepath>` : The **Refresh Token** authentication mode is used based on the contents of the file specified in this option value. +* `--use-metadata-credentials` : The **Metadata** authentication mode is used. +* `--sa-key-file <filepath>` : The **Service Account Key** authentication mode is used with the key and other parameters taken from the JSON file specified in this option value. diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud_additional.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud_additional.md index f1937dc14e..59b04333a5 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud_additional.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_cloud_additional.md @@ -1,4 +1,3 @@ When using authentication modes that involve token rotation along with regularly re-requesting them from IAM (**Refresh Token** and **Service Account Key**), a special parameter can be set to indicate where the IAM service is located: -- `--iam-endpoint <URL>` : Sets the URL of the IAM service to request new tokens in authentication modes with token rotation. The default value is `"iam.api.cloud.yandex.net"`. - +* `--iam-endpoint <URL>` : Sets the URL of the IAM service to request new tokens in authentication modes with token rotation. The default value is `"iam.api.cloud.yandex.net"`. diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_header.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_header.md index 1d65d46fc7..791d21c038 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_header.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_header.md @@ -1,2 +1 @@ The authentication mode and parameters are selected by setting one of the following options: - diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_multiple.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_multiple.md index 5a525922d9..35be48b5e6 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_multiple.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_multiple.md @@ -5,4 +5,3 @@ $ {{ ydb-cli }} --use-metadata-credentials --iam-token-file ~/.ydb/token scheme More than one auth method were provided via options. Choose exactly one of them Try "--help" option for more info. ``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_static.md b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_static.md index b830d88295..e2b36ddf53 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_static.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/auth/options_static.md @@ -1,4 +1,3 @@ -- `--user <username>` : The username and password based authentication mode is used with the username set in this option value. Additionally , you can specify: - - `--password-file <filename>` : The password is read from the specified file. - - `--no-password` : Defines an empty password. The password will be requested interactively if none of the password identification options listed above are specified in the command line parameters. - +* `--user <username>` : The username and password based authentication mode is used with the username set in this option value. Additionally, you can specify: + * `--password-file <filename>` : The password is read from the specified file. + * `--no-password` : Defines an empty password. The password will be requested interactively if none of the password identification options listed above are specified in the command line parameters. 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 b44999c1ad..8677af73fe 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md @@ -6,13 +6,13 @@ General syntax for calling {{ ydb-short-name }} CLI commands: {{ ydb-cli }} [global options] <command> [<subcommand> ...] [command options] ``` -, where: +Where: -- `{{ ydb-cli}}` is the command to run the {{ ydb-short-name }} CLI from the OS command line. -- `[global options]` are [global options](../commands/global-options.md) that are common for all {{ ydb-short-name }} CLI commands. -- `<command>` is the command. -- `[<subcomand> ...]` are subcommands specified if the selected command contains subcommands. -- `[command options]` are command options specific to each command and subcommands. +* `{{ ydb-cli}}` is the command to run the {{ ydb-short-name }} CLI from the OS command line. +* `[global options]` are [global options](../commands/global-options.md) that are common for all {{ ydb-short-name }} CLI commands. +* `<command>` is the command. +* `[<subcomand> ...]` are subcommands specified if the selected command contains subcommands. +* `[command options]` are command options specific to each command and subcommands. ## Commands {#list} @@ -67,10 +67,8 @@ Any command can be run from the command line with the `--help` option to get hel | tools dump | Dumping a directory or table to the file system | | [tools rename](../commands/tools/rename.md) | Renaming tables | | tools restore | Restoring data from the file system | - {% if ydb-cli == "ydb" %} -[update](../commands/service.md) | Updating the {{ ydb-short-name }} CLI -[version](../commands/service.md) | Displaying the version of the {{ ydb-short-name }} CLI +|[update](../commands/service.md) | Updating the {{ ydb-short-name }} CLI | +|[version](../commands/service.md) | Displaying the version of the {{ ydb-short-name }} CLI | {% endif %} -[workload](../commands/workload/index.md) | Generating YQL load | Running a YQL script (with streaming support) - +|[workload](../commands/workload/index.md) | Generating YQL load | Running a YQL script (with streaming support) | diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/connect.md b/ydb/docs/en/core/reference/ydb-cli/_includes/connect.md index bb1aba7b43..6aaa6bef91 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/connect.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/connect.md @@ -23,8 +23,8 @@ DB connection options in the command line are specified before defining the comm {{ ydb-cli }} <connection_options> <command> <command_options> ``` -- `-e, --endpoint <endpoint>` : [Endpoint](../../../concepts/connect.md#endpoint): The main connection parameter that allows finding the {{ ydb-short-name }} server on the network. If no port is specified, port 2135 is used. If no protocol is specified, gRPCs (with encryption) is used in {{ ydb-short-name }} CLI public builds. -- `-d, --database <database>` : [DB location](../../../concepts/connect.md#database). +* `-e, --endpoint <endpoint>` : [Endpoint](../../../concepts/connect.md#endpoint): The main connection parameter that allows finding the {{ ydb-short-name }} server on the network. If no port is specified, port 2135 is used. If no protocol is specified, gRPCs (with encryption) is used in {{ ydb-short-name }} CLI public builds. +* `-d, --database <database>` : [DB location](../../../concepts/connect.md#database). {% include [auth/options.md](auth/options.md) %} @@ -36,13 +36,13 @@ The profile may define most variables similar to the options from the [Command l ## Parameters from environment variables {#env} -If the profile is not explicitly specified in the command line or the authentication parameters are not set in it, the {{ ydb-short-name }} CLI tries to determine the authentication mode and parameters by the {{ ydb-short-name }} CLI environment as follows: +If you did not explicitly specify a profile or authentication parameters at the command line, the {{ ydb-short-name }} CLI attempts to determine the authentication mode and parameters from the {{ ydb-short-name }} CLI environment as follows: {% include [env.md](auth/env.md) %} ## Parameters from the activated profile {#activated-profile} -If any connection parameter could not be determined in the previous steps and the profile was not explicitly specified in the command line with the `--profile` option, the {{ ydb-short-name }} CLI tries to use the connection parameters from the [activated profile](../profile/activate.md). +If some connection parameter could not be determined in the previous steps, and you did not explicitly specify a profile at the command line with the `--profile` option, the {{ ydb-short-name }} CLI attempts to use the connection parameters from the [activated profile](../profile/activate.md). ## Error messages {#errors} @@ -54,17 +54,16 @@ If all the steps described in the beginning of this article are completed, but t If the authentication mode is known, but the necessary additional parameters are not, the command is aborted and an error message describing the issue is returned: -- `(No such file or directory) util/system/file.cpp:857: can't open "<filepath>" with mode RdOnly|Seq (0x00000028)`: Couldn't open and read the `<filepath>` file specified in one of the parameters with the file name and path. +* `(No such file or directory) util/system/file.cpp:857: can't open "<filepath>" with mode RdOnly|Seq (0x00000028)`: Couldn't open and read the `<filepath>` file specified in one of the parameters with the file name and path. ## Additional parameters {#additional} When using gRPCs (with encryption), you may need to [select a root certificate](../../../concepts/connect.md#tls-cert): -- `--ca-file <filepath>` : Root certificate PEM file for a TLS connection. +* `--ca-file <filepath>` : Root certificate PEM file for a TLS connection. Currently, root certificates are not stored in profiles and can only be defined by command line options. -## Authentication {#whoami} +## Verifying authentication {#whoami} The {{ ydb-short-name }} CLI [`discovery whoami`](../commands/discovery-whoami.md) auxiliary command lets you check the account that you actually used to authenticate with the server. - diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/index.md b/ydb/docs/en/core/reference/ydb-cli/_includes/index.md index 6d34a1e7db..b407502fb7 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/index.md @@ -18,4 +18,3 @@ For a full description of {{ ydb-short-name }} CLI commands, see the following a * [Working with secondary indexes](../commands/index-ops.md). * [Getting a list of DB endpoints](../commands/discovery-list.md). * [Load testing](../commands/workload/index.md). - diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/install.md b/ydb/docs/en/core/reference/ydb-cli/_includes/install.md index 87c5f29882..81e4f76a92 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/install.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/install.md @@ -75,4 +75,3 @@ {% endnote %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/all-output.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/all-output.md deleted file mode 100644 index 4f110fab3d..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/all-output.md +++ /dev/null @@ -1,123 +0,0 @@ -```text -YDB client - -Usage: ydb [options...] <subcommand> - -Subcommands: -ydb -├─ config Manage YDB CLI configuration -│ └─ profile Manage configuration profiles -│ ├─ activate Activate specified configuration profile (aliases: set) -│ ├─ create Create new configuration profile or re-configure existing one -│ ├─ delete Delete specified configuration profile (aliases: remove) -│ ├─ get List values for specified configuration profile -│ └─ list List configuration profiles -├─ discovery Discovery service operations -│ ├─ list List endpoints -│ └─ whoami Who am I? -├─ export Export service operations -│ └─ s3 Create export to S3 -├─ import Import service operations -│ ├─ file Import data from file -│ │ ├─ csv Import data from CSV file -│ │ └─ tsv Import data from TSV file -│ └─ s3 Create import from S3 -├─ init YDB CLI initialization -├─ operation Operation service operations -│ ├─ cancel Start cancellation of a long-running operation -│ ├─ forget Forget long-running operation -│ ├─ get Check status for a given operation -│ └─ list List operations of specified kind -├─ scheme Scheme service operations -│ ├─ describe Show information about object at given object -│ ├─ ls Show information about objects inside given directory -│ ├─ mkdir Make directory -│ ├─ permissions Modify permissions -│ │ ├─ chown Change owner -│ │ ├─ clear Clear permissions -│ │ ├─ grant Grant permission (aliases: add) -│ │ ├─ revoke Revoke permission (aliases: remove) -│ │ └─ set Set permissions -│ └─ rmdir Remove directory -├─ scripting Scripting service operations -│ └─ yql Execute YQL script -├─ table Table service operations -│ ├─ attribute Attribute operations (aliases: attr) -│ │ ├─ add Add attributes to the specified table -│ │ └─ drop Drop attributes from the specified table -│ ├─ drop Drop a table -│ ├─ index Index operations -│ │ ├─ add Add index in to the specified table -│ │ │ ├─ global-async Add global async index. The command returns operation -│ │ │ └─ global-sync Add global sync index. The command returns operation (aliases: global) -│ │ └─ drop Drop index from the specified table -│ ├─ query Query operations -│ │ ├─ execute Execute query (aliases: exec) -│ │ └─ explain Explain query -│ ├─ readtable Stream read table -│ └─ ttl Ttl operations -│ ├─ drop Drop ttl settings from the specified table -│ └─ set Set ttl settings for the specified table -├─ tools YDB tools service -│ ├─ copy Copy table(s) -│ ├─ dump Dump specified database directory or table into local directory -│ ├─ rename Rename or repalce table(s) -│ └─ restore Restore database from local dump into specified directory -├─ update Update current YDB CLI binary if there is a newer version available -├─ version Print Yandex.Cloud YDB CLI version -└─ yql Execute YQL script (streaming) - - -Options: - {-?|-h|--help} Print usage - {-e|--endpoint} [PROTOCOL://]HOST[:PORT] - [Required] Endpoint to connect. Protocols: grpc, grpcs (Default: grpcs). - Endpoint search order: - 1. This option - 2. Profile specified with --profile option - 3. Active configuration profile - {-d|--database} PATH [Required] Database to work with. - Database search order: - 1. This option - 2. Profile specified with --profile option - 3. Active configuration profile - {-v|--verbose} Increase verbosity of operations (default: 0) - --ca-file PATH Path to a file containing the PEM encoding of the server root certificates for tls connections. - If this parameter is empty, the default roots will be used. - --iam-token-file PATH IAM token file. Note: IAM tokens expire in 12 hours. - For more info go to: cloud.yandex.com/en/docs/iam/concepts/authorization/iam-token - Token search order: - 1. This option - 2. Profile specified with --profile option - 3. "IAM_TOKEN" environment variable - 4. Active configuration profile - --yc-token-file PATH YC token file. It should contain OAuth token of a Yandex Passport user to get IAM token with. - For more info go to: cloud.yandex.com/en/docs/iam/concepts/authorization/oauth-token - Token search order: - 1. This option - 2. Profile specified with --profile option - 3. "YC_TOKEN" environment variable - 4. Active configuration profile - --use-metadata-credentials - Use metadata service on a virtual machine to get credentials - For more info go to: cloud.yandex.com/en/docs/compute/operations/vm-connect/auth-inside-vm - Definition priority: - 1. This option - 2. Profile specified with --profile option - 3. "USE_METADATA_CREDENTIALS" environment variable - 4. Active configuration profile (default: 0) - --sa-key-file PATH Service account key file - For more info go to: cloud.yandex.com/en/docs/iam/operations/iam-token/create-for-sa - Definition priority: - 1. This option - 2. Profile specified with --profile option - 3. "SA_KEY_FILE" environment variable - 4. Active configuration profile - --iam-endpoint STR Endpoint of IAM service (default: "iam.api.cloud.yandex.net") - --profile NAME Profile name to use configuration parameters from. - --license Print license - --credits Print third-party licenses - -Free args: min: 1, max: unlimited - <subcommand> config,discovery,export,import,init,operation,scheme,scripting,table,tools,update,version,yql -``` diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/all.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/all.md deleted file mode 100644 index a9f0c6b9d7..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/all.md +++ /dev/null @@ -1,8 +0,0 @@ -## Getting general information about all the subcommands of the {{ ydb-short-name }} CLI {#all} - -Get a list of all available subcommands of the {{ ydb-short-name }} CLI with a brief description of each one: - -```bash -{{ ydb-cli }} --help -``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/intro.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/intro.md deleted file mode 100644 index b3e2b2f08f..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/intro.md +++ /dev/null @@ -1,4 +0,0 @@ -# Structure and description of {{ ydb-short-name }} CLI commands - -Get information about all available {{ ydb-short-name }} CLI commands or get a detailed description of a specific command. - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/one.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/one.md deleted file mode 100644 index 46a366bb3d..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/commands/one.md +++ /dev/null @@ -1,30 +0,0 @@ -## Getting detailed information about the subcommands of the {{ ydb-short-name }} CLI {#one} - -You can also get a more detailed description for any subcommand with a list of available parameters: - -```bash -{{ ydb-cli }} discovery whoami --help -``` - -Result: - -```text -Usage: ydb [global options...] discovery whoami [options...] - -Description: Who am I? - -Global options: - {-e|--endpoint}, {-d|--database}, {-v|--verbose}, --ca-file, --iam-token-file, --yc-token-file, --use-metadata-credentials, --sa-key-file, --iam-endpoint, --profile, --license, --credits - To get full description of these options run 'ydb --help'. - -Options: - {-?|-h|--help} print usage - --client-timeout ms Operation client timeout - {-g|--groups} With groups (default: 0) -``` - -There are two types of passed parameters: - -* `Global options`: Global, specified after `ydb`. -* `Options`: Options of the subcommand, specified after the subcommand. - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/conn_options_ref.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/conn_options_ref.md index 54b58c7c1e..697af43f5a 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/conn_options_ref.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/conn_options_ref.md @@ -1,2 +1 @@ where [connection options] are [database connection options](../../connect.md#command-line-pars) - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/dir.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/dir.md index bd19db854c..8d4eee7dba 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/dir.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/dir.md @@ -25,17 +25,17 @@ Issues: pathId: [OwnerId: <some>, LocalPathId: <some>], path type: EPathTypeDir, path state: EPathStateNoChanges ``` -The full path syntax starting with a `/` character is also supported. The full path must begin with the [database location](../../../../concepts/connect.md#database) specified in the connection parameters or with which operations are allowed via the established connection to the cluster. +The full path syntax starting with a `/` character is also supported. The full path must begin with the [database location](../../../../concepts/connect.md#database)specified in the connection parameters or with which operations are allowed via the established connection to the cluster. Examples: -- Creating a directory at the database root +* Creating a directory at the database root: ```bash {{ ydb-cli }} --profile db1 scheme mkdir dir1 ``` -- Creating directories at the specified path from the database root +* Creating directories at the specified path from the database root: ```bash {{ ydb-cli }} --profile db1 scheme mkdir dir1/dir2/dir3 @@ -82,4 +82,3 @@ Names of objects issued in [YQL](../../../../yql/reference/index.md) queries may ## Implicit creation of directories during import {#import} The data import command creates a directory tree mirroring the original imported catalog. - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list.md index 2f1b93166e..e28160d6bd 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list.md @@ -10,9 +10,9 @@ The `discovery list` information command lets you get a list of [endpoints](../. The output rows in the response contain the following information: -1. Endpoint, including protocol and port -2. Availability zone (in square brackets) -3. The `#` character is used for the list of {{ ydb-short-name }} services available on this endpoint +1. Endpoint, including protocol and port. +2. Availability zone (in square brackets). +3. The `#` character is used for the list of {{ ydb-short-name }} services available on this endpoint. An endpoint discovery request to the {{ ydb-short-name }} cluster is executed in the {{ ydb-short-name }} SDK at driver initialization so that you can use the `discovery list` CLI command to localize connection issues. @@ -24,4 +24,3 @@ grpcs://vm-etn01q5-ysor.etn01q5k.ydb.mdb.yandexcloud.net:2135 [sas] #table_servi grpcs://vm-etn01q5-arum.etn01ftr.ydb.mdb.yandexcloud.net:2135 [vla] #table_service #scripting #discovery #rate_limiter #locking #kesus grpcs://vm-etn01q5beftr.ydb.mdb.yandexcloud.net:2135 [myt] #table_service #scripting #discovery #rate_limiter #locking #kesus ``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list/intro.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list/intro.md deleted file mode 100644 index f427704bb7..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-list/intro.md +++ /dev/null @@ -1,8 +0,0 @@ -# Getting a list of DB endpoints - -Get a list of DB endpoints: - -```bash -{{ ydb-cli }} discovery list -``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-whoami.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-whoami.md index a3b4ede641..7119609561 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-whoami.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/discovery-whoami.md @@ -22,4 +22,3 @@ User SID: aje5kkjdgs0puc18976co@as User has no groups ``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/global-options.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/global-options.md index 44690bd9b8..e323ac3c3c 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/global-options.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/global-options.md @@ -6,6 +6,5 @@ DB connection options are described in [Connecting to and authenticating with a ## Service options {#service-options} -- `--profile <name>` : Indicates the use of the DB connection profile with the specified name when executing a {{ ydb-short-name }} CLI command. Most connection parameters can be stored in the profile. -- `-v, --verbose` : Outputs detailed information about all operations being executed. Specifying this option is helpful when locating DB connection issues. - +* `--profile <name>` : Indicates the use of the DB connection profile with the specified name when executing a {{ ydb-short-name }} CLI command. Most connection parameters can be stored in the profile. +* `-v, --verbose` : Outputs detailed information about all operations being executed. Specifying this option is helpful when locating DB connection issues. diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/index.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/index.md deleted file mode 100644 index db8a93d9df..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/index.md +++ /dev/null @@ -1,12 +0,0 @@ -# Overview - -This section contains descriptions of the {{ ydb-short-name }} CLI commands and examples of how you can use them to perform the following operations in the DB: - -* [Listing objects](../../commands/scheme-ls.md). -* [Getting information about schema objects](../../commands/scheme-describe.md). -* [Getting a list of DB endpoints](../../commands/discovery-list.md). -* [Making a DB query](../../commands/query.md). -* [Streaming table reads](../../commands/readtable.md). -* [Working with secondary indexes](../../commands/operations-index.md). -* [Working with directories](../../commands/scheme-mkdir.md). - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls.md index 3063baf9b6..bc18e0cf13 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls.md @@ -14,60 +14,59 @@ In the `path` parameter, you can specify the [directory](../dir.md) you want to The following options are available for the command: -- `-l` : Full details about attributes of each object -- `-R` : Recursive traversal of all subdirectories +* `-l` : Full details about attributes of each object. +* `-R` : Recursive traversal of all subdirectories. **Examples** -- Getting objects from the root database directory in a compressed format +* Getting objects from the root database directory in a compressed format: ```bash {{ ydb-cli }} --profile db1 scheme ls ``` -- Getting objects in all database directories in a compressed format +* Getting objects in all database directories in a compressed format: ```bash {{ ydb-cli }} --profile db1 scheme ls -R ``` -- Getting objects from the given database directory in a compressed format +* Getting objects from the given database directory in a compressed format: ```bash {{ ydb-cli }} --profile db1 scheme ls dir1 {{ ydb-cli }} --profile db1 scheme ls dir1/dir2 ``` -- Getting objects in all subdirectories in the given directory in a compressed format +* Getting objects in all subdirectories in the given directory in a compressed format: ```bash {{ ydb-cli }} --profile db1 scheme ls dir1 -R {{ ydb-cli }} --profile db1 scheme ls dir1/dir2 -R ``` -- Getting complete information on objects in the root database directory +* Getting complete information on objects in the root database directory: ```bash {{ ydb-cli }} --profile db1 scheme ls -l ``` -- Getting complete information about objects in a given database directory +* Getting complete information about objects in a given database directory: ```bash {{ ydb-cli }} --profile db1 scheme ls dir1 -l {{ ydb-cli }} --profile db1 scheme ls dir2/dir3 -l ``` -- Getting complete information about objects in all database directories +* Getting complete information about objects in all database directories: ```bash {{ ydb-cli }} --profile db1 scheme ls -lR ``` -- Getting complete information on objects in all subdirectories of a given database directory +* Getting complete information on objects in all subdirectories of a given database directory: ```bash {{ ydb-cli }} --profile db1 scheme ls dir1 -lR {{ ydb-cli }} --profile db1 scheme ls dir2/dir3 -lR ``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls/intro.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls/intro.md deleted file mode 100644 index 3aa35df5e2..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/scheme-ls/intro.md +++ /dev/null @@ -1,20 +0,0 @@ -# Listing objects - -To get a listing of objects, use the `scheme ls <Path>` subcommand. If you don't specify the path, a listing of the DB root will be output: - -```bash -{{ ydb-cli }} scheme ls -``` - -Result: - -```text -episodes seasons series .sys -``` - -To view detailed information about objects, add the `-l` flag: - -```bash -{{ ydb-cli }} scheme ls -l -``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md index 1ca21de5be..83a7503d98 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md @@ -1,14 +1,13 @@ # Service commands -These commands relate to the {{ ydb-short-name }} CLI itself and do not involve establishing a DB connection. They can be expressed either as a parameter or as an option. +These commands have to do with the {{ ydb-short-name }} CLI client itself and do not involve establishing a DB connection. They can be expressed either as a parameter or as an option. | Name | Description | | --- | --- | -| `-?`, `-h`, `--help` | Output the {{ ydb-short-name }} CLI syntax help | -| `Version` | Output the {{ ydb-short-name }} CLI version (for public builds) | -| `update` | Update the {{ ydb-short-name }} CLI to the latest version (for public builds) | -| `--license` | Show the license (for public builds) | -| `--credits` | Show third-party product licenses (for public builds) | +| `-?`, `-h`, `--help` | Output the {{ ydb-short-name }} CLI syntax help. | +| `Version` | Output the {{ ydb-short-name }} CLI version (for public builds). | +| `update` | Update the {{ ydb-short-name }} CLI to the latest version (for public builds). | +| `--license` | Show the license (for public builds). | +| `--credits` | Show third-party product licenses (for public builds). | If it is not known whether the used {{ ydb-short-name }} CLI build is public, you can find out if a particular service command is supported through help output. - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md index b4912403e9..483618514f 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md @@ -24,7 +24,7 @@ View a description of the command to copy a table: | `--client-timeout <value>` | Client side operation timeout, ms. | | `--operation-timeout <value>` | Server side operation timeout, ms. | | `--cancel-after <value>` | Operation lifetime, after which the operation is canceled, ms. | -| `--item <property>=<value>,...` | Operation parameters. Possible values:<br/><ul><li>`destination`, `dst`, or `d` — required parameter, the path of the destination table. If the destination path contains folders, they must be created in advance. The table with the destination name should not exist.</li><li>`source`, `src`, or `s` — required parameter, the path of the source table.</li></ul> | +| `--item <value>=<value>,...` | Operation parameters. Possible values:<br/><ul><li>`destination`, `dst`, or `d` — required parameter, the path of the destination table. If the destination path contains folders, they must be created in advance. The table with the destination name should not exist.</li><li>`source`, `src`, or `s` — required parameter, the path of the source table.</li></ul> | ## Examples {#examples} diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md index ee82fd9b59..cff6d86014 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md @@ -1,6 +1,6 @@ # Renaming a table -Using the `tools rename` subcommand, you can [rename](../../../../../concepts/datamodel.md#rename) one or more tables at the same time, move a table to another directory within the same database, replace one table with another one within the same transaction. +Using the `tools rename` subcommand, you can [rename](../../../../../concepts/datamodel.md#rename) one or more tables at the same time, move a table to a different directory within the same database, or replace one table with another within the same transaction. General command format: @@ -23,20 +23,20 @@ A single run of the `tools rename` command executes a single rename transaction | Parameter name | Parameter description | | --- | --- | -| `--item <property>=<value>,...` | Description of the rename operation. Can be specified multiple times if multiple rename operations need to be executed within a single transaction.</br></br>Required properties:</br><ul><li>`source`, `src`, and `s`: Path to the source table.</li><li>`destination`, `dst`, and `d`: Path to the destination table. If the destination path contains folders, they must be [created in advance](../../dir.md#mkdir).</li></ul>Advanced properties:</br><ul> <li>`replace`, `force`: Overwrite the destination table. If `True`, the destination table is overwritten with its data deleted. `False`: If the destination table exists, an error is returned and the entire rename transaction is canceled. Default value: `False`.</li></ul> | +| `--item <value>=<value>,...` | Description of the rename operation. Can be specified multiple times if multiple rename operations need to be executed within a single transaction.</br></br>Required properties:</br><ul><li>`source`, `src`, and `s`: Path to the source table.</li><li>`destination`, `dst`, and `d`: Path to the destination table. If the destination path contains folders, they must be [created in advance](../../dir.md#mkdir).</li></ul>Advanced properties:</br><ul> <li>`replace`, `force`: Overwrite the destination table. If `True`, the destination table is overwritten with its data deleted. `False`: If the destination table exists, an error is returned and the entire rename transaction is canceled. Default value: `False`.</li></ul> | | `--timeout <value>` | Operation timeout, ms. | When including multiple rename operations in a single `tools rename` call, they're executed in the specified order, but within a single transaction. This lets you rotate the table under load without data loss: the first operation is renaming the working table to the backup one and the second is renaming the new table to the working one. ## Examples {#examples} -- Renaming a single table: +* Renaming a single table: ```bash {{ ydb-cli }} tools rename --item src=old_name,dst=new_name ``` -- Renaming multiple tables within a single transaction: +* Renaming multiple tables within a single transaction: ```bash {{ ydb-cli }} tools rename \ @@ -45,7 +45,7 @@ When including multiple rename operations in a single `tools rename` call, they' --item source=new-project/third_table,destination=new-project/series ``` -- Moving tables to a different directory: +* Moving tables to a different directory: ```bash {{ ydb-cli }} tools rename \ @@ -54,18 +54,17 @@ When including multiple rename operations in a single `tools rename` call, they' --item source=new-project/third_table,destination=cinema/third_table ``` -- Replacing a table +* Replacing a table ```bash {{ ydb-cli }} tools rename \ --item replace=True,source=pre-prod-project/main_table,destination=prod-project/main_table ``` -- Rotating a table +* Rotating a table ```bash {{ ydb-cli }} tools rename \ --item source=prod-project/main_table,destination=prod-project/main_table.backup \ --item source=pre-prod-project/main_table,destination=prod-project/main_table ``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/commands.md b/ydb/docs/en/core/reference/ydb-cli/commands/commands.md deleted file mode 100644 index e7541c4794..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/commands.md +++ /dev/null @@ -1,7 +0,0 @@ -{% include [intro.md](_includes/commands/intro.md) %} - -{% include [all.md](_includes/commands/all.md) %} - -{% include [all-output.md](_includes/commands/all-output.md) %} - -{% include [one.md](_includes/commands/one.md) %} diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/index-ops.md b/ydb/docs/en/core/reference/ydb-cli/commands/index-ops.md index ea72a9c399..8905766ce6 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/index-ops.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/index-ops.md @@ -1,6 +1,6 @@ {% include [intro.md](_includes/operations-index/intro.md) %} -{% include [operation-index.md](_includes/operations-index/operation-index.md) %} +{% include [operation-index.md](_includes/operations-index/operation-index.md %} {% include [operations-index-exp.md](_includes/operations-index/operations-index-exp.md) %} diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/operations-index.md b/ydb/docs/en/core/reference/ydb-cli/commands/operations-index.md deleted file mode 100644 index 8905766ce6..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/commands/operations-index.md +++ /dev/null @@ -1,13 +0,0 @@ -{% include [intro.md](_includes/operations-index/intro.md) %} - -{% include [operation-index.md](_includes/operations-index/operation-index.md %} - -{% include [operations-index-exp.md](_includes/operations-index/operations-index-exp.md) %} - -{% include [one-get.md](_includes/operations-index/one-get.md) %} - -{% include [one-get-exp.md](_includes/operations-index/one-get-exp.md) %} - -{% include [all-get.md](_includes/operations-index/all-get.md) %} - -{% include [delete-index.md](_includes/operations-index/delete-index.md) %} diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/scheme-mkdir.md b/ydb/docs/en/core/reference/ydb-cli/commands/scheme-mkdir.md index 180e27a7ca..5ca3443385 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/scheme-mkdir.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/scheme-mkdir.md @@ -1,2 +1 @@ This page has been deleted, the content has been moved to a [new section](dir.md). - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/index.md b/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/index.md index e1430ca139..1af0f57f21 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/index.md @@ -22,4 +22,3 @@ See the description of the command to run the data load: The following types of load tests are supported at the moment: * [Stock](../stock.md): An online store warehouse simulator. - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/stock.md b/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/stock.md index 9ef2a6d666..37c369878f 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/stock.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/workload/_includes/stock.md @@ -88,8 +88,12 @@ See the description of the command to run the data load: | `--threads <value>` | `-t <value>` | The number of parallel threads creating the load. Default value: 10. | | `--quiet` | - | Outputs only the final test result. | | `--print-timestamp` | - | Print the time together with the statistics of each time window. | +| `--client-timeout` | - | [Transport timeout in milliseconds](../../../../../best_practices/timeouts.md). | +| `--operation-timeout` | - | [Operation timeout in milliseconds](../../../../../best_practices/timeouts.md). | +| `--cancel-after` | - | [Timeout for canceling an operation in milliseconds](../../../../../best_practices/timeouts.md). | +| `--window` | - | Statistics collection window in seconds. Default: 1. | -## getCustomerHistory load {#getCustomerHistory} +## getCustomerHistory load{#getCustomerHistory} This type of load reads the specified number of orders for the customer with id = 10000. @@ -120,7 +124,7 @@ To run this type of load, execute the command: | --- | --- | --- | | `--limit <value>` | `-l <value>` | The required number of orders. Default value: 10. | -## getRandomCustomerHistory load {#getRandomCustomerHistory} +## getRandomCustomerHistory load{#getRandomCustomerHistory} This type of load reads the specified number of orders from randomly selected customers. @@ -151,7 +155,7 @@ To run this type of load, execute the command: | --- | --- | --- | | `--limit <value>` | `-l <value>` | The required number of orders. Default: 10. | -## insertRandomOrder load {#insertRandomOrder} +## insertRandomOrder load{#insertRandomOrder} This type of load creates a randomly generated order. The order includes several different products, 1 item per product. The number of products in the order is generated randomly based on an exponential distribution. @@ -241,7 +245,7 @@ To run this type of load, execute the command: | --- | --- | --- | | `--products <value>` | `-p <value>` | Number of products in the test. The default value is 100. | -## submitSameOrder load {#submitSameOrder} +## submitSameOrder load{#submitSameOrder} This type of load creates an order with the same set of products and processes it. Order processing consists in decreasing the number of ordered products in stock. @@ -290,13 +294,13 @@ To run this type of load, execute the command: ``` * `global workload options`: The [global options for all types of load](#global_workload_options). -* `specific workload options`: [Parameters of a specific type of load](#submit_same_order_options) +* `specific workload options`: [Parameters of a specific type of load](#submit_same_order_options). ### Parameters for submitSameOrder {#submit_same_order_options} | Parameter name | Short name | Parameter description | | --- | --- | --- | -| `--products <value>` | `-p <value>` | Number of products per order. The default value is 100. | +| `--products <value>` | `-p <value>`| | Number of products per order. The default value is 100. | ## Examples of running the loads @@ -364,4 +368,3 @@ Txs Txs/Sec Retries Errors p50(ms) p95(ms) p99(ms) pMax(ms) * `p99(ms)`: 99th percentile of request latency, in ms. * `pMax(ms)`: 100th percentile of request latency, in ms. * `Timestamp`: Timestamp of the end of the time window. - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/activate.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/activate.md index 51e03e3a69..09ec2f73d0 100644 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/activate.md +++ b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/activate.md @@ -1,4 +1,4 @@ -# Activated profile +# Activating a profile Executing {{ ydb-short-name }} CLI commands on a database require establishing a connection to the database. If the {{ ydb-short-name }} CLI couldn't identify a certain connection parameter by [command-line parameters and environment variables](../../connect.md), it's taken from the activated profile. @@ -6,9 +6,9 @@ Profile activation is an easy way to get started with the {{ ydb-short-name }} C However, this simplicity may lead to undesirable behavior in further operation, as soon as you need to work with multiple databases: -- The activated profile is applied implicitly, meaning that it can be applied by mistake when a certain connection parameter is missing in the command line. -- The activated profile is applied implicitly, meaning that it can be applied by mistake when a typo is made in the name of an environment variable. -- The activated profile cannot be used in scripts, since it is saved in a file and its change in one terminal window will affect all other windows, possibly leading to an unexpected change of the DB in the middle of the loop being executed in the script. +* The activated profile is applied implicitly, meaning that it can be applied by mistake when a certain connection parameter is missing in the command line. +* The activated profile is applied implicitly, meaning that it can be applied by mistake when a typo is made in the name of an environment variable. +* The activated profile cannot be used in scripts, since it is saved in a file and its change in one terminal window will affect all other windows, possibly leading to an unexpected change of the DB in the middle of the loop being executed in the script. When you need to connect to any new database other than the initial one for the first time, we recommend that you deactivate the profile and always select it explicitly using the `--profile` option. @@ -20,7 +20,7 @@ Profile activation is performed by running the command {{ ydb-cli }} config profile activate [profile_name] ``` -, where `[profile_name]` is an optional profile name. +where `[profile_name]` is an optional profile name. If the profile name is specified, it is activated. If a profile with the specified name does not exist, an error is returned prompting you to view the list of available profiles: @@ -40,11 +40,11 @@ Please choose profile to activate: Please enter your numeric choice: ``` -- `1` terminates the command execution and keeps the currently activated profile activated. It's marked as `(active)` in the list of existing profiles starting from item 3. -- `2` deactivates the currently activated profile. If no profile has been activated before, nothing changes. -- `3` and so on activates the selected profile. The currently activated profile is marked as `(active)`. +* `1` terminates the command execution and keeps the currently activated profile activated. It's marked as `(active)` in the list of existing profiles starting from item 3. +* `2` deactivates the currently activated profile. If no profile has been activated before, nothing changes. +* `3` and so on activates the selected profile. The currently activated profile is marked as `(active)`. -If the profile is successfully activated, the execution ends with a message saying +If the profile is successfully activated, the execution ends with a message saying: ```text Profile "<profile_name>" was activated. @@ -80,4 +80,3 @@ echo 2 | {{ ydb-cli }} config profile activate ``` The efficiency of this method is not guaranteed in any way. - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/create.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/create.md index 1455fbb0e5..8de06c3ac1 100644 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/create.md +++ b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/create.md @@ -49,9 +49,9 @@ The first step of the interactive scenario is different in the `init` and `profi Next, you'll be prompted to sequentially perform the following actions with each connection parameter that can be saved in the profile: -- Don't save -- Set a new value or Use <value> -- Use current value (this option is available when updating an existing profile) +* Don't save. +* Set a new value or Use - Set a new value or Use <value>. +* Use current value (this option is available when updating an existing profile). ## Example @@ -72,7 +72,7 @@ Creating a new `mydb1` profile: Please enter your numeric choice: ``` -1. Enter the [DB name](../../../../concepts/connect.md#database) or don't save this parameter for the profile: +1. Enter the [DB name](../../../../concepts/connect.md#database) or don't save this parameter for the profile: ```text Pick desired action to configure database: @@ -85,10 +85,10 @@ Creating a new `mydb1` profile: ```text Pick desired action to configure authentication method: - [1] Use IAM token (iam-token) cloud.yandex.com/en/docs/iam/concepts/authorization/iam-token - [2] Use OAuth token of a Yandex Passport user (yc-token) cloud.yandex.com/en/docs/iam/concepts/authorization/oauth-token - [3] Use metadata service on a virtual machine (use-metadata-credentials) cloud.yandex.com/en/docs/compute/operations/vm-connect/auth-inside-vm - [4] Use security account key file (sa-key-file) cloud.yandex.com/en/docs/iam/operations/iam-token/create-for-sa + [1] Use IAM token (iam-token) cloud.yandex.ru/docs/iam/concepts/authorization/iam-token + [2] Use OAuth token of a Yandex Passport user (yc-token) cloud.yandex.ru/docs/iam/concepts/authorization/oauth-token + [3] Use metadata service on a virtual machine (use-metadata-credentials) cloud.yandex.ru/docs/compute/operations/vm-connect/auth-inside-vm + [4] Use security account key file (sa-key-file) cloud.yandex.ru/docs/iam/operations/iam-token/create-for-sa [5] Don't save authentication data for profile "mydb1" Please enter your numeric choice: ``` @@ -108,4 +108,3 @@ Creating a new `mydb1` profile: ```text Activate profile "mydb1" to use by default? (current active profile is not set) y/n: n ``` - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/delete.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/delete.md index e28817bfa4..2b6ccaafaa 100644 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/delete.md +++ b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/delete.md @@ -6,7 +6,7 @@ Currently, you can only delete profiles interactively with the following command {{ ydb-cli }} config profile delete <profile_name> ``` -, where `<profile_name>` is the profile name. +where `<profile_name>` is the profile name. The {{ ydb-short-name }} CLI will request confirmation to delete the profile: @@ -35,4 +35,3 @@ echo y | {{ ydb-cli }} config profile delete my_profile ``` The efficiency of this method is not guaranteed in any way. - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/index.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/index.md index 7c5f9e51fe..11536c8d21 100644 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/index.md @@ -2,7 +2,7 @@ A profile is a saved and locally named configuration of DB connection parameters. With profiles, you can reuse data about DB location and authentication parameters, making a CLI call much shorter: -- Calling the `scheme ls` command without a profile: +* Calling the `scheme ls` command without a profile: ```bash {{ ydb-cli }} \ @@ -12,7 +12,7 @@ A profile is a saved and locally named configuration of DB connection parameters scheme ls ``` -- Calling the same `scheme ls` command using a profile: +* Calling the same `scheme ls` command using a profile: ```bash {{ ydb-cli }} --profile db1 scheme ls @@ -20,15 +20,14 @@ A profile is a saved and locally named configuration of DB connection parameters ## Profile management commands {#commands} -- [Creating a profile](../create.md) -- [Using a profile](../use.md) -- [Getting a list of profiles and profile parameters](../list-and-get.md) -- [Deleting a profile](../delete.md) -- [Activating a profile and using the activated profile](../activate.md) +* [Creating a profile](../create.md). +* [Using a profile](../use.md). +* [Getting a list of profiles and profile parameters](../list-and-get.md). +* [Deleting a profile](../delete.md). +* [Activating a profile and using the activated profile](../activate.md). ## Where profiles are stored {#location} Profiles are stored locally in a file named `~/ydb/config/config.yaml`. {% include [location_overlay.md](location_overlay.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/list-and-get.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/list-and-get.md index 91966f6974..9e98fdfce9 100644 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/list-and-get.md +++ b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/list-and-get.md @@ -42,4 +42,3 @@ Full information on all profiles and parameters stored in them: ``` The output of this command combines the output of the command to get a list of profiles (with the active profile marked) and the parameters of each profile in the lines following its name. - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/profile-list.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/profile-list.md deleted file mode 100644 index 615cd80a3d..0000000000 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/profile-list.md +++ /dev/null @@ -1,2 +0,0 @@ -To specify a profile, use its name. To find out the profile name, [get a list of profiles](../list-and-get.md#profile-list). - diff --git a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/use.md b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/use.md index cda6440a88..b6493ea46f 100644 --- a/ydb/docs/en/core/reference/ydb-cli/profile/_includes/use.md +++ b/ydb/docs/en/core/reference/ydb-cli/profile/_includes/use.md @@ -35,4 +35,3 @@ In this case, the connection parameters specified in the command line have prior If the `--profile` option is not specified in the command line, the {{ ydb-short-name }} CLI will try to take from the currently activated profile all the connection parameters that it couldn't define in other ways (from command-line options or environment variables, as described in [Connecting to and authenticating with a database](../../connect.md)). Implicit use of the activated profile may cause errors, so we recommend that you read the [Activated profile](../activate.md) article before using this mode. - 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 9759a8b45c..c667db1dfa 100644 --- a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml +++ b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml @@ -35,7 +35,7 @@ items: # items: # - name: Copy tables # href: commands/tools/copy.md - # - name: Making backup + # - name: Dump # href: commands/tools/dump.md # - name: Restore backup # href: commands/tools/restore.md diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/auth.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/auth.md index 1c9a4a6e0a..48465c6b5a 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/_includes/auth.md +++ b/ydb/docs/en/core/reference/ydb-sdk/_includes/auth.md @@ -7,7 +7,7 @@ The {{ ydb-short-name }} SDK uses an object that is responsible for generating t 1. Ad-hoc methods for different [authentication modes](../../../concepts/connect.md#auth-modes) with explicit parameter transfer. 2. A method that determines the authentication mode and the necessary parameters from the environment where the application is run. -Usually, a token generation object is created before initializing the {{ ydb-short-name }} driver and passed as a parameter to its builder. The C++ and Go SDKs additionally let you work with multiple databases and token generation objects through a single driver. +Usually, you create a token generation object before you initialize the {{ ydb-short-name }} driver, and you pass the object to the driver constructor as a parameter. The C++ and Go SDKs additionally let you work with multiple databases and token generation objects through a single driver. If a token generation object is not defined, the driver won't add any authentication information to requests. This may let you successfully connect to locally deployed {{ ydb-short-name }} clusters that require no authentication. For all databases available over the network, such requests will be rejected with an authentication error returned. @@ -42,9 +42,9 @@ You can click on any of the methods described below to go to the source code of | [Mode](../../../concepts/connect.md#auth-modes) | Method | | ----- | ----- | | Anonymous | [`com.yandex.ydb.core.auth.NopAuthProvider.INSTANCE`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/anonymous_credentials) | - | Access Token | [`com.yandex.ydb.auth.iam.CloudAuthProvider.newAuthProvider(`</br> `yandex.cloud.sdk.auth.provider.IamTokenCredentialProvider`</br> `.builder()`</br> `.token(accessToken)`</br> `.build()`</br>`);`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/access_token_credentials) | - | Metadata | [`com.yandex.ydb.auth.iam.CloudAuthProvider.newAuthProvider(`</br> `yandex.cloud.sdk.auth.provider.ComputeEngineCredentialProvider`</br> `.builder()`</br> `.build()`</br>`);`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/metadata_credentials) | - | Service Account Key | [`com.yandex.ydb.auth.iam.CloudAuthProvider.newAuthProvider(`</br> `yandex.cloud.sdk.auth.provider.ApiKeyCredentialProvider`</br> `.builder()`</br> `.fromFile(Paths.get(saKeyFile))`</br> `.build()`</br>`);`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/service_account_credentials) | + | Access Token | [`com.yandex.ydb.auth.iam.CloudAuthProvider.newAuthProvider(`</br> `yandex.cloud.sdk.auth.provider.IamTokenCredentialProvider`</br> `.builder()`</br> `.token(accessToken)`</br> `.build()`</br>`);`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/access_token_credentials) | + | Metadata | [`com.yandex.ydb.auth.iam.CloudAuthProvider.newAuthProvider(`</br> `yandex.cloud.sdk.auth.provider.ComputeEngineCredentialProvider`</br> `.builder()`</br> `.build()`</br>`);`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/metadata_credentials) | + | Service Account Key | [`com.yandex.ydb.auth.iam.CloudAuthProvider.newAuthProvider(`</br> `yandex.cloud.sdk.auth.provider.ApiKeyCredentialProvider`</br> `.builder()`</br> `.fromFile(Paths.get(saKeyFile))`</br> `.build()`</br>`);`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/service_account_credentials) | | Determined by environment variables | [`com.yandex.ydb.auth.iam.CloudAuthHelper.getAuthProviderFromEnviron();`](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/auth/environ/src/main/java/com/yandex/ydb/example) | - Node.js @@ -80,9 +80,8 @@ The behavior of the Python SDK differs from the one described above. {% endnote %} 1. The algorithm for determining the authentication mode and the necessary parameters from the environment variables in the `construct_credentials_from_environ()` method differs from the one used in other SDKs: - - If the value of the `USE_METADATA_CREDENTIALS` environment variable is set to 1, the **Metadata** authentication mode is used. - - Otherwise, if the value of the `YDB_TOKEN` environment variable is set, the **Access Token** authentication mode is used, where this variable value is passed. - - Otherwise, if the value of the `SA_KEY_FILE` environment variable is set, the **System Account Key** authentication mode is used and the key is taken from the file whose name is specified in this variable. - - Or else, no authentication information is added to requests. + * If the value of the `USE_METADATA_CREDENTIALS` environment variable is set to 1, the **Metadata** authentication mode is used. + * Otherwise, if the value of the `YDB_TOKEN` environment variable is set, the **Access Token** authentication mode is used, where this variable value is passed. + * Otherwise, if the value of the `SA_KEY_FILE` environment variable is set, the **System Account Key** authentication mode is used and the key is taken from the file whose name is specified in this variable. + * Or else, no authentication information is added to requests. 2. If no object responsible for generating tokens is passed when initializing the driver, the [general procedure](#env) for reading environment variable values applies. - diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/index.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/index.md index e0664c8244..3c87c71abb 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/_includes/index.md @@ -6,19 +6,18 @@ OpenSource SDKs in the following programming languages are available to work wit {% if oss %} -- C++ [https://github.com/ydb-platform/ydb/tree/main/ydb/public/sdk/cpp](https://github.com/ydb-platform/ydb/tree/main/ydb/public/sdk/cpp) +* C++ [https://github.com/ydb-platform/ydb/tree/main/ydb/public/sdk/cpp](https://github.com/ydb-platform/ydb/tree/main/ydb/public/sdk/cpp) {% endif %} -- C# (.NET) [https://github.com/ydb-platform/ydb-dotnet-sdk](https://github.com/ydb-platform/ydb-dotnet-sdk) -- Go [https://github.com/ydb-platform/ydb-go-sdk/v3](https://github.com/ydb-platform/ydb-go-sdk) (archived versions: [v1](https://github.com/yandex-cloud/ydb-go-sdk/tree/v1.5.1) and [v2](https://github.com/yandex-cloud/ydb-go-sdk/tree/v2.11.2)) -- Java [https://github.com/yandex-cloud/ydb-java-sdk](https://github.com/yandex-cloud/ydb-java-sdk) -- Node.js [https://github.com/yandex-cloud/ydb-nodejs-sdk](https://github.com/yandex-cloud/ydb-nodejs-sdk) -- PHP [https://github.com/yandex-cloud/ydb-php-sdk](https://github.com/yandex-cloud/ydb-php-sdk) -- Python [https://github.com/yandex-cloud/ydb-python-sdk](https://github.com/yandex-cloud/ydb-python-sdk) +* C# (.NET) [https://github.com/ydb-platform/ydb-dotnet-sdk](https://github.com/ydb-platform/ydb-dotnet-sdk) +* Go [https://github.com/ydb-platform/ydb-go-sdk/v3](https://github.com/ydb-platform/ydb-go-sdk) (archived versions: [v1](https://github.com/yandex-cloud/ydb-go-sdk/tree/v1.5.1) and [v2](https://github.com/yandex-cloud/ydb-go-sdk/tree/v2.11.2)) +* Java [https://github.com/yandex-cloud/ydb-java-sdk](https://github.com/yandex-cloud/ydb-java-sdk) +* Node.js [https://github.com/yandex-cloud/ydb-nodejs-sdk](https://github.com/yandex-cloud/ydb-nodejs-sdk) +* PHP [https://github.com/yandex-cloud/ydb-php-sdk](https://github.com/yandex-cloud/ydb-php-sdk) +* Python [https://github.com/yandex-cloud/ydb-python-sdk](https://github.com/yandex-cloud/ydb-python-sdk) The SDK documentation contains the following sections: -- [Installation](../install.md) -- [Authentication](../auth.md) -- [Test app](../example/index.md) -- [Code recipes](../recipes/index.md) - +* [Installation](../install.md) +* [Authentication](../auth.md) +* [Test app](../example/index.md) +* [Code recipes](../recipes/index.md) diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md index ec44d5c9b9..6368e1d32b 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md +++ b/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md @@ -35,4 +35,3 @@ The build process using the source code is described in the source code reposito {% include [install/cmd_php.md](install/cmd_php.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md index 22977978e8..225e85e098 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md @@ -3,4 +3,3 @@ The article is being updated. {% endnote %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md index 6760da6cf3..bc1ad1a3a7 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md @@ -6,4 +6,3 @@ SELECT * FROM episodes; ``` For more information about PRAGMA YQL, see the [YQL documentation](../../../../../yql/reference/index.md). - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md index a02c2d6082..76fe582b48 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md @@ -1,6 +1,6 @@ # App in C# (.NET) -This page contains a detailed description of the code of a [test app](https://github.com/ydb-platform/ydb-dotnet-examples), that uses the [C# (.NET) SDK](https://github.com/ydb-platform/ydb-dotnet-sdk) {{ ydb-short-name }}. +This page contains a detailed description of the code of a [test app](https://github.com/ydb-platform/ydb-dotnet-examples), that is available as part of the [C# (.NET) SDK](https://github.com/ydb-platform/ydb-dotnet-sdk) {{ ydb-short-name }}. {% include [addition.md](auxilary/addition.md) %} diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md deleted file mode 100644 index f4f305ec74..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md +++ /dev/null @@ -1,227 +0,0 @@ -# App in Python - -This page contains a detailed description of the code of a [test app](https://github.com/yandex-cloud/ydb-python-sdk/tree/master/examples/basic_example_v1) that is available as part of the {{ ydb-short-name }} [Python SDK](https://github.com/yandex-cloud/ydb-python-sdk). - -{% include [init.md](steps/01_init.md) %} - -App code snippet for driver initialization: - -```python -def run(endpoint, database, path): - driver_config = ydb.DriverConfig( - endpoint, database, credentials=ydb.construct_credentials_from_environ(), - root_certificates=ydb.load_ydb_root_certificate(), - ) - with ydb.Driver(driver_config) as driver: - try: - driver.wait(timeout=5) - except TimeoutError: - print("Connect failed to YDB") - print("Last reported errors by discovery:") - print(driver.discovery_debug_details()) - exit(1) -``` - -App code snippet for creating a session: - -```python -session = driver.table_client.session().create() -``` - -{% include [create_table.md](steps/02_create_table.md) %} - -To create tables, use the `session.create_table()` method: - -```python -def create_tables(session, path): - session.create_table( - os.path.join(path, 'series'), - ydb.TableDescription() - .with_column(ydb.Column('series_id', ydb.OptionalType(ydb.PrimitiveType.Uint64))) - .with_column(ydb.Column('title', ydb.OptionalType(ydb.PrimitiveType.Utf8))) - .with_column(ydb.Column('series_info', ydb.OptionalType(ydb.PrimitiveType.Utf8))) - .with_column(ydb.Column('release_date', ydb.OptionalType(ydb.PrimitiveType.Uint64))) - .with_primary_key('series_id') - ) -``` - -You can use the `session.describe_table()` method to output information about the table structure and make sure that it was properly created: - -```python -def describe_table(session, path, name): - result = session.describe_table(os.path.join(path, name)) - print("\n> describe table: series") - for column in result.columns: - print("column, name:", column.name, ",", str(column.type.item).strip()) -``` - -The given code snippet outputs the following text to the console at startup: - -```bash -> describe table: series -('column, name:', 'series_id', ',', 'type_id: UINT64') -('column, name:', 'title', ',', 'type_id: UTF8') -('column, name:', 'series_info', ',', 'type_id: UTF8') -('column, name:', 'release_date', ',', 'type_id: UINT64') -``` - -{% include [pragmatablepathprefix.md](auxilary/pragmatablepathprefix.md) %} - -{% include [create_table.md](steps/03_query_processing.md) %} - -To execute YQL queries, use the `session.transaction().execute()` method. -The SDK lets you explicitly control the execution of transactions and configure the transaction execution mode using the `TxControl` class. - -In the code snippet below, the transaction is executed using the `transaction().execute()` method. The transaction execution mode set is `ydb.SerializableReadWrite()`. When all the queries in the transaction are completed, the transaction is automatically committed by explicitly setting the flag: `commit_tx=True`. The query body is described using the YQL syntax and is passed to the `execute` method as a parameter. - -```python -def select_simple(session, path): - result_sets = session.transaction(ydb.SerializableReadWrite()).execute( - """ - PRAGMA TablePathPrefix("{}"); - $format = DateTime::Format("%Y-%m-%d"); - SELECT - series_id, - title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date - FROM series - WHERE series_id = 1; - """.format(path), - commit_tx=True, - ) - print("\n> select_simple_transaction:") - for row in result_sets[0].rows: - print("series, id: ", row.series_id, ", title: ", row.title, ", release date: ", row.release_date) - - return result_sets[0] -``` - -{% include [results_processing.md](steps/04_results_processing.md) %} - -When the query is executed, `result_set` is returned: - -```python -print("\n> select_simple_transaction:") -for row in result_sets[0].rows: - print("series, id: ", row.series_id, ", title: ", row.title, ", release date: ", row.release_date) -``` - -The given code snippet outputs the following text to the console at startup: - -```bash -> SelectSimple: -series, Id: 1, title: IT Crowd, Release date: 2006-02-03 -``` - -{% include [write_queries.md](steps/05_write_queries.md) %} - -Code snippet for inserting and updating data: - -```python -def upsert_simple(session, path): - session.transaction().execute( - """ - PRAGMA TablePathPrefix("{}"); - UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES - (2, 6, 1, "TBD"); - """.format(path), - commit_tx=True, - ) -``` - -{% include [param_prep_queries.md](steps/07_param_prep_queries.md) %} - -```python -def select_prepared(session, path, series_id, season_id, episode_id): - query = """ - PRAGMA TablePathPrefix("{}"); - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - $format = DateTime::Format("%Y-%m-%d"); - SELECT - title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date - FROM episodes - WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format(path) - - prepared_query = session.prepare(query) - result_sets = session.transaction(ydb.SerializableReadWrite()).execute( - prepared_query, { - '$seriesId': series_id, - '$seasonId': season_id, - '$episodeId': episode_id, - }, - commit_tx=True - ) - print("\n> select_prepared_transaction:") - for row in result_sets[0].rows: - print("episode title:", row.title, ", air date:", row.air_date) - - return result_sets[0] -``` - -The given code snippet outputs the following text to the console at startup: - -```bash -> select_prepared_transaction: -('episode title:', u'To Build a Better Beta', ', air date:', '2016-06-05') -``` - -{% include [scan_query.md](steps/08_scan_query.md) %} - -```python -def executeScanQuery(driver): - query = ydb.ScanQuery(""" - SELECT series_id, season_id, COUNT(*) AS episodes_count - FROM episodes - GROUP BY series_id, season_id - ORDER BY series_id, season_id - """, {}) - - it = driver.table_client.scan_query(query) - - while True: - try: - result = next(it) - print result.result_set.rows - except StopIteration: - break -``` - -{% include [transaction_control.md](steps/10_transaction_control.md) %} - -Code snippet for `transaction().begin()` and `tx.Commit()` calls: - -```python -def explicit_tcl(session, path, series_id, season_id, episode_id): - query = """ - PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - - UPDATE episodes - SET air_date = CAST(CurrentUtcDate() AS Uint64) - WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format(path) - prepared_query = session.prepare(query) - - tx = session.transaction(ydb.SerializableReadWrite()).begin() - - tx.execute( - prepared_query, { - '$seriesId': series_id, - '$seasonId': season_id, - '$episodeId': episode_id - } - ) - - print("\n> explicit TCL call") - - tx.commit() -``` - -{% include [error_handling.md](steps/50_error_handling.md) %} diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md index 12647fb0df..1becb52a68 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md @@ -4,13 +4,13 @@ This section describes the code of same-type test apps implemented using {{ ydb- {% if oss %} -- [C++](../example-cpp.md) +* [C++](../example-cpp.md) {% endif %} -- [C# (.NET)](../example-dotnet.md) -- [Go](../go/index.md) -- [Java](../example-java.md) -- [Node.js](../example-nodejs.md) -- [Python](../python/index.md) +* [C# (.NET)](../example-dotnet.md) +* [Go](../go/index.md) +* [Java](../example-java.md) +* [Node.js](../example-nodejs.md) +* [Python](../python/index.md) A test app performs the following steps: @@ -28,23 +28,23 @@ A test app performs the following steps: {% include [query_processing.md](steps/04_query_processing.md) %} -{% if oss %}[C++](../example-cpp.md#query-processing) | {% endif %} [C# (.NET)](../example-dotnet.md#query-processing) | [Go](../go/index.md#query-processing) | [Java](../example-java.md#query-processing) | Node.js | PHP | [Python](../python/index.md#query-processing) +{% if oss %}[C++](../example-cpp.md#query-processing) | {% endif %} [C# (.NET)](../example-dotnet.md#query-processing) | [Go](../go/index.md#query-processing) | [Java](../example-java.md#query-processing) | Node.js | PHP | [Python](../python/index.md#query-processing) {% include [param_queries.md](steps/06_param_queries.md) %} -{% if oss %}[C++](../example-cpp.md#param-queries) | {% endif %} [C# (.NET)](../example-dotnet.md#param-queries) | [Go](../go/index.md#param-queries) | [Java](../example-java.md#param-queries) | Node.js | PHP | [Python](../python/index.md#param-queries) +{% if oss %}[C++](../example-cpp.md#param-queries) | {% endif %} [C# (.NET)](../example-dotnet.md#param-queries) | [Go](../go/index.md#param-queries) | [Java](../example-java.md#param-queries) | Node.js | PHP | [Python](../python/index.md#param-queries) {% include [scan_query.md](steps/08_scan_query.md) %} -{% if oss %}C++ | {% endif %} [C# (.NET)](../example-dotnet.md#scan-query) | [Go](../go/index.md#scan-query) | [Java](../example-java.md#scan-query) | [Node.js](../example-nodejs.md#scan-query) | PHP | [Python](../python/index.md#scan-query) +{% if oss %}C++ | {% endif %} [C# (.NET)](../example-dotnet.md#scan-query) | [Go](../go/index.md#scan-query) | [Java](../example-java.md#scan-query) | [Node.js](../example-nodejs.md#scan-query) | PHP | [Python](../python/index.md#scan-query) {% include [multistep_transactions.md](steps/09_multistep_transactions.md) %} -{% if oss %}[C++](../example-cpp.md#multistep-transactions) | {% endif %} C# (.NET) | Go | [Java](../example-java.md#multistep-transactions) | Node.js | PHP | Python +{% if oss %}[C++](../example-cpp.md#multistep-transactions) | {% endif %} C# (.NET) | Go | [Java](../example-java.md#multistep-transactions) | Node.js | PHP | Python {% include [transaction_control.md](steps/10_transaction_control.md) %} -{% if oss %}[C++](../example-cpp.md#tcl) | {% endif %} C# (.NET) | Go | [Java](../example-java.md#tcl) | Node.js | PHP | [Python](../python/index.md#tcl) +{% if oss %}[C++](../example-cpp.md#tcl) | {% endif %} C# (.NET) | Go | [Java](../example-java.md#tcl) | Node.js | PHP | [Python](../python/index.md#tcl) {% include [error_handling.md](steps/50_error_handling.md) %} diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/pars_from_profile_hint.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/pars_from_profile_hint.md index b31f1357c8..97e4841525 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/pars_from_profile_hint.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/pars_from_profile_hint.md @@ -7,4 +7,3 @@ If you previously reviewed the articles of the "Getting started" section, you mu ``` {% endnote %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md index b49aab5618..a4441fa42d 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md @@ -1,8 +1,7 @@ ## Initializing a database connection {#init} -To interact with {{ ydb-short-name }}, create an instance of the driver, client, and session: +To interact with {{ ydb-short-name }}, you have to create an instance of the driver, client, and session: * The {{ ydb-short-name }} driver lets the app and {{ ydb-short-name }} interact at the transport layer. The driver must exist throughout the {{ ydb-short-name }} access lifecycle and be initialized before creating a client or session. * The {{ ydb-short-name }} client runs on top of the {{ ydb-short-name }} driver and enables the handling of entities and transactions. * The {{ ydb-short-name }} session contains information about executed transactions and prepared queries, and is part of the {{ ydb-short-name }} client context. - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md index e8771af94d..b269efdf16 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md @@ -2,9 +2,8 @@ Creating tables to be used in operations on a test app. This step results in the creation of DB tables of the series directory data model: -- `Series` -- `Seasons` -- `Episodes` +* `Series` +* `Seasons` +* `Episodes` Once the tables are created, the method for getting information about data schema objects is called and the result of its execution is output. - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md deleted file mode 100644 index 93886f1ac7..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md +++ /dev/null @@ -1,2 +0,0 @@ -## Processing queries and transactions {#query-processing} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md deleted file mode 100644 index a6b3c132ad..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md +++ /dev/null @@ -1,2 +0,0 @@ -### Processing execution results {#results-processing} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md deleted file mode 100644 index c01f55b97b..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md +++ /dev/null @@ -1,2 +0,0 @@ -## Queries to insert or update data {#write-queries} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md index cd6bde38a7..8f6ec8928c 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md @@ -1,4 +1,4 @@ ## Parameterized queries {#param-queries} -Querying data using parameters. This query execution option is preferable, as it allows the server to reuse the query execution plan for subsequent calls and protects against vulnerabilities like [SQL Injection](https://en.wikipedia.org/wiki/SQL_injection). +Querying data using parameters. This query execution option is preferable as it allows the server to reuse the query execution plan for subsequent calls and also protects from such vulnerabilities as [SQL Injection]{% if lang == "en" %}(https://en.wikipedia.org/wiki/SQL_injection){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Embedding_SQL code){% endif %}. diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md index 4b2a1abeb5..fc04fcd5e8 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md @@ -3,4 +3,3 @@ Parameterized prepared queries are saved as templates where specially formatted names are replaced by relevant parameter values each time you execute the query. Use parameterized queries to improve performance by reducing how often queries that only differ in parameter values are compiled and recompiled. The prepared query is stored in the session context. Code snippet for parameterized prepared queries: - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md index 4a2e6e219b..e32fd7b29a 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md @@ -1,4 +1,3 @@ ## Scan queries {#scan-query} Making a [scan query](../../../../../concepts/scan_query.md) that results in a data stream. Streaming lets you read an unlimited number of rows and amount of data. - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md index 41c92f22a4..eb6c9370c3 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md @@ -1,4 +1,3 @@ ## Handling errors {#error-handling} For more information about error handling, see [Error handling in the API](../../../error_handling.md). - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v1.md b/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v1.md index fb4181771b..67db33e50f 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v1.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v1.md @@ -229,4 +229,3 @@ return nil ``` {% include [error_handling.md](../_includes/steps/50_error_handling.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v2.md b/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v2.md index 20dad36b27..2a96fa2ff4 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v2.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/archive/example-go-v2.md @@ -89,7 +89,7 @@ func describeTable(ctx context.Context, sp *table.SessionPool, path string) (err {% include [query_processing.md](../_includes/steps/04_query_processing.md) %} To execute YQL queries, use the `Session.Execute()` method. -The SDK lets you explicitly control the execution of transactions and configure the transaction execution mode using the ```TxControl``` class. +The SDK lets you explicitly control the execution of transactions and configure the transaction execution mode using the `TxControl` class. ```go var ( @@ -211,4 +211,3 @@ Query results: ``` {% include [error_handling.md](../_includes/steps/50_error_handling.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/example-go.md b/ydb/docs/en/core/reference/ydb-sdk/example/example-go.md deleted file mode 100644 index 3ece27c3e8..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/example/example-go.md +++ /dev/null @@ -1,2 +0,0 @@ -{% include [example-go.md](_includes/example-go.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/example-python.md b/ydb/docs/en/core/reference/ydb-sdk/example/example-python.md deleted file mode 100644 index 4d48b84332..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/example/example-python.md +++ /dev/null @@ -1,2 +0,0 @@ -{% include [example-python.md](_includes/example-python.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_custom.md b/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_custom.md index 77f7845920..380059c389 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_custom.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_custom.md @@ -9,12 +9,12 @@ Run the command as follows: go run ./basic -ydb="<endpoint>?database=<database>" ) ``` -, where +Where: -- `<endpoint>` is the [Endpoint](../../../../../concepts/connect.md#endpoint). -- `<database>` is the [DB location](../../../../../concepts/connect.md#database). -- `<auth_mode_var`> is the [Environment variable](../../../auth.md#env) that determines the authentication mode. -- `<auth_mode_value>` is the authentication parameter value for the selected mode. +* `<endpoint>` is the [Endpoint](../../../../../concepts/connect.md#endpoint) +* `<database>` is the [DB location](../../../../../concepts/connect.md#database). +* `<auth_mode_var`> is the [Environment variable](../../../auth.md#env) that determines the authentication mode. +* `<auth_mode_value>` is the authentication parameter value for the selected mode. For example: @@ -24,4 +24,3 @@ go run ./basic -ydb="grpcs://ydb.example.com:2135?database=/somepath/somelocatio ``` {% include [../../_includes/pars_from_profile_hint.md](../../_includes/pars_from_profile_hint.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_docker.md b/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_docker.md index 26cb88a015..2d874b0c2d 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_docker.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_docker.md @@ -1,7 +1,6 @@ -To connect to a locally deployed YDB database according to the [Docker](../../../../../getting_started/ydb_docker.md) use case, run the following command in the default configuration: +To connect to a locally deployed YDB database according to the [Docker](../../../../../getting_started/self_hosted/ydb_docker.md) use case, run the following command in the default configuration: ```bash ( export YDB_ANONYMOUS_CREDENTIALS=1 && cd ydb-go-examples && \ go run ./basic -ydb="grpc://localhost:2136?database=/local" ) ``` - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_options.md b/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_options.md index dbb8af9b43..2a65ab4eca 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_options.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/go/_includes/run_options.md @@ -9,4 +9,3 @@ {% include [run_custom.md](run_custom.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md b/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md index 0c4ed38f41..9ab493f46a 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md @@ -18,7 +18,7 @@ Next, from the same working directory, run the command to start the test app. Th {% include [init.md](../_includes/steps/01_init.md) %} -To work with YDB in `Go`, import the `ydb-go-sdk` driver package: +To work with `YDB` in `Go`, import the `ydb-go-sdk` driver package: ```go import ( @@ -65,7 +65,7 @@ defer func() { } ``` -The `db` object is an input point for working with YDB services. +The `db` object is an input point for working with `YDB` services. To work with the table service, use the `db.Table()` client. The client of the table service provides an `API` for making queries to tables. The most popular method is `db.Table().Do(ctx, op)`. It implements background session creation and repeated attempts to perform the `op` user operation where the created session is passed to the user-defined code. @@ -264,8 +264,7 @@ if err != nil { Sample code of a test app that uses archived of versions the Go SDK: -- [github.com/yandex-cloud/ydb-go-sdk](https://github.com/yandex-cloud/ydb-go-sdk/tree/v1.5.1) is available at this [link](../archive/example-go-v1.md), -- [github.com/yandex-cloud/ydb-go-sdk/v2](https://github.com/yandex-cloud/ydb-go-sdk/tree/v2.11.2) is available at this [link](../archive/example-go-v2.md). +* [github.com/yandex-cloud/ydb-go-sdk](https://github.com/yandex-cloud/ydb-go-sdk/tree/v1.5.1) is available at this [link](../archive/example-go-v1.md), +* [github.com/yandex-cloud/ydb-go-sdk/v2](https://github.com/yandex-cloud/ydb-go-sdk/tree/v2.11.2) is available at this [link](../archive/example-go-v2.md). {% endnote %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_custom.md b/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_custom.md index 7e86eb7c62..df1f74b59c 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_custom.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_custom.md @@ -9,12 +9,12 @@ Run the command as follows: python3 ydb-python-sdk/examples/basic_example_v1/ -e <endpoint> -d <database> ``` -, where +Where: -- `<endpoint>` is the [Endpoint](../../../../../concepts/connect.md#endpoint). -- `<database>` is the [DB location](../../../../../concepts/connect.md#database). -- `<auth_mode_var`> is the [Environment variable](../../../auth.md#env) that determines the authentication mode. -- `<auth_mode_value>` is the authentication parameter value for the selected mode. +* `<endpoint>` is the [Endpoint](../../../../../concepts/connect.md#endpoint) +* `<database>` is the [DB location](../../../../../concepts/connect.md#database). +* `<auth_mode_var`> is the [Environment variable](../../../auth.md#env) that determines the authentication mode. +* `<auth_mode_value>` is the authentication parameter value for the selected mode. For example: @@ -24,4 +24,3 @@ python3 ydb-python-sdk/examples/basic_example_v1/ -e grpcs://ydb.example.com:213 ``` {% include [../../_includes/pars_from_profile_hint.md](../../_includes/pars_from_profile_hint.md) %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_docker.md b/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_docker.md index 104391121d..1ae4ff757b 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_docker.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_docker.md @@ -1,7 +1,6 @@ -To connect to a locally deployed YDB database according to the [Docker](../../../../../getting_started/ydb_docker.md) use case, run the following command in the default configuration: +To connect to a locally deployed YDB database according to the [Docker](../../../../../getting_started/self_hosted/ydb_docker.md) use case, run the following command in the default configuration: ```bash YDB_ANONYMOUS_CREDENTIALS=1 \ python3 ydb-python-sdk/examples/basic_example_v1/ -e grpc://localhost:2136 -d /local ``` - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_options.md b/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_options.md index dbb8af9b43..2a65ab4eca 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_options.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/python/_includes/run_options.md @@ -9,4 +9,3 @@ {% include [run_custom.md](run_custom.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/python/index.md b/ydb/docs/en/core/reference/ydb-sdk/example/python/index.md index 071112ecac..a0d2f7135e 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/python/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/python/index.md @@ -8,7 +8,7 @@ The start scenario given below uses [git](https://git-scm.com/downloads) and [Py Create a working directory and use it to run from the command line the command to clone the GitHub repository and install the necessary Python packages: -```bash +``` bash git clone https://github.com/ydb-platform/ydb-python-sdk.git python3 -m pip install iso8601 ``` @@ -79,7 +79,6 @@ The given code snippet outputs the following text to the console at startup: ('column, name:', 'series_info', ',', 'type_id: UTF8') ('column, name:', 'release_date', ',', 'type_id: UINT64') ``` - {% include [steps/03_write_queries.md](../_includes/steps/03_write_queries.md) %} Code snippet for inserting and updating data: @@ -134,6 +133,7 @@ When the query is executed, `result_set` is returned whose iteration outputs the series, Id: 1, title: IT Crowd, Release date: 2006-02-03 ``` + {% include [param_prep_queries.md](../_includes/steps/07_param_prep_queries.md) %} ```python @@ -227,4 +227,4 @@ def explicit_tcl(session, path, series_id, season_id, episode_id): print("\n> explicit TCL call") tx.commit() -``` +```
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/addition.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/addition.md index 22977978e8..225e85e098 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/addition.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/addition.md @@ -3,4 +3,3 @@ The article is being updated. {% endnote %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/session_pool_limit.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/session_pool_limit.md deleted file mode 100644 index 5fd4fd8b85..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/session_pool_limit.md +++ /dev/null @@ -1,20 +0,0 @@ -# Setting the session pool size - -{% include [work in progress message](addition.md) %} - -The client's session pool size affects resource consumption (RAM, CPU) on the server side of YDB. -Simple math: if `1000` clients of the same DB have `1000` sessions each, `100000` actors (workers, session performers) are created on the server side. If you don't limit the number of sessions on the client, this may result in a slow cluster that is close to a failure. -By default, the `YDB SDK` limits the number of sessions to `50`. -A good recommendation is to set the limit on the number of client sessions to the minimum required for the normal operation of the client app. Keep in mind that sessions are single-threaded both on the server and client side. So if the application needs to make `1000` simultaneous (`inflight`) requests to YDB for its estimated load, the limit should be set to `1000` sessions. -Here it's necessary to distinguish between the estimated `RPS` (requests per second) and `inflight`. In the first case, this is the total number of requests to YDB completed within `1` second. For example, if `RPS`=`10000` and the average `latency` is `100`ms, it's sufficient to set the session limit to `1000`. This means that each session will perform an average of `10` consecutive requests for the estimated second. - -Below are examples of the code for setting the session pool limit in different `YDB SDKs`. - -{% list tabs %} - -- Go - - {% include [go.md](session_pool_limit/go.md) %} - -{% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/session_pool_limit/go.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/session_pool_limit/go.md deleted file mode 100644 index ce1e15b6f3..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/session_pool_limit/go.md +++ /dev/null @@ -1,23 +0,0 @@ -```go -package main - -import ( - "context" - - "github.com/ydb-platform/ydb-go-sdk/v3" -) - -func main() { - db, err := ydb.New( - ctx, - ... - ydb.WithSessionPoolSizeLimit(500), - ) - if err != nil { - panic(err) - } - defer func() { - _ = db.Close(ctx) - }() -} -``` diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/wip.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/wip.md index 43c59e5f93..a5f002ef52 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/wip.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/_includes/wip.md @@ -1,6 +1,6 @@ {% note info %} -The feature is not implemented or the documentation is being developed. +The feature is not implemented or the documentation is being developed {% endnote %} diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/access_token.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/access_token.md index e71825b7da..c27f64e63f 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/access_token.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/access_token.md @@ -11,4 +11,3 @@ Below are examples of the code for authentication using a token in different {{ {% include [go.md](access_token/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/anonymous.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/anonymous.md index 5e025a6733..463a17a206 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/anonymous.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/anonymous.md @@ -11,4 +11,3 @@ Below are examples of the code for anonymous authentication in different {{ ydb- {% include [go.md](anonymous/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/env.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/env.md index e643f8857c..4d20408aa2 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/env.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/env.md @@ -20,4 +20,3 @@ Below are examples of the code for authentication using environment variables in {% include [go.md](env/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/index.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/index.md index 6b2b0ace42..e78634eaf4 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/index.md @@ -2,7 +2,7 @@ {% include [work in progress message](../../_includes/addition.md) %} -{{ ydb-short-name }} supports multiple authentication methods when connecting to the server side. Each of them is usually specific to a particular environment pair: where the client application is located (in the trusted {{ ydb-short-name }} zone or outside it) and the {{ ydb-short-name }} server side (a Docker container, Yandex.Cloud, data cloud, or deployment on a separate cluster). +{{ ydb-short-name }} supports multiple authentication methods when connecting to the server side. Each of them is usually specific to a particular environment pair: where the client application is located (in the trusted {{ ydb-short-name }} zone or outside it) and the {{ ydb-short-name }} server side (a Docker container, Yandex.Cloud, data cloud, or deployment on a separate cluster). This section contains code recipes with authentication settings in different {{ ydb-short-name }} SDKs. For a general description of the SDK authentication principles, see the [Authentication in an SDK](../../../auth.md) article. diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/metadata.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/metadata.md index 9241d3db47..7a38e58957 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/metadata.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/metadata.md @@ -11,4 +11,3 @@ Below are examples of the code for authentication using environment variables in {% include [go.md](metadata/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/service_account.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/service_account.md index 1ffe2f6ab5..41876c2df8 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/service_account.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/service_account.md @@ -11,4 +11,3 @@ Below are examples of the code for authentication using a service account file i {% include [go.md](service_account/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/static.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/static.md index 5d9a6a938d..a0914b39fd 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/static.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/auth/_includes/static.md @@ -7,4 +7,3 @@ Below are examples of the code for authentication based on a username and token {% list tabs %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/index.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/index.md index 9dc2b596c2..1c8c8b996e 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/index.md @@ -5,5 +5,4 @@ {{ ydb-short-name }} uses client load balancing because it is more efficient when a lot of traffic from multiple client applications comes to a database. In most cases, it just works in the {{ ydb-short-name }} SDK. However, sometimes specific settings for client load balancing are required, for example, to reduce server hops and request time or to distribute the load across availability zones. -This section contains code recipes with client load balancing settings in different {{ ydb-short-name }} SDKs. - +This section contains code recipes with client load balancing settings in different {{ ydb-short-name }} SDKs.
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_local.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_local.md index 9a50784323..7f0c23b1bc 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_local.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_local.md @@ -8,7 +8,7 @@ Below are examples of the code for setting the "prefer the nearest data center" - Go + {% include [go.md](prefer_local/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_location.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_location.md index b93efe00d8..706e357c63 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_location.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/prefer_location.md @@ -10,5 +10,4 @@ Below are examples of the code for setting the "prefer the availability zone" ba {% include [go.md](prefer_location/go.md) %} -{% endlist %} - +{% endlist %}
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/random_choice.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/random_choice.md index a42b83814f..edd7e63554 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/random_choice.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/balancing/_includes/random_choice.md @@ -12,5 +12,4 @@ Below are examples of the code for forced setting of the "random choice" balanci {% include [go.md](random_choice/go.md) %} -{% endlist %} - +{% endlist %}
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/index.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/index.md index 5b91066120..335d3e1e5c 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/index.md @@ -4,5 +4,4 @@ When troubleshooting issues with {{ ydb-short-name }}, diagnostics tools such as logging, metrics, OpenTracing/Jaeger tracing are helpful. We strongly recommend that you enable them in advance before any problems occur. This will help see changes in the overall picture before, during, and after an issue when troubleshooting it. This greatly speeds up our investigation into incidents and lets us provide assistance much faster. -This section contains code recipes for enabling diagnostics tools in different {{ ydb-short-name }} SDKs - +This section contains code recipes for enabling diagnostics tools in different {{ ydb-short-name }} SDKs. diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/jaeger.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/jaeger.md index 45e762184e..82be14e6a6 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/jaeger.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/jaeger.md @@ -10,5 +10,4 @@ Below are examples of the code enabling Jaeger tracing in different {{ ydb-short {% include [go.md](jaeger/go.md) %} -{% endlist %} - +{% endlist %}
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs.md index e5311ad598..b8227164a7 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs.md @@ -2,7 +2,7 @@ {% include [work in progress message](../../_includes/addition.md) %} -Below are examples of the code that enables logging in different {{ ydb-short-name }} SDKs. +Below are examples of code that enables logging in different {{ ydb-short-name }} SDKs. {% list tabs %} @@ -11,4 +11,3 @@ Below are examples of the code that enables logging in different {{ ydb-short-na {% include [go.md](logs/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs/go.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs/go.md index 22fad3b9af..23fbb07e64 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs/go.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/logs/go.md @@ -2,7 +2,8 @@ There are several ways to enable logs in an application that uses `ydb-go-sdk`: * Set the environment variable `YDB_LOG_SEVERITY_LEVEL=info` (possible values: `trace`, `debug`, `info`, `warn`, `error`, `fatal`, and `quiet`, defaults to `quiet`). This environment variable enables the built-in `ydb-go-sdk` logger (synchronous, non-block) with output to the standard output stream. -* {% cut "Connect a outside logger `go.uber.org/zap`" %} +* {% cut "Connect a side logger `go.uber.org/zap`" %} + ```go package main @@ -38,7 +39,7 @@ This environment variable enables the built-in `ydb-go-sdk` logger (synchronous, ``` {% endcut %} -* {% cut "Connect a outside logger `github.com/rs/zerolog`" %} +* {% cut "Connect a side logger `github.com/rs/zerolog`" %} ```go package main @@ -76,7 +77,7 @@ This environment variable enables the built-in `ydb-go-sdk` logger (synchronous, ``` {% endcut %} -* {% cut "Enable your own logger implementation `github.com/ydb-platform/ydb-go-sdk/v3/log.Logger`" %} +* {% cut "Connect own logger implementation `github.com/ydb-platform/ydb-go-sdk/v3/log.Logger`" %} ```go package main @@ -115,5 +116,4 @@ This environment variable enables the built-in `ydb-go-sdk` logger (synchronous, {% include [overlay](go_appendix.md) %} -* Implement your own logging package based on the `github.com/ydb-platform/ydb-go-sdk/v3/trace` packet. - +* Implement your own logging package based on the `github.com/ydb-platform/ydb-go-sdk/v3/trace` tracing package.
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/prometheus.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/prometheus.md index 83f44762e0..d32a1bb00a 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/prometheus.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/debug/_includes/prometheus.md @@ -10,5 +10,4 @@ Below are examples of the code for enabling metrics in Prometheus in different { {% include [go.md](prometheus/go.md) %} -{% endlist %} - +{% endlist %}
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/_includes/go.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/_includes/go.md index d8f8a19ec9..0b51dc067f 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/_includes/go.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/_includes/go.md @@ -1,14 +1,14 @@ In the {{ ydb-short-name }} Go SDK, correct error handling is implemented by several programming interfaces: * The basic logic of error handling is implemented by the helper `retry.Retry` function -The details of the execution of repeated requests are hidden as much as possible. -The user can influence the logic of the function `retry.Retry` using two methods: - - Via the context (where you can set the deadline and cancel). - - Via the operation's idempotency flag `retry.WithIdempotent()`. By default, the operation is considered non-idempotent. + The details of the execution of repeated requests are hidden as much as possible. + The user can influence the logic of the function `retry.Retry` using two methods: + * Via the context (where you can set the deadline and cancel) + * Via the operation's idempotency flag `retry.WithIdempotent()`. By default, the operation is considered non-idempotent. The user passes a custom function to `retry.Retry` that returns an error by its signature. -If the custom function returns `nil`, then repeat queries stop. -If the custom function returns an error, the {{ ydb-short-name }} Go SDK tries to identify this error and executes retries depending on it. + If the custom function returns `nil`, then repeat queries stop. + If the custom function returns an error, the {{ ydb-short-name }} Go SDK tries to identify this error and executes retries depending on it. {% cut "Example code using the function `retry.Retry`:" %} @@ -59,8 +59,7 @@ If the custom function returns an error, the {{ ydb-short-name }} Go SDK tries t {% endcut %} * The `db.Table()` table query service immediately provides the `table.Client` programming interface that uses the `retry` package and tracks the lifetime of the {{ ydb-short-name }} sessions. -Two public functions are available to the user: `db.Table().Do(ctx, op)` (where `op` provides a session) and `db.Table().DoTx(ctx, op)` (where `op` provides a transaction). -As in the previous case, the user can affect the logic of repeat queries using the context and the idempotence flag, while the {{ ydb-short-name }} Go SDK interprets errors returned by `op`. + Two public functions are available to the user: `db.Table().Do(ctx, op)` (where `op` provides a session) and `db.Table().DoTx(ctx, op)` (where `op` provides a transaction). + As in the previous case, the user can affect the logic of repeat queries using the context and the idempotence flag, while the {{ ydb-short-name }} Go SDK interprets errors returned by `op`. * Queries to other {{ ydb-short-name }} services (`db.Scripting()`, `db.Scheme()`, `db.Coordination()`, `db.Ratelimiter()`, and `db.Discovery()`) also use the `retry.Retry` function internally to make repeat queries. - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/index.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/index.md index 120aa1922c..926c59bef1 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/retry/index.md @@ -17,4 +17,3 @@ Below are code examples showing the {{ ydb-short-name }} SDK built-in tools for {% include [go.md](_includes/go.md) %} {% endlist %} - diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit.md deleted file mode 100644 index 6f3b0c252d..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit.md +++ /dev/null @@ -1,2 +0,0 @@ - -{% include [index.md](_includes/session_pool_limit.md) %} diff --git a/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit/index.md b/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit/index.md index 2cc5bc47a9..b9710de145 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/recipes/session_pool_limit/index.md @@ -4,9 +4,9 @@ The client's session pool size affects resource consumption (RAM, CPU) on the server side of {{ ydb-short-name }}. Simple math: if `1000` clients of the same DB have `1000` sessions each, `100000` actors (workers, session performers) are created on the server side. If you don't limit the number of sessions on the client, this may result in a slow cluster that is close to a failure. -By default, the {{ ydb-short-name }} SDK limits the number of sessions to `50`. +By default, the {{ ydb-short-name }} SDK limits the number of sessions to `50`. A good recommendation is to set the limit on the number of client sessions to the minimum required for the normal operation of the client app. Keep in mind that sessions are single-threaded both on the server and client side. So if the application needs to make `1000` simultaneous (`inflight`) requests to {{ ydb-short-name }} for its estimated load, the limit should be set to `1000` sessions. -Here it's necessary to distinguish between the estimated `RPS` (requests per second) and `inflight`. In the first case, this is the total number of requests to {{ ydb-short-name }} completed within `1` second. For example, if `RPS`=`10000` and the average `latency` is `100`ms, it's sufficient to set the session limit to `1000`. This means that each session will perform an average of `10` consecutive requests for the estimated second. +Here it's necessary to distinguish between the estimated `RPS` (requests per second) and `inflight`. In the first case, this is the total number of requests to {{ ydb-short-name }} completed within `1` second. For example, if `RPS`=`10000` and the average `latency` is `100`ms, it's sufficient to set the session limit to `1000`. This means that each session will perform an average of `10` consecutive requests for the estimated second. Below are examples of the code for setting the session pool limit in different {{ ydb-short-name }} SDKs. @@ -16,5 +16,4 @@ Below are examples of the code for setting the session pool limit in different { {% include [go.md](_includes/go.md) %} -{% endlist %} - +{% endlist %}
\ No newline at end of file diff --git a/ydb/docs/en/core/reference/ydb-sdk/toc_i.yaml b/ydb/docs/en/core/reference/ydb-sdk/toc_i.yaml index 7a2fdca571..b81d8bfccf 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/toc_i.yaml +++ b/ydb/docs/en/core/reference/ydb-sdk/toc_i.yaml @@ -11,4 +11,3 @@ items: href: error_handling.md - name: Code recipes include: { mode: link, path: recipes/toc_p.yaml } - diff --git a/ydb/docs/en/core/toc_i.yaml b/ydb/docs/en/core/toc_i.yaml index d66ebe3a32..22c194faa5 100644 --- a/ydb/docs/en/core/toc_i.yaml +++ b/ydb/docs/en/core/toc_i.yaml @@ -6,13 +6,14 @@ items: include: { mode: link, path: getting_started/toc_p.yaml } # Main -# - { name: Сценарии использования, include: { mode: link, path: solutions/toc_i.yaml }, when: audience == "external" } +# - { name: Solutions, include: { mode: link, path: solutions/toc_i.yaml }, when: audience == "external" } - { name: Concepts, include: { mode: link, path: concepts/toc_p.yaml } } - { name: Step-by-step instructions, include: { mode: link, path: operations/toc_p.yaml } } - { name: Recommendations, include: { mode: link, path: best_practices/toc_p.yaml } } - { name: Maintenance, include: { mode: link, path: maintenance/toc_p.yaml } } - { name: Diagnostics, include: { mode: link, path: troubleshooting/toc_p.yaml } } +- { name: Admin, include: { mode: link, path: deploy/toc_p.yaml } } # References - { name: YQL, include: { mode: link, path: yql/toc_p.yaml } } diff --git a/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md b/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md index e5ae359460..d1802e5721 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md +++ b/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md @@ -4,7 +4,7 @@ | Metric name<br/>Type, units of measurement | Description<br/>Labels | | ----- | ----- | -| `resources.storage.used_bytes`<br/>`IGAUGE`, bytes | The size of user and service data stored in distributed network storage. The service data includes the data of the primary and [secondary indexes](https://cloud.yandex.com/en/docs/ydb/oss/public/develop/concepts/secondary_indexes). | +| `resources.storage.used_bytes`<br/>`IGAUGE`, bytes | The size of user and service data stored in distributed network storage. The service data includes the data of the primary and [secondary indexes](../../concepts/secondary_indexes.md). | | `resources.storage.limit_bytes`<br/>`IGAUGE`, bytes | A limit on the size of user and service data that a database can store in distributed network storage. | ### API metrics {#api} @@ -16,9 +16,9 @@ | `api.grpc.request.inflight_count`<br/>`IGAUGE`, pieces | The number of requests that a database is simultaneously handling in a certain period of time.<br/>Labels:<br/>- _api_service_: The name of the gRPC API service, such as `table`.<br/>- _method_: The name of a gRPC API service method, such as `ExecuteDataQuery`. | | `api.grpc.request.inflight_bytes`<br/>`IGAUGE`, bytes | The size of requests that a database is simultaneously handling in a certain period of time.<br/>Labels:<br/>- _api_service_: The name of the gRPC API service, such as `table`.<br/>- _method_: The name of a gRPC API service method, such as `ExecuteDataQuery`. | | `api.grpc.response.bytes`<br/>`RATE`, bytes | The size of responses sent by the database in a certain period of time.<br/>Labels:<br/>- _api_service_: The name of the gRPC API service, such as `table`.<br/>- _method_: The name of a gRPC API service method, such as `ExecuteDataQuery`. | -| `api.grpc.response.count`<br/>`RATE`, pieces | The number of responses sent by the database in a certain period of time.<br/>Labels:<br/>- _api_service_: The name of the gRPC API service, such as `table`.<br/>- _method_: The name of a gRPC API service method, such as `ExecuteDataQuery`.<br/>- _status_: The query execution status. To learn more about statuses, see [Error handling](https://cloud.yandex.com/en/docs/ydb/oss/public/reference/ydb-sdk/error_handling). | +| `api.grpc.response.count`<br/>`RATE`, pieces | The number of responses sent by the database in a certain period of time.<br/>Labels:<br/>- _api_service_: The name of the gRPC API service, such as `table`.<br/>- _method_: The name of a gRPC API service method, such as `ExecuteDataQuery`.<br/>- _status_: The query execution status. To learn more about statuses, see [Error handling](../../reference/ydb-sdk/error_handling.md). | | `api.grpc.response.dropped_count`<br/>`RATE`, pieces | The number of responses dropped at the transport (gRPC) layer due to an error.<br/>Labels:<br/>- _api_service_: The name of the gRPC API service, such as `table`.<br/>- _method_: The name of a gRPC API service method, such as `ExecuteDataQuery`. | -| `api.grpc.response.issues`<br/>`RATE`, pieces | The number of errors of a certain type, which occurred when executing queries during a certain period of time.<br/>Labels:<br/>- _issue_type_: The type of error, the only value is `optimistic_locks_invalidation`. For more information about locks invalidation, see [Transactions and queries to {{ ydb-short-name }}](https://cloud.yandex.com/en/docs/ydb/oss/public/develop/concepts/transactions). | +| `api.grpc.response.issues`<br/>`RATE`, pieces | The number of errors of a certain type, which occurred when executing queries during a certain period of time.<br/>Labels:<br/>- _issue_type_: The type of error, the only value is `optimistic_locks_invalidation`. For more information about locks invalidation, see [Transactions and queries to {{ ydb-short-name }}](../../concepts/transactions.md). | ### Session metrics {#sessions} @@ -86,4 +86,3 @@ You can analyze a transaction's execution time using a histogram counter. The in | `table.query.compilation.cache_evictions`<br/>`RATE`, pieces | The number of queries evicted from the cache of [prepared queries](../oss/public/reference/ydb-sdk/#param-prepared-queries) in a certain period of time. | | `table.query.compilation.cache_size_bytes`<br/>`IGAUGE`, bytes | The size of the cache of [prepared queries](../oss/public/reference/ydb-sdk/#param-prepared-queries). | | `table.query.compilation.cached_query_count`<br/>`IGAUGE`, pieces | The size of the cache of [prepared queries](../oss/public/reference/ydb-sdk/#param-prepared-queries). | - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/distributed_storage.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/distributed_storage.md index d531f9364c..1eec417000 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/distributed_storage.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/distributed_storage.md @@ -100,4 +100,3 @@ Unlike other tables that show physical entities, the `ds_storage_stats` table sh | AvailableSizeToCreate | Uint64 | | Number of available bytes that will be obtained when creating all groups from AvailableGroupsToCreate. | It should be noted that AvailableGroupsToCreate shows the maximum number of groups that can be created if no other types of groups are created. So when extending a storage pool, the count of AvailableGroupsToCreate in several rows of statistics may change. - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md index df3c85f771..c36f003299 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md @@ -3,4 +3,3 @@ Examples: {% include [example_yql](partitions_example_yql.md) %} - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md index bdeab3c498..02891f4711 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md @@ -1,5 +1,4 @@ -Top 5 of most loaded partitions among all DB tables - + Top 5 of most loaded partitions among all DB tables ```sql SELECT Path, @@ -11,7 +10,6 @@ Top 5 of most loaded partitions among all DB tables ``` List of DB tables with in-flight sizes and loads - ```sql SELECT Path, @@ -22,4 +20,3 @@ Top 5 of most loaded partitions among all DB tables FROM `/cluster/path/to/database/.sys/partition_stats` GROUP BY Path ``` - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md index 447571f4e1..4edb8c845c 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md @@ -35,4 +35,3 @@ Table structure: Restrictions: * Cumulative fields (RowReads, RowUpdates, and so on) store the accumulated values since the last start of the tablet serving the partition - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md index e2fc18f715..8548a2604c 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md @@ -3,4 +3,3 @@ Examples: {% include [example_yql](query_metrics_example_yql.md) %} - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md index f98134848a..649def5eeb 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md @@ -1,4 +1,4 @@ -Top 10 queries for the last 6 hours by the total number of rows updated per minute + Top 10 queries for the last 6 hours by the total number of rows updated per minute ```sql SELECT @@ -25,4 +25,3 @@ Top 10 queries for the last 6 hours by the total number of rows updated per minu ORDER BY IntervalEnd DESC, SumReadBytes DESC LIMIT 100 ``` - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md index 69ee2da5f6..b74f360d20 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md @@ -40,4 +40,3 @@ Restrictions: * The table contains the history for the last 6 hours. * Within the interval, information is provided for no more than 256 different queries. * Statistics may be incomplete if the database is under heavy load. - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md index acb4488ba7..7c1cb50003 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md @@ -3,4 +3,3 @@ Examples: {% include [example_yql.md](tops_example_yql.md) %} - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md index 967f8bded5..796431ee9c 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md @@ -1,4 +1,4 @@ -Top queries by execution time for the last minute when queries were made + Top queries by execution time for the last minute when queries were made ```sql $last = ( @@ -27,4 +27,3 @@ Top queries by execution time for the last minute when queries were made FROM `/cluster/path/to/database/.sys/top_queries_by_read_bytes_one_minute` WHERE Rank = 1 ``` - diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md index 2d2249a66c..cdff4f948d 100644 --- a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md +++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md @@ -50,4 +50,3 @@ Restrictions: * Query text limit is 4 KB. * Tables with minute intervals contain the history for the last 6 hours. * Tables with hourly intervals contain the history for the last 2 weeks. - diff --git a/ydb/docs/en/core/troubleshooting/monitoring.md b/ydb/docs/en/core/troubleshooting/monitoring.md index 598b0fed12..a181d1d03e 100644 --- a/ydb/docs/en/core/troubleshooting/monitoring.md +++ b/ydb/docs/en/core/troubleshooting/monitoring.md @@ -1,7 +1,7 @@ --- editable: false --- + # Metric reference {% include notitle [ydb_monitoring_sensors.md](_includes/monitoring_sensors.md) %} - diff --git a/ydb/docs/en/core/yql/reference/_includes/index/intro.md b/ydb/docs/en/core/yql/reference/_includes/index/intro.md index a1cd5dcef1..72fef596cf 100644 --- a/ydb/docs/en/core/yql/reference/_includes/index/intro.md +++ b/ydb/docs/en/core/yql/reference/_includes/index/intro.md @@ -1,4 +1,4 @@ -# YQL - Overview +# YQL overview *YQL* (YDB Query Language) is a universal declarative query language for YDB, a dialect of SQL. YQL has been natively designed for large distributed databases, and therefore has a number of differences from the SQL standard. @@ -6,16 +6,16 @@ YDB tools support interfaces for sending YQL queries and receiving their executi {% include [yql/ui_prompt.md](yql/ui_prompt.md) %} -- [YDB CLI](../../../../reference/ydb-cli/index.md) -- [YDB SDK](../../../../reference/ydb-sdk/index.md) +* [YDB CLI](../../../../reference/ydb-cli/index.md). +* [YDB SDK](../../../../reference/ydb-sdk/index.md). This documentation section contains the YQL reference that includes the sections: -- [Data types](../../types/index.md) with a description of data types used in YQL -- [Syntax](../../syntax/index.md) with a full list of YQL commands -- [Built-in functions](../../builtins/index.md) with a description of the available built-in functions +* [Data types](../../types/index.md) with a description of data types used in YQL. +* [Syntax](../../syntax/index.md) with a full list of YQL commands. +* [Built-in functions](../../builtins/index.md) with a description of the available built-in functions. You can also take a tutorial to get familiar with the basic YQL commands, in the section -- [YQL tutorial](../../../tutorial/index.md) +* [YQL tutorial](../../../tutorial/index.md) diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md index 467901871f..688e7712eb 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md @@ -6,9 +6,9 @@ SELECT CAST("xyz" AS Uint64) IS NULL, -- true, because it failed CAST(-1 AS Uint16) IS NULL, -- true, a negative integer cast to an unsigned integer CAST([-1, 0, 1] AS List<Uint8?>), -- [null, 0, 1] - --The item type is optional: the failed item is cast to null. + --The element type is optional: the failed element is cast to null. CAST(["3.14", "bad", "42"] AS List<Float>), -- [3.14, 42] - --The item type is not optional: the failed item has been deleted. + --The element type is not optional: the failed element has been deleted. CAST(255 AS Uint8), -- 255 CAST(256 AS Uint8) IS NULL -- true, out of range diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md index 74d3ef437c..0f66ba39a2 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md @@ -10,7 +10,7 @@ To return a list of multiple values from one line, *DO NOT* use the `AGGREGATE_L For example, you can combine it with `DISTINCT` and the function [String::JoinFromList](../../../udf/list/string.md) (it's an equivalent of `','.join(list)` in Python) to output to a string all the values found in the column after [GROUP BY](../../../syntax/group_by.md). -**Examples** +**Examples:** ```yql SELECT @@ -33,7 +33,7 @@ These functions also have a short notation: `AGG_LIST` and `AGG_LIST_DISTINCT`. {% note alert %} -Execution is **NOT** lazy, so when you use it, be sure that the list has a reasonable size (about a thousand items or less). To stay on the safe side, better use a second optional numeric argument that limits the number of items in the list. +Execution is **NOT** lazy, so when you use it, be sure that the list has a reasonable size (about a thousand elements or less). To stay on the safe side, better use a second optional numeric argument that limits the number of items in the list. {% endnote %} diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md index 4b3dea633c..a3920fd582 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md @@ -70,7 +70,7 @@ While FastGreedyShrink is used most of the time, SlowShrink is mostly used for h When you use [aggregation factories](../../basic.md#aggregationfactory), a `Tuple` containing a value and a weight is passed as the first [AGGREGATE_BY](#aggregateby) argument. -**Examples** +**Examples:** ```yql SELECT @@ -95,7 +95,7 @@ SELECT FROM my_table; ``` -## LinearHistogram, LogarithmicHistogram, and LogHistogram {#linearhistogram} +## LinearHistogram, LogarithmicHistogram and LogHistogram {#linearhistogram} Plotting a histogram based on an explicitly specified fixed bucket scale. @@ -110,7 +110,7 @@ The format of the result is totally similar to [adaptive histograms](#histogram) If the spread of input values is uncontrollably large, we recommend that you specify the minimum and maximum values to prevent potential failures due to high memory consumption. -**Examples** +**Examples:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md index a858dc03b5..94e7dbaf96 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md @@ -19,7 +19,7 @@ If the second argument is always NULL, the aggregation result is NULL. When you use [aggregation factories](../../basic.md#aggregationfactory), a `Tuple` containing a value and a key is passed as the first [AGGREGATE_BY](#aggregateby) argument. -**Examples** +**Examples:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md index 8a80dc8ac7..9b036f94b3 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md @@ -1,8 +1,8 @@ ## TOP and BOTTOM {#top-bottom} -Return a list of the maximum/minimum values of an expression. The first argument is an expression, the second argument limits the number of items. +Return a list of the maximum/minimum values of an expression. The first argument is an expression, the second argument limits the number of elements. -**Examples** +**Examples:** ```yql SELECT @@ -27,7 +27,7 @@ Return a list of values of the first argument for the rows containing the maximu When you use [aggregation factories](../../basic.md#aggregationfactory), a `Tuple` containing a value and a key is passed as the first [AGGREGATE_BY](#aggregateby) argument. In this case, the limit for the number of items is passed by the second argument at factory creation. -**Examples** +**Examples:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md index 1c563cba95..fca0f76ecd 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md @@ -7,4 +7,3 @@ The absolute value of the number. ```yql SELECT Abs(-123); -- 123 ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md index 0302b69fc3..7c93fbcf1a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md @@ -21,12 +21,12 @@ FROM my_table; ## AggregateTransform... {#aggregatetransform} -`AggregateTransformInput()` converts an [aggregation factory](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function, to other factory, in which the specified transformation of input items is performed before starting aggregation. +`AggregateTransformInput()` converts an [aggregation factory](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function, to other factory, in which the specified transformation of input elements is performed before starting aggregation. Arguments: 1. Aggregation factory. -2. A lambda function with one argument that converts an input item. +2. A lambda function with one argument that converts an input element. **Examples:** @@ -57,7 +57,7 @@ select ListAggregate([1,2,3], $g); -- 12 ## AggregateFlatten {#aggregateflatten} -Adapts a factory for [aggregation functions](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function in a way that allows aggregation of list input items. This operation is similar to [FLATTEN LIST BY](../../../syntax/flatten.md): Each list item is aggregated. +Adapts a factory for [aggregation functions](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function in a way that allows aggregation of list input elements. This operation is similar to [FLATTEN LIST BY](../../../syntax/flatten.md): Each list element is aggregated. Arguments: diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md index 15adedeeda..e1316a5f48 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md @@ -8,7 +8,7 @@ Specifics: * `AsTuple` and `AsStruct` can be called without arguments, and also the arguments can have different types. * The field names in `AsStruct` are set using `AsStruct(field_value AS field_name)`. * Creating a list requires at least one argument if you need to output the element types. To create an empty list with the given type of elements, use the function [ListCreate](../../list.md#listcreate). You can create an empty list as an `AsList()` call without arguments. In this case, this expression will have the `EmptyList` type. -* Creating a dictionary requires at least one argument if you need to output the element types. To create an empty dictionary with the given type of elements, use the function [DictCreate](../../dict.md#dictcreate). You can create an empty dictionary as an `AsDict()` call without arguments, in this case, this expression will have the `EmptyDict` type. +* Creating a dictionary requires at least one argument if you need to output element types. To create an empty dictionary with the given type of elements, use the function [DictCreate](../../dict.md#dictcreate). You can create an empty dictionary as an `AsDict()` call without arguments, in this case, this expression will have the `EmptyDict` type. * Creating a set requires at least one argument if you need to output element types. To create an empty set with the given type of elements, use the function [SetCreate](../../dict.md#setcreate). You can create an empty set as an `AsSet()` call without arguments, in this case, this expression will have the `EmptySet` type. * `AsList` outputs the common type of elements in the list. A type error is raised in the case of incompatible types. * `AsDict` separately outputs the common types for keys and values. A type error is raised in the case of incompatible types. @@ -17,7 +17,7 @@ Specifics: * `AsDict` and `AsDictStrict` expect `Tuple` of two elements as arguments (key and value, respectively). If the keys repeat, only the value for the first key remains in the dictionary. * `AsSet` and `AsSetStrict` expect keys as arguments. -**Examples** +**Examples:** ```yql SELECT @@ -35,4 +35,3 @@ SELECT ) AS `dict`, AsSet(1, 2, 3) AS `set` ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md index 326cdb9812..981395a06c 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md @@ -1,6 +1,6 @@ ## AsTagged, Untag {#as-tagged} -Wraps the value in the [Tagged data type](../../../types/special.md) with the specified tag, preserving the physical data type. `Untag`: The reverse operation. +Wraps the value in the [Tagged data type](../../../types/special.md) with the specified tag, preserving the physical data type. `Untag`: the reverse operation. Required arguments: @@ -14,4 +14,3 @@ Examples of use cases: * Returns to the client's web interface the media files from BASE64-encoded strings{% if feature_webui %}. Tag support in the YQL Web UI [is described here](../../../interfaces/web_tagged.md){% endif %}. {% if feature_mapreduce %}* Prevent passing of invalid values at the boundaries of UDF calls.{% endif %} * Additional refinements at the level of returned columns types. - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md index 2ecf0818d4..92b33b2049 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md @@ -16,4 +16,3 @@ SELECT TestBit(1u, 0), -- true SetBit(8u, 0); -- 9 ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md index ef9c9d0bde..fc3b0d802d 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md @@ -7,7 +7,7 @@ Arguments: 1. String: `String` or `Utf8`. 2. Index: `Uint32`. -**Examples** +**Examples:** ```yql SELECT @@ -15,4 +15,3 @@ SELECT ByteAt("foo", 1), -- 111 ByteAt("foo", 9); -- NULL ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md index 30cd21dffb..6fcec7de1e 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md @@ -21,4 +21,3 @@ $callables = AsTuple( SELECT $callables.0(10), $callables.1(true); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md index 09fe299a60..6ea6cf1e5a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md @@ -6,7 +6,7 @@ Lets you pass potentially empty values to functions that can't handle them by th A short format using the low-priority `??` operator is available (lower than the Boolean operations). You can use the `NVL` alias. -**Examples** +**Examples:** ```yql SELECT COALESCE( @@ -29,4 +29,3 @@ SELECT NVL( ``` <span style="color: gray;">(all three examples above are equivalent)</span> - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md index 9ea09391d6..d80b891dc1 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md @@ -13,7 +13,7 @@ For field names in the structure literal, you can use an expression that can be For nested lists, use [AsList](#aslist), for nested dictionaries, use [AsDict](#asdict), for nested sets, use [AsSet](#asset), for nested tuples, use [AsTuple](#astuple), for nested structures, use [AsStruct](#asstruct). -**Examples** +**Examples:** ```yql $name = "computed " || "member name"; @@ -33,4 +33,3 @@ SELECT } AS `dict`, {1, 2, 3} AS `set` ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md index c7748e2ff9..afbcb053e4 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md @@ -4,7 +4,7 @@ The arguments that follow are optional and work same as [RANDOM](#random). -**Examples** +**Examples:** ```yql SELECT CurrentTzDate("Europe/Moscow"); @@ -25,7 +25,7 @@ Arguments: Result type: `TzDate`/`TzDatetime`/`TzTimestamp`, depending on the input data type. -**Examples** +**Examples:** ```yql SELECT AddTimezone(Datetime("2018-02-01T12:00:00Z"), "Europe/Moscow"); @@ -41,9 +41,8 @@ Arguments: Result type: `Date`/`Datetime`/`Timestamp`, depending on the input data type. -**Examples** +**Examples:** ```yql SELECT RemoveTimezone(TzDatetime("2018-02-01T12:00:00,Europe/Moscow")); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md index 36bb5eeb02..28744179c6 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md @@ -1,10 +1,10 @@ ## CurrentUtc... {#current-utc} -`CurrentUtcDate()`, `CurrentUtcDatetime()` and `CurrentUtcTimestamp()`: Getting the current date and/or time in UTC. The result data type is specified at the end of the function name. +`CurrentUtcDate()`, `CurrentUtcDatetime()` and `CurrentUtcTimestamp()`: getting the current date and/or time in UTC. The result data type is specified at the end of the function name. The arguments are optional and work same as [RANDOM](#random). -**Examples** +**Examples:** ```yql SELECT CurrentUtcDate(); @@ -13,4 +13,3 @@ SELECT CurrentUtcDate(); ```yql SELECT CurrentUtcTimestamp(TableRow()) FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md index 1e201128e2..e123553d29 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md @@ -22,7 +22,7 @@ For the data types `TzDate`, `TzDatetime`, `TzTimestamp`, literals are also set {% include [decimal args](../../../_includes/decimal_args.md) %} -**Examples** +**Examples:** ```yql SELECT @@ -48,4 +48,3 @@ SELECT TzTimestamp("2017-11-27T13:24:00.123456,GMT"), Uuid("f9d5cc3f-f1dc-4d9c-b97e-766e57ca4ccb"); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md index d2509df357..b7ea751287 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md @@ -16,7 +16,7 @@ Arguments: To check the conditions based on the final calculation result, it's convenient to combine Ensure with [DISCARD SELECT](../../../syntax/discard.md). -**Examples** +**Examples:** ```yql SELECT Ensure( @@ -41,4 +41,3 @@ SELECT EnsureConvertibleTo( "expected value to be numeric" ) AS value FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md index 28729c4441..7bf8841e27 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md @@ -7,7 +7,7 @@ Arguments: * A string with the field name * Enumeration type -**Example** +**Example:** ```yql $enum_type = Enum<Foo, Bar>; @@ -20,12 +20,11 @@ SELECT Arguments: -* A string with the name of an enumeration item +* A string with the name of an enumeration element -**Example** +**Example:** ```yql SELECT AsEnum("Foo"); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md index 096709330d..1ec033e5ed 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md @@ -25,4 +25,3 @@ SELECT EvaluateExpr( ) ); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md index 16e63c45e0..fdb3d4ce71 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md @@ -4,7 +4,7 @@ Both the [console](../../../interfaces/cli.md) and [web](../../../interfaces/web The `FileContent` and `FilePath` argument is a string with an alias. -**Examples** +**Examples:** ```yql SELECT "Content of " @@ -21,7 +21,7 @@ The argument is a string with a prefix among aliases. See also [PRAGMA File](../../../syntax/pragma.md#file) and [PRAGMA Folder](../../../syntax/pragma.md#folder). -**Examples** +**Examples:** ```yql PRAGMA File("foo/1.txt", "http://url/to/somewhere"); @@ -59,4 +59,3 @@ SELECT ListLength(ParseFile("String", "my_file.txt")); SELECT * FROM my_table WHERE int_column IN ParseFile("Int64", "my_file.txt")); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md index 80fecee7ab..0567e1ecf4 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md @@ -13,7 +13,7 @@ Optional arguments: Returns the first substring position found or `NULL` (meaning that the desired substring hasn't been found starting from the specified position). -**Examples** +**Examples:** ```yql SELECT FIND("abcdefg_abcdefg", "abc"); -- 0 @@ -42,7 +42,7 @@ Optional arguments: Returns the first substring position found or `NULL` (meaning that the desired substring hasn't been found starting from the specified position). -**Examples** +**Examples:** ```yql SELECT RFIND("abcdefg_abcdefg", "bcd"); -- 9 @@ -55,4 +55,3 @@ SELECT RFIND("abcdefg_abcdefg", "bcd", 8); -- 1 ```yql SELECT RFIND("abcdefg_abcdefg", "bcd", 0); -- null ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md index dcd486afac..c40179badc 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md @@ -6,7 +6,7 @@ It's a simplified alternative for [CASE WHEN ... THEN ... ELSE ... END](../../.. You may omit the `else_expression` argument. In this case, if the condition is false (`condition_expression` returned `false`), an empty value is returned with the type corresponding to `then_expression` and allowing for `NULL`. Hence, the result will have an [optional data type](../../../types/optional.md). -**Examples** +**Examples:** ```yql SELECT @@ -14,4 +14,3 @@ SELECT IF(foo > 0, foo) AS only_positive_foo FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md index d8da1aff4f..27b4b0e8c6 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md @@ -1,4 +1,3 @@ # Basic built-in functions -Below are the general-purpose functions. For specialized functions, there are separate articles: [aggregate functions](../../aggregation.md){% if feature_window_functions %}, [window functions](../../window.md){% endif %}, and functions for [lists](../../list.md), [dictionaries](../../dict.md), [structures](../../struct.md), [data types](../../types.md){% if feature_codegen %}, and [code generation](../../codegen.md){% endif %}. - +Below are the general-purpose functions. For specialized functions, see separate articles: [aggregate functions](../../aggregation.md){% if feature_window_functions %}, [window functions](../../window.md){% endif %}, and functions for [lists](../../list.md), [dictionaries](../../dict.md), [structures](../../struct.md), [data types](../../types.md){% if feature_codegen %}, and [code generation](../../codegen.md){% endif %}. diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md index 4dc75910f9..dfcd3283d5 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md @@ -2,7 +2,7 @@ Returns the length of the string in bytes. This function is also available under the `LEN` name . -**Examples** +**Examples:** ```yql SELECT LENGTH("foo"); @@ -17,4 +17,3 @@ SELECT LEN("bar"); To calculate the length of a string in Unicode characters, you can use the function [Unicode::GetLength](../../../udf/list/unicode.md).<br><br>To get the number of elements in the list, use the function [ListLength](../../list.md#listlength). {% endnote %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md index d4f4afa916..c722b800d4 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md @@ -6,9 +6,8 @@ The argument types must be mutually castable and accept `NULL`. `GREATEST` is a synonym for `MAX_OF` and `LEAST` is a synonym for `MIN_OF`. -**Examples** +**Examples:** ```yql SELECT MIN_OF(1, 2, 3); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md index 610f9bb0f2..5ab3345404 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md @@ -10,7 +10,7 @@ No arguments. If this data is missing, for example, when you run operations in the embedded mode, the functions return an empty string. -**Examples** +**Examples:** ```yql SELECT @@ -18,4 +18,3 @@ SELECT CurrentOperationSharedId(), CurrentAuthenticatedUser(); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md index dc9b16d1b3..7b99ec0803 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md @@ -9,11 +9,10 @@ Arguments: If one of the arguments is `Double`, the result is`Double`, otherwise, it's `Float`. If one of the arguments is `Optional`, then the result is `Optional`. -**Examples** +**Examples:** ```yql SELECT NANVL(double_column, 0.0) FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md index d0bc08c13e..20d0f0ea59 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md @@ -4,7 +4,7 @@ The reverse operation is [Unwrap](#unwrap). -**Examples** +**Examples:** ```yql SELECT @@ -22,7 +22,7 @@ Arguments: Reverse operation is [Just](#just). -**Examples** +**Examples:** ```yql $value = Just("value"); @@ -32,7 +32,7 @@ SELECT Unwrap($value, "Unexpected NULL for $value"); `Nothing()`: Create an empty value for the specified [Optional](../../../types/optional.md) data type. -**Examples** +**Examples:** ```yql SELECT @@ -40,4 +40,3 @@ SELECT ``` [Learn more about ParseType and other functions for data types](../../types.md). - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md index 1a852f530a..ad7e2b0335 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md @@ -4,7 +4,7 @@ `Unpickle()` is the inverse operation (deserialization), where with the first argument being the data type of the result and the second argument is the string with the result of `Pickle()` or `StablePickle()`. -Examples: +**Examples:** ```yql SELECT * @@ -16,4 +16,3 @@ WHERE Digest::MurMurHash32( $buf = Pickle(123); SELECT Unpickle(Int32, $buf); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md index 1722cc6c9c..7862433886 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md @@ -20,7 +20,7 @@ Use cases: * `SELECT RANDOM(some_column), RANDOM(some_column) FROM table;`: Different random numbers for each row of the table, but two identical numbers within the same row. * `SELECT RANDOM(some_column), RANDOM(some_column + 1) FROM table;` or `SELECT RANDOM(some_column), RANDOM(other_column) FROM table;`: Two columns, with different numbers in both. -**Examples** +**Examples:** ```yql SELECT @@ -48,4 +48,3 @@ SELECT RANDOM(column, 2) AS randAnd2 -- different from randAnd1 FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md index 5a0de652b4..003d22b7e6 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md @@ -9,7 +9,7 @@ Required arguments: The arguments can be of the `String` or `Utf8` type and can be optional. -**Examples** +**Examples:** ```yql SELECT StartsWith("abc_efg", "abc") AND EndsWith("abc_efg", "efg"); -- true @@ -26,4 +26,3 @@ SELECT StartsWith("abcd", NULL); -- null ```yql SELECT EndsWith(NULL, Utf8("")); -- null ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md index 6bb7b716ee..4756e6af17 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md @@ -1,13 +1,13 @@ ## StaticMap -Transforms a structure or tuple by applying a lambda function to each item. +Transforms a structure or tuple by applying a lambda function to each element. Arguments: * Structure or tuple. -* Lambda for processing items. +* Lambda for processing elements. -Result: a structure or tuple with the same number and naming of items as in the first argument, and with item data types determined by lambda results. +Result: a structure or tuple with the same number and naming of elements as in the first argument, and with element data types determined by lambda results. **Examples:** diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticzip.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticzip.md index 3643e19691..e271646a1a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticzip.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticzip.md @@ -13,4 +13,3 @@ $two = <|k1:3.0, k2:4|>; -- Adding two structures item-by-item SELECT StaticMap(StaticZip($one, $two), ($tuple)->($tuple.0 + $tuple.1)) AS sum; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md index 78f533ed6f..3e64b79832 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md @@ -11,10 +11,10 @@ Optional arguments: * Substring length: The number of bytes starting from the specified position (an integer, or the default `NULL` meaning "up to the end of the source string"). -Indexing starts from zero. If the specified position and length are beyond the string, returns an empty string. +Indexing starts from zero. If the specified position and length are beyond the string, it returns an empty string. If the input string is optional, the result is also optional. -**Examples** +**Examples:** ```yql SELECT SUBSTRING("abcdefg", 3, 1); -- d @@ -27,4 +27,3 @@ SELECT SUBSTRING("abcdefg", 3); -- defg ```yql SELECT SUBSTRING("abcdefg", NULL, 3); -- abc ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md index 24dbcfe745..a31593f89c 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md @@ -6,13 +6,13 @@ No arguments. Returns a string with the full path or an empty string and warning {% note info %} -The [TablePath](#tablepath), [TableName](#tablename), and [TableRecordIndex](#tablerecordindex) functions don't support temporary and anonymous tables (they return an empty string or 0 for [TableRecordIndex](#tablerecordindex)). +The functions [TablePath](#tablepath), [TableName](#tablename), and [TableRecordIndex](#tablerecordindex) don't support temporary and anonymous tables (they return an empty row or 0 for [TableRecordIndex](#tablerecordindex)). These functions are calculated when [executing](../../../syntax/select.md#selectexec) projections in `SELECT`, and by that time the current table may already be temporary. To avoid such a situation, create a subquery for calculating these functions, as shown in the second example below. {% endnote %} -**Examples** +**Examples:** ```yql SELECT TablePath() FROM CONCAT(table_a, table_b); @@ -32,7 +32,7 @@ Optional arguments: * Path to the table, `TablePath()` is used by default (see also its limitations). * Specifying the system ("yt") whose rules are used to determine the table name. You need to specify the system only if [USE](../../../syntax/select.md#use) doesn't specify the current cluster. -**Examples** +**Examples:** ```yql USE hahn; @@ -49,9 +49,8 @@ Access to the current sequence number of a row in the physical source table, **s No arguments. When used in combination with [CONCAT](../../../syntax/select.md#concat), [RANGE](../../../syntax/select.md#range) and other similar mechanisms, numbering restarts for each input table. If used in an incorrect context, it returns 0. -**Example** +**Example:** ```yql SELECT TableRecordIndex() FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md index f6cedf2bf8..90cc5262ae 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md @@ -2,9 +2,8 @@ Getting the entire table row as a structure. No arguments{% if feature_join %}. `JoinTableRow` in case of `JOIN` always returns a structure with table prefixes{% endif %}. -**Example** +**Example:** ```yql SELECT TableRow() FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md index 75105178eb..a4971a4605 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md @@ -2,7 +2,7 @@ Conversion of [primitive data types](../../../types/primitive.md) to a string with their binary representation and back. Numbers are represented in the [little endian](https://en.wikipedia.org/wiki/Endianness#Little-endian) format. -**Examples** +**Examples:** ```yql SELECT @@ -12,4 +12,3 @@ SELECT Uint64 ); -- 1234567890ul ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md index 7854ae7db0..2884f95ad6 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md @@ -8,7 +8,7 @@ Arguments: * String with a field name or tuple index * Variant type -**Example** +**Example:** ```yql $var_type = Variant<foo: Int32, bar: Bool>; @@ -25,7 +25,7 @@ Arguments: * Value * A string with the field name -**Example** +**Example:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md index e8a60bd796..bf40e1a1e3 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md @@ -14,4 +14,3 @@ SELECT WeakField(my_table.other_column, Int64) FROM my_table; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md index afd230466c..3dbbd75975 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md @@ -17,7 +17,7 @@ In the text representation, S-expressions have the following format: * Atom: ```'"foo"```. The apostrophe character (') denotes quoting of the next line that is usually enclosed in quotation marks. * List: ```'("foo" "bar")```. The apostrophe character (') denotes that there will be no function call in parentheses. -* Calling the built-in function: ```(foo "bar")```. The first item inside the brackets is the mandatory name of the function followed by the function arguments. +* Calling the built-in function: ```(foo "bar")```. The first element inside the brackets is the mandatory name of the function followed by the function arguments. * Declaring a lambda function: ```(lambda '(x y) (+ x y))```. The `lambda` keyword is followed by a list of argument names and then by the body of the lambda function. * The lambda function argument is ```x```. Unlike an atom, a string without an apostrophe character (') references a name in the current scope. When declaring a lambda function, the names of arguments are added to the body's visibility scope, and, if needed, the name is hidden from the global scope. * The ```world```. @@ -184,4 +184,3 @@ $makeClosure = ($y) -> { $closure = $makeClosure(2); SELECT $closure(1); -- 3 ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md index 568a78ff53..ba64e9d6b2 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md @@ -6,7 +6,7 @@ Construct an empty dictionary. Two arguments are passed: for a key and a value. [Documentation for the type definition format](../../types/type_string.md). -**Examples** +**Examples:** ```yql SELECT DictCreate(String, Tuple<String,Double?>); @@ -22,7 +22,7 @@ Construct an empty set. An argument is passed: the key type that can be built by [Documentation for the type definition format](../../types/type_string.md). -**Examples** +**Examples:** ```yql SELECT SetCreate(String); @@ -34,9 +34,9 @@ SELECT SetCreate(Tuple<Int32?,String>); ## DictLength {#dictlength} -The count of items in the dictionary. +The count of elements in the dictionary. -**Examples** +**Examples:** ```yql SELECT DictLength(AsDict(AsTuple(1, AsList("foo", "bar")))); @@ -52,9 +52,9 @@ SELECT DictLength(dict_column) FROM my_table; ## DictHasItems {#dicthasitems} -Check that the dictionary contains at least one item. +Check that the dictionary contains at least one element. -**Examples** +**Examples:** ```yql SELECT DictHasItems(AsDict(AsTuple(1, AsList("foo", "bar")))) FROM my_table; @@ -72,7 +72,7 @@ SELECT DictHasItems(dict_column) FROM my_table; Get dictionary contents as a list of tuples including key-value pairs (`List<Tuplekey_type,value_type>`). -**Examples** +**Examples:** ```yql SELECT DictItems(AsDict(AsTuple(1, AsList("foo", "bar")))); @@ -92,7 +92,7 @@ FROM my_table; Get a list of dictionary keys. -**Examples** +**Examples:** ```yql SELECT DictKeys(AsDict(AsTuple(1, AsList("foo", "bar")))); @@ -112,7 +112,7 @@ FROM my_table; Get a list of dictionary values. -**Examples** +**Examples:** ```yql SELECT DictPayloads(AsDict(AsTuple(1, AsList("foo", "bar")))); @@ -132,7 +132,7 @@ FROM my_table; Get a dictionary element by its key. -**Examples** +**Examples:** ```yql SELECT DictLookup(AsDict( @@ -155,7 +155,7 @@ FROM my_table; Checking if an element in the dictionary using its key. Returns true or false. -**Examples** +**Examples:** ```yql SELECT DictContains(AsDict( @@ -176,9 +176,9 @@ FROM my_table; ## DictAggregate {#dictaggregate} -Apply [aggregation factory](../basic.md#aggregationfactory) to the passed dictionary where each value is a list. The factory is applied separately inside each key.
-If the list is empty, the aggregation result is the same as for an empty table: 0 for the `COUNT` function and `NULL` for other functions.
-If the list under a certain key is empty in the passed dictionary, such a key is removed from the result.
+Apply [aggregation factory](../basic.md#aggregationfactory) to the passed dictionary where each value is a list. The factory is applied separately inside each key. +If the list is empty, the aggregation result is the same as for an empty table: 0 for the `COUNT` function and `NULL` for other functions. +If the list under a certain key is empty in the passed dictionary, such a key is removed from the result. If the passed dictionary is optional and contains `NULL`, the result is also `NULL`. Arguments: @@ -186,7 +186,7 @@ Arguments: 1. Dictionary. 2. [Aggregation factory](../basic.md#aggregationfactory). -**Examples** +**Examples:** ```sql SELECT DictAggregate(AsDict( @@ -205,7 +205,7 @@ So there are two options to make a call: * With the `Dict<K,V1>` and `List<K>` arguments. * With the `Dict<K,V1>` and `Dict<K,V2>` arguments. -**Examples** +**Examples:** ```sql SELECT SetIsDisjoint(ToSet(AsList(1, 2, 3)), AsList(7, 4)); -- true @@ -221,7 +221,7 @@ Arguments: * Two dictionaries: `Dict<K,V1>` and `Dict<K,V2>`. * An optional function that combines the values from the source dictionaries to construct the values of the output dictionary. If such a function has the `(K,V1,V2) -> U` type, the result type is `Dict<K,U>`. If the function is not specified, the result type is `Dict<K,Void>`, and the values from the source dictionaries are ignored. -**Examples** +**Examples:** ```yql SELECT SetIntersection(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 3 } @@ -241,7 +241,7 @@ So there are two options to make a call: * With the `Dict<K,V1>` and `List<K>` arguments. * With the `Dict<K,V1>` and `Dict<K,V2>` arguments. -**Examples** +**Examples:** ```yql SELECT SetIncludes(ToSet(AsList(1, 2, 3)), AsList(3, 4)); -- false @@ -257,7 +257,7 @@ Arguments: * Two dictionaries: `Dict<K,V1>` and `Dict<K,V2>`. * An optional function that combines the values from the source dictionaries to construct the values of the output dictionary. If such a function has the `(K,V1?,V2?) -> U` type, the result type is `Dict<K,U>`. If the function is not specified, the result type is `Dict<K,Void>`, and the values from the source dictionaries are ignored. -**Examples** +**Examples:** ```yql SELECT SetUnion(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 1, 2, 3, 4 } @@ -272,7 +272,7 @@ SELECT SetUnion( Construct a dictionary containing all the keys with their values in the first dictionary with no matching key in the second dictionary. -**Examples** +**Examples:** ```yql SELECT SetDifference(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 1, 2 } @@ -291,7 +291,7 @@ Arguments: * Two dictionaries: `Dict<K,V1>` and `Dict<K,V2>`. * An optional function that combines the values from the source dictionaries to construct the values of the output dictionary. If such a function has the `(K,V1?,V2?) -> U` type, the result type is `Dict<K,U>`. If the function is not specified, the result type is `Dict<K,Void>`, and the values from the source dictionaries are ignored. -**Examples** +**Examples:** ```yql SELECT SetSymmetricDifference(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 1, 2, 4 } @@ -301,4 +301,3 @@ SELECT SetSymmetricDifference( ($k, $a, $b) -> { RETURN AsTuple($a, $b) }); -- { 2 : (null, "qwe"), 3 : ("bar", null) } ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/index.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/index.md index 702cb639fd..6a003a5b76 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/index.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/index.md @@ -1,17 +1,16 @@ # Built-in YQL functions -- [Basic](../basic.md) -- [Aggregate](../aggregation.md) +* [Basic](../basic.md) +* [Aggregate](../aggregation.md) {% if feature_window_functions %} -- [Window](../window.md) +* [Window](../window.md) {% endif %} -- [For lists](../list.md) -- [For dictionaries](../dict.md) -- [For structures](../struct.md) -- [For types](../types.md) +* [For lists](../list.md) +* [For dictionaries](../dict.md) +* [For structures](../struct.md) +* [For types](../types.md) {% if feature_codegen %} -- [For code generation](../codegen.md) +* [For code generation](../codegen.md) {% endif %} -- [For JSON](../json.md) -- [C++ libraries](../../udf/list/index.md) - +* [For JSON](../json.md) +* [C++ libraries](../../udf/list/index.md) diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md index 5d24591e4d..9ab60eb901 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md @@ -85,9 +85,9 @@ In this query: The result of executing all JsonPath expressions is a sequence of JSON values. For example: -- The result of executing the `"Bobbie"` expression is a sequence with the only element `"Bobbie"`. Its length is 1. -- The result of executing the `$` expression (that takes the entire JSON object) in JSON `[1, 2, 3]` is `[1, 2, 3]`. A sequence of 1 element of the array `[1, 2, 3]` -- The result of executing the `$[*]` expression (retrieving all array elements) in JSON `[1, 2, 3]` is `1, 2, 3`. A sequence of three items:`1`, `2`, and `3` +* The result of executing the `"Bobbie"` expression is a sequence with the only element `"Bobbie"`. Its length is 1. +* The result of executing the `$` expression (that takes the entire JSON object) in JSON `[1, 2, 3]` is `[1, 2, 3]`. A sequence of 1 element of the array `[1, 2, 3]`. +* The result of executing the `$[*]` expression (retrieving all array elements) in JSON `[1, 2, 3]` is `1, 2, 3`. A sequence of three items:`1`, `2`, and `3`. If the input sequence consists of multiple values, some operations are performed for each element (for example, accessing a JSON object key). However, other operations require a sequence of one element as input (for example, binary arithmetic operations). @@ -159,7 +159,7 @@ JsonPath supports accessing JSON object keys, such as `$.session.user.name`. {% note info %} -Accessing keys without quotes is only supported for keys that start with an English letter or underscore and only contain English letters, underscores, numbers, and a dollar sign. Use quotes for all other keys. For example, `$.profile."this string has spaces"` or `$.user."42 is the answer"` +Accessing keys without quotes is only supported for keys that start with an English letter or underscore and only contain English letters, underscores, numbers, and a dollar sign. Use quotes for all other keys. For example, `$.profile."this string has spaces"` or `$.user."42 is the answer"`. {% endnote %} @@ -241,7 +241,7 @@ For each value from the input sequence: 6. If a segment is specified and its start index is greater than the end index (for example, `$[20 to 1]`), the query fails in `strict` mode. In `lax` mode, this segment is ignored. 7. All elements by the specified indexes are added to the result. Segments include **both ends**. -**Examples**: +**Examples:** ```json [ @@ -356,13 +356,13 @@ If each argument of a binary operation is not a single number or a number is div Unlike some other programming languages, Boolean values in JsonPath are not only `true` and `false`, but also `null` (uncertainty). -JsonPath considers any values received from a JSON document to be non-Boolean. For example, a query like `! $.is_valid_user` (a logical negation applied to the `is_valid_user`) field is syntactically invalid because the `is_valid_user` field value is not Boolean (even when it actually stores `true` or `false`). The correct way to write this kind of query is to explicitly use a comparison with a Boolean value, such as `$.is_valid_user == false`. +JsonPath considers any values received from a JSON document to be non-Boolean. For example, a query like `! $.is_valid_user` (a logical negation applied to the `is_valid_user`) field is syntactically invalid because the `is_valid_user` field value is not Boolean (even when it actually stores `true` or `false`). The correct way to write this kind of query is to explicitly use a comparison with a Boolean value, such as `$.is_valid_user == false`. ### Logical operations JsonPath supports some logical operations for Boolean values. -The arguments of any logical operation must be a single Boolean value.
+The arguments of any logical operation must be a single Boolean value. All logical operations return a Boolean value. **Logical negation,`!`** @@ -405,10 +405,10 @@ In the truth table, the first column is the left argument, the first row is the JsonPath implements comparison operators for values: -- Equality, `==` -- Inequality, `!=`and `<>` -- Less than and less than or equal to, `<` and `=` -- Greater than and greater than or equal to, `>` and `>=` +* Equality, `==` +* Inequality, `!=`and `<>` +* Less than and less than or equal to, `<` and `=` +* Greater than and greater than or equal to, `>` and `>=` All comparison operators return a Boolean value. Both operator arguments support multiple values. @@ -418,30 +418,30 @@ The arrays of each of the arguments are automatically unpacked. After that, for 1. The elements of the pair are compared 2. If an error occurs during the comparison, the `ERROR` flag is set. -3. If the comparison result is true, the flag set is `FOUND` +3. If the comparison result is true, the flag set is `FOUND`. 4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed. If the pair analysis results in: -1. The `ERROR` flag is set, the operator returns `null` -2. The `FOUND` flag is set, the operator returns `true` -3. Otherwise, it returns `false` +1. The `ERROR` flag is set, the operator returns `null`. +2. The `FOUND` flag is set, the operator returns `true`. +3. Otherwise, it returns `false`. We can say that this algorithm considers all pairs from the Cartesian product of the left and right arguments, trying to find the pair whose comparison returns true. Elements in a pair are compared according to the following rules: 1. If the left or right argument is an array or object, the comparison fails. -2. `null == null` returns true +2. `null == null` returns true. 3. In all other cases, if one of the arguments is `null`, false is returned. 4. If the left and right arguments are of different types, the comparison fails. 5. Strings are compared byte by byte. -6. `true` is considered greater than `false` -7. Numbers are compared with the accuracy of `1e-20` +6. `true` is considered greater than `false`. +7. Numbers are compared with the accuracy of `1e-20`. **Example:** -Let's take a JSON document as an example +Let's take a JSON document as an example: ```json { @@ -452,23 +452,23 @@ Let's take a JSON document as an example and analyze the steps for executing the `lax $.left < $.right` query: -1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"` -2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND` +1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"`. +2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND`. 3. Since the query is executed in `lax` mode and the `FOUND` flag is set, we aren't analyzing any more pairs. 4. Since we have the `FOUND` flag set, the operator returns true. Let's take the same query in a different execution mode: `strict $.left < $.right`: -1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"` -2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND` -3. Let's take the pair `(2, 4)`. The comparison is successful as `2 < 4` is true. Set the flag `FOUND` -4. Let's take the pair `(1, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR` -5. Let's take the pair `(2, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR` -6. Since we have the `ERROR` flag set, the operator returns `null` +1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"`. +2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND`. +3. Let's take the pair `(2, 4)`. The comparison is successful as `2 < 4` is true. Set the flag `FOUND`. +4. Let's take the pair `(1, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR`. +5. Let's take the pair `(2, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR`. +6. Since we have the `ERROR` flag set, the operator returns `null`. ### Predicates -JsonPath supports predicates which are expressions that return a Boolean value and check a certain condition. You can use them, for example, in filters.
+JsonPath supports predicates which are expressions that return a Boolean value and check a certain condition. You can use them, for example, in filters. #### `like_regex` @@ -507,7 +507,7 @@ If the pair analysis results in: 2. Setting the `FOUND` flag, the predicate returns `true` 3. Otherwise, the predicate returns `false` -**Examples** +**Examples:** 1. `"123456" like_regex "^[0-9]+$"` returns `true` 2. `"123abcd456" like_regex "^[0-9]+$"` returns `false` @@ -539,21 +539,21 @@ The second argument of the predicate must be a sequence of (possibly, multiple) For each element in a sequence of prefix strings: -1. A check is made for whether "an element is a prefix of an input string" +1. A check is made for whether "an element is a prefix of an input string". 2. If the element isn't a string, the `ERROR` flag is set. 3. If the check result is true, the `FOUND` flag is set. 4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed. If the pair analysis results in: -1. Setting the `ERROR` flag, the predicate returns `null` -2. Setting the `FOUND` flag, the predicate returns `true` -3. Otherwise, the predicate returns `false` +1. Setting the `ERROR` flag, the predicate returns `null`. +2. Setting the `FOUND` flag, the predicate returns `true`. +3. Otherwise, the predicate returns `false`. -**Examples** +**Examples:** -1. `"James Holden" starts with "James"` returns `true` -2. `"James Holden" starts with "Amos"` returns `false` +1. `"James Holden" starts with "James"` returns `true`. +2. `"James Holden" starts with "Amos"` returns `false`. #### `exists` @@ -570,11 +570,11 @@ Where `<expression>` is the JsonPath expression to be checked. Parentheses aroun **Execution** 1. The passed JsonPath expression is executed. -2. If an error occurs, the predicate returns `null` -3. If an empty sequence is obtained as a result of the execution, the predicate returns `false` -4. Otherwise, the predicate returns `true` +2. If an error occurs, the predicate returns `null`. +3. If an empty sequence is obtained as a result of the execution, the predicate returns `false`. +4. Otherwise, the predicate returns `true`. -**Examples** +**Examples:** Let's take a JSON document: @@ -605,31 +605,31 @@ Where `<expression>` is the JsonPath expression to be checked. Only expressions **Execution** -1. If the passed expression returns `null`, the predicate returns `true` -2. Otherwise, the predicate returns `false` +1. If the passed expression returns `null`, the predicate returns `true`. +2. Otherwise, the predicate returns `false`. -**Examples** +**Examples:** -1. `(1 == 2) is unknown` returns `false`. The `1 == 2` expression returned `false`, which is not `null` +1. `(1 == 2) is unknown` returns `false`. The `1 == 2` expression returned `false`, which is not `null`. 2. `(1 == "string") is unknown` returns `true`. The `1 == "string"` expression returned `null`, because strings and numbers can't be compared in JsonPath. ### Filters JsonPath lets you filter values obtained during query execution. -An expression in a filter must return a Boolean value.
+An expression in a filter must return a Boolean value. Before filtering, the input sequence arrays are automatically unpacked. For each element of the input sequence: 1. The value of the current filtered `@` object becomes equal to the current element of the input sequence. -2. Executing the expression in the filter +2. Executing the expression in the filter. 3. If an error occurs during the expression execution, the current element of the input sequence is skipped. 4. If the expression execution result is the only `true` value, the current element is added to the filter result. **Example:** -Suppose we have a JSON document describing the user's friends +Suppose we have a JSON document describing the user's friends: ```json { @@ -710,10 +710,10 @@ For each element of the input sequence, the method adds this string to the outpu | Array | `"array"` | | Object | `"object"` | -**Examples** +**Examples:** -1. `"Naomi".type()` returns `"string"` -2. `false.type()` returns `"boolean"` +1. `"Naomi".type()` returns `"string"`. +2. `false.type()` returns `"boolean"`. #### `size` @@ -722,9 +722,9 @@ The `size` method returns the size of the array. For each element of the input sequence, the method adds the following to the output sequence: 1. The size of the array if the element type is an array. -2. For all other types (including objects), it adds `1` +2. For all other types (including objects), it adds `1`. -**Examples** +**Examples:** Let's take a JSON document: @@ -741,9 +741,9 @@ Let's take a JSON document: And queries to it: -1. `$.array.size()` returns `3` -2. `$.object.size()` returns `1` -3. `$.scalar.size()` returns `1` +1. `$.array.size()` returns `3`. +2. `$.object.size()` returns `1`. +3. `$.scalar.size()` returns `1`. #### `Double` @@ -753,11 +753,11 @@ Before its execution, the input sequence arrays are automatically unpacked. All elements in the input sequence must be strings that contain decimal numbers. It's allowed to specify the fractional part and exponent. -**Examples** +**Examples:** -1. `"125".double()` returns `125` -2. `"125.456".double()` returns `125.456` -3. `"125.456e-3".double()` returns `0.125456` +1. `"125".double()` returns `125`. +2. `"125.456".double()` returns `125.456`. +3. `"125.456e-3".double()` returns `0.125456`. #### `ceiling` @@ -767,12 +767,12 @@ Before its execution, the input sequence arrays are automatically unpacked. All elements in the input sequence must be numbers. -**Examples** +**Examples:** -1. `(1.3).ceiling()` returns `2` -2. `(1.8).ceiling()` returns `2` -3. `(1.5).ceiling()` returns `2` -4. `(1.0).ceiling()` returns `1` +1. `(1.3).ceiling()` returns `2`. +2. `(1.8).ceiling()` returns `2`. +3. `(1.5).ceiling()` returns `2`. +4. `(1.0).ceiling()` returns `1`. #### `floor` @@ -782,12 +782,12 @@ Before its execution, the input sequence arrays are automatically unpacked. All elements in the input sequence must be numbers. -**Examples** +**Examples:** -1. `(1.3).floor()` returns `1` -2. `(1.8).floor()` returns `1` -3. `(1.5).floor()` returns `1` -4. `(1.0).floor()` returns `1` +1. `(1.3).floor()` returns `1`. +2. `(1.8).floor()` returns `1`. +3. `(1.5).floor()` returns `1`. +4. `(1.0).floor()` returns `1`. #### `abs` @@ -797,11 +797,11 @@ Before its execution, the input sequence arrays are automatically unpacked. All elements in the input sequence must be numbers. -**Examples** +**Examples:** -1. `(0.0).abs()` returns `0` -2. `(1.0).abs()` returns `1` -3. `(-1.0).abs()` returns `1` +1. `(0.0).abs()` returns `0`. +2. `(1.0).abs()` returns `1`. +3. `(-1.0).abs()` returns `1`. #### `keyvalue` @@ -819,7 +819,7 @@ For each element of the input sequence: 4. `value` stores the value from the pair. 5. All objects for this element are added to the output sequence. -**Examples** +**Examples:** Let's take a JSON document: @@ -871,9 +871,9 @@ Unlike many programming languages, JsonPath doesn't support creating new variabl All functions for JSON accept: -1. A JSON value (can be an arbitrary `Json` or `Json?` expression) -2. A JsonPath query (must be explicitly specified with a string literal) -3. **(Optional)** `PASSING` section +1. A JSON value (can be an arbitrary `Json` or `Json?` expression). +2. A JsonPath query (must be explicitly specified with a string literal). +3. **(Optional)** `PASSING` section. ### PASSING section @@ -890,13 +890,13 @@ PASSING `<expression>` can have the following types: -- Numbers, `Date`, `DateTime`, and `Timestamp` (a `CAST` into `Double` will be made before passing a value to JsonPath) -- `Utf8`, `Bool`, and `Json` +* Numbers, `Date`, `DateTime`, and `Timestamp` (a `CAST` into `Double` will be made before passing a value to JsonPath) +* `Utf8`, `Bool`, and `Json` You can set a `<variable name>` in several ways: -- As an SQL name like `variable` -- In quotes, for example, `"variable"` +* As an SQL name like `variable` +* In quotes, for example, `"variable"` **Example:** @@ -988,37 +988,37 @@ JSON_VALUE( **Default values:** -1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY` -2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR` -3. If the `RETURNING` section isn't specified, then for `<type>`, the type used is `Utf8` +1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY`. +2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR`. +3. If the `RETURNING` section isn't specified, then for `<type>`, the type used is `Utf8`. **Behavior:** -1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `<type>?` +1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `<type>?`. 2. If an error occurs, the returned value depends on the `ON ERROR` section: - - `NULL`: Return an empty `<type>?` - - `ERROR`: Abort the entire query - - `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the entire query fails, too. + * `NULL`: Return an empty `<type>?`. + * `ERROR`: Abort the entire query. + * `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the entire query fails, too. 3. If the JsonPath execution result is empty, the returned value depends on the `ON EMPTY` section: - - `NULL`: Return an empty `<type>?` - - `ERROR`: Abort the entire query - - `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the behavior matches the `ON ERROR` section. + * `NULL`: Return an empty `<type>?`. + * `ERROR`: Abort the entire query. + * `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the behavior matches the `ON ERROR` section. 4. If the result of JsonPath execution is a single value, then: - - If the `RETURNING` section isn't specified, the value is converted to `Utf8`. - - Otherwise, the `CAST` function is run to convert the value to `<type>`. If the `CAST` fails, the behavior matches the `ON ERROR` section. In this case, the value from JSON must match the `<type>` type. -5. Return the result + * If the `RETURNING` section isn't specified, the value is converted to `Utf8`. + * Otherwise, the `CAST` function is run to convert the value to `<type>`. If the `CAST` fails, the behavior matches the `ON ERROR` section. In this case, the value from JSON must match the `<type>` type. +5. Return the result. Correlation between JSON and YQL types: -- JSON Number: Numeric types, `Date`, `DateTime`, and `Timestamp` -- JSON Bool: `Bool` -- JSON String: `Utf8` and `String` +* JSON Number: Numeric types, `Date`, `DateTime`, and `Timestamp`. +* JSON Bool: `Bool`. +* JSON String: `Utf8` and `String`. Errors executing `JSON_VALUE` are as follows: -- Errors evaluating JsonPath -- The result of JsonPath execution is a number of values or a non-scalar value. -- The type of value returned by JSON doesn't match the expected one. +* Errors evaluating JsonPath. +* The result of JsonPath execution is a number of values or a non-scalar value. +* The type of value returned by JSON doesn't match the expected one. `The RETURNING` section supports such types as numbers, `Date`, `DateTime`, `Timestamp`, `Utf8`, `String`, and `Bool`. @@ -1086,10 +1086,10 @@ JSON_QUERY( **Default values:** -1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY` -2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR` -3. If the `WRAPPER` section isn't specified, the section used is `WITHOUT WRAPPER` -4. If the `WITH WRAPPER` section is specified but `CONDITIONAL` or `UNCONDITIONAL` is omitted, then the section used is `UNCONDITIONAL` +1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY`. +2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR`. +3. If the `WRAPPER` section isn't specified, the section used is `WITHOUT WRAPPER`. +4. If the `WITH WRAPPER` section is specified but `CONDITIONAL` or `UNCONDITIONAL` is omitted, then the section used is `UNCONDITIONAL`. **Behavior:** @@ -1099,27 +1099,27 @@ You can't specify the `WITH ... WRAPPER` and `ON EMPTY` sections at the same tim {% endnote %} -1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `Json?` +1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `Json?`. 2. If the `WRAPPER` section is specified, then: - - `WITHOUT WRAPPER` or `WITHOUT ARRAY WRAPPER`: Don't convert the result of JsonPath execution in any way. - - `WITH UNCONDITIONAL WRAPPER` or `WITH UNCONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array. - - `WITH CONDITIONAL WRAPPER` or `WITH CONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array if it isn't the only array or object. + * `WITHOUT WRAPPER` or `WITHOUT ARRAY WRAPPER`: Don't convert the result of JsonPath execution in any way. + * `WITH UNCONDITIONAL WRAPPER` or `WITH UNCONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array. + * `WITH CONDITIONAL WRAPPER` or `WITH CONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array if it isn't the only array or object. 3. If the JsonPath execution result is empty, the returned value depends on the `ON EMPTY` section: - - `NULL`: Return an empty `Json?` - - `ERROR`: Abort the entire query - - `EMPTY ARRAY`: Return an empty JSON array, `[]` - - `EMPTY OBJECT`: Return an empty JSON object, `{}` + * `NULL`: Return an empty `Json?`. + * `ERROR`: Abort the entire query. + * `EMPTY ARRAY`: Return an empty JSON array, `[]`. + * `EMPTY OBJECT`: Return an empty JSON object, `{}`. 4. If an error occurs, the returned value depends on the `ON ERROR` section: - - `NULL`: Return an empty `Json?` - - `ERROR`: Abort the entire query - - `EMPTY ARRAY`: Return an empty JSON array, `[]` - - `EMPTY OBJECT`: Return an empty JSON object, `{}` -5. Return the result + * `NULL`: Return an empty `Json?`. + * `ERROR`: Abort the entire query. + * `EMPTY ARRAY`: Return an empty JSON array, `[]`. + * `EMPTY OBJECT`: Return an empty JSON object, `{}`. +5. Return the result. Errors running a `JSON_QUERY`: -- Errors evaluating JsonPath -- The result of JsonPath execution is a number of values (even after using the `WRAPPER` section) or a scalar value. +* Errors evaluating JsonPath. +* The result of JsonPath execution is a number of values (even after using the `WRAPPER` section) or a scalar value. **Examples:** @@ -1147,4 +1147,3 @@ SELECT JSON_QUERY($json, "$.friends[0]" WITH CONDITIONAL WRAPPER), -- {"name": "James Holden", "age": 35} JSON_QUERY($json, "$.friends.name" WITH CONDITIONAL WRAPPER); -- ["James Holden", "Naomi Nagata"] ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md index 555302c562..f15c465422 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md @@ -2,11 +2,11 @@ ## ListCreate {#list-create} -Construct an empty list. The only argument specifies a string describing the data type of the list cell, or the type itself obtained using [relevant functions](../types.md). YQL doesn't support lists with an unknown cell type. +Construct an empty list. The only argument specifies a string describing the data type of the list cell or the type itself obtained using [relevant functions](../types.md). YQL doesn't support lists with an unknown cell type. [Documentation for the type definition format](../../types/type_string.md). -**Examples** +**Examples:** ```yql SELECT ListCreate(Tuple<String,Double?>); @@ -16,11 +16,11 @@ SELECT ListCreate(Tuple<String,Double?>); SELECT ListCreate(OptionalType(DataType("String"))); ``` -## asList and AsListStrict {#aslist} +## AsList and AsListStrict {#aslist} Construct a list based on one or more arguments. The argument types must be compatible in the case of `AsList` and strictly match in the case of `AsListStrict`. -**Examples** +**Examples:** ```yql SELECT AsList(1, 2, 3, 4, 5); @@ -30,7 +30,7 @@ SELECT AsList(1, 2, 3, 4, 5); The count of items in the list. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -43,7 +43,7 @@ SELECT ListLength(list_column) FROM my_table; Check that the list contains at least one item. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -54,9 +54,9 @@ SELECT ListHasItems(list_column) FROM my_table; ## ListCollect {#listcollect} -Convert a lazy list (it can be built by such functions as [ListFilter](#listfilter), [ListMap](#listmap), [ListFlatMap](#listflatmap)) to an eager list. In contrast to a lazy list, where each new pass re-calculates the list contents, in an eager list the content is built at once by consuming more memory. +Convert a lazy list (which can be built by such functions as [ListFilter](#listfilter), [ListMap](#listmap), and [ListFlatMap](#listflatmap)) to an eager list. In contrast to a lazy list, where each new pass re-calculates the list contents, in an eager list the content is built at once by consuming more memory. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -65,16 +65,16 @@ SELECT ListCollect(list_column) FROM my_table; {% endif %} -## ListSort, ListSortAsc, and ListSortDesc {#listsort} +## ListSort, ListSortAsc and ListSortDesc {#listsort} Sort the list. By default, the ascending sorting order is applied (`ListSort` is an alias for `ListSortAsc`). Arguments: 1. List. -2. An optional expression to get the sort key from a list element (it's the element itself by default). +2. An optional expression to get the sort key from a list element (the element itself by default). -**Examples** +**Examples:** {% if feature_column_container_type %} @@ -105,11 +105,11 @@ The example used a [lambda function](../../syntax/expressions.md#lambda). ## ListExtend and ListExtendStrict {#listextend} Sequentially join lists (concatenation of lists). The arguments can be lists, optional lists, and `NULL`. -The types of list items must be compatible in the case of `ListExtend` and strictly match in the case of `ListExtendStrict`. +The types of list elements must be compatible in the case of `ListExtend` and strictly match in the case of `ListExtendStrict`. If at least one of the lists is optional, then the result is also optional. If at least one argument is `NULL`, then the result type is `NULL`. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -128,7 +128,7 @@ Sequentially join lists of structures (concatenation of lists). A field is added If at least one of the lists is optional, then the result is also optional. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -143,12 +143,12 @@ SELECT ListUnionAll( ## ListZip and ListZipAll {#listzip} -Based on the input lists, build a list of pairs containing the list items with matching indexes (`List<Tuplefirst_list_element_type,second_list_element_type>`). +Based on the input lists, build a list of pairs containing the list elements with matching indexes (`List<Tuplefirst_list_element_type,second_list_element_type>`). The length of the returned list is determined by the shortest list for ListZip and the longest list for ListZipAll. When the shorter list is exhausted, a `NULL` value of a relevant [optional type](../../types/optional.md) is paired with the elements of the longer list. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -164,7 +164,7 @@ FROM my_table; Build a list of pairs (Tuple) containing the element number and the element itself (`List<TupleUint64,list_element_type>`). -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -177,7 +177,7 @@ SELECT ListEnumerate(list_column) FROM my_table; Reverse the list. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -192,7 +192,7 @@ Returns a copy of the list, skipping the specified number of its first elements. The first argument specifies the source list and the second argument specifies how many elements to skip. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -209,7 +209,7 @@ Returns a copy of the list containing a limited number of elements from the seco The first argument specifies the source list and the second argument specifies the maximum number of elements to be taken from the beginning of the list. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -222,7 +222,7 @@ SELECT ListTake(list_column, 3) FROM my_table; Searches the list for an element with the specified value and returns its index at the first occurrence. Indexes count from 0. If such element is missing, it returns `NULL`. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -233,7 +233,7 @@ FROM my_table; {% endif %} -## ListMap, ListFilter, and ListFlatMap {#listmap} +## ListMap, ListFilter and ListFlatMap {#listmap} Apply the function specified as the second argument to each list element. The functions differ in their returned result: @@ -252,13 +252,13 @@ Arguments: 1. Source list. 2. Functions for processing list elements, such as: * [Lambda function](../../syntax/expressions.md#lambda). - * `Module::Function` - C++ UDF; + * `Module::Function` - С++ UDF; {% if feature_udf_noncpp %} - * [Python UDF](../../udf/python.md), [JavaScript UDF](../../udf/javascript.md) or any other called value. + * [Python UDF](../../udf/python.md), [JavaScript UDF](../../udf/javascript.md) or any other callable value. If the source list is optional, then the output list is also optional. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -279,7 +279,7 @@ Applies transformation to the source list, skipping empty optional items and str If the source list is optional, then the output list is also optional. -**Examples** +**Examples:** ```yql SELECT ListNotNull([1,2]), -- [1,2] @@ -288,11 +288,11 @@ SELECT ListNotNull([1,2]), -- [1,2] ## ListFlatten {#listflatten} -Expands the list of lists into a flat list, preserving the order of items. As the top-level list item you can use an optional list that is interpreted as an empty list in the case of `NULL`. +Expands the list of lists into a flat list, preserving the order of items. As the top-level list item, you can use an optional list that is interpreted as an empty list in the case of `NULL`. If the source list is optional, then the output list is also optional. -**Examples** +**Examples:** ```yql SELECT ListFlatten([[1,2],[3,4]]), -- [1,2,3,4] @@ -303,7 +303,7 @@ SELECT ListFlatten([[1,2],[3,4]]), -- [1,2,3,4] Returns a copy of the list containing only distinct elements. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -316,14 +316,14 @@ FROM my_table; ## ListAny and ListAll {#listany} -Returns `true` for a list of Boolean values, if: +Returns `true` for a list of Boolean values if: * `ListAny`: At least one element is `true`. * `ListAll`: All elements are `true`. Otherwise, it returns false. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -339,7 +339,7 @@ FROM my_table; Show whether the list contains the specified element. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -354,7 +354,7 @@ FROM my_table; Returns the first and last item of the list. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -370,7 +370,7 @@ FROM my_table; Apply the appropriate aggregate function to all elements of the numeric list. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -386,7 +386,7 @@ FROM my_table; ## ListFromRange {#listfromrange} -Generate a sequence of numbers with the specified step. It's similar to `xrange` in Python 2, but additionally supports floats. +Generate a sequence of numbers with the specified step. It's similar to `xrange` in Python 2, but additionally supports floating points. Arguments: @@ -398,12 +398,12 @@ Specifics: * The end is not included, i.e. `ListFromRange(1,3) == AsList(1,2)`. * The type for the resulting elements is selected as the broadest from the argument types. For example, `ListFromRange(1, 2, 0.5)` results in a `Double` list. -* The list is "lazy", but if it's used incorrectly, it can still consume a lot of RAM. +* The list is "lazy", but if used improperly, it can still consume lots of RAM. * If the step is positive and the end is less than or equal to the start, the result list is empty. * If the step is negative and the end is greater than or equal to the start, the result list is empty. * If the step is neither positive nor negative (0 or NaN), the result list is empty. -**Examples** +**Examples:** ```yql SELECT @@ -420,7 +420,7 @@ Required arguments: 1. Value. 2. Number of copies. -**Examples** +**Examples:** ```yql SELECT ListReplicate(true, 3); -- [true, true, true] @@ -431,7 +431,7 @@ SELECT ListReplicate(true, 3); -- [true, true, true] Concatenates a list of strings into a single string. You can set a separator as the second parameter. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -447,7 +447,7 @@ FROM my_table; For a list of structures, it returns a list of contained fields having the specified name. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -462,8 +462,8 @@ FROM my_table; `ListTakeWhile` returns a list from the beginning while the predicate is true, then the list ends. -`ListSkipWhile` skips the list segment from the beginning while the predicate is true, then returns the rest of the list ignoring the predicate. -`ListTakeWhileInclusive` returns a list from the beginning while the predicate is true. Then the list ends, but it also includes the item on which the stopping predicate triggered. +`ListSkipWhile` skips the list segment from the beginning while the predicate is true, then returns the rest of the list disregarding the predicate. +`ListTakeWhileInclusive` returns a list from the beginning while the predicate is true. Then the list ends, but it also includes the element that triggered the stopping predicate. `ListSkipWhileInclusive` skips a list segment from the beginning while the predicate is true, then returns the rest of the list disregarding the predicate, but excluding the element that matched the predicate and starting with the next element after it. Required arguments: @@ -473,7 +473,7 @@ Required arguments: If the input list is optional, then the result is also optional. -**Examples** +**Examples:** ```yql $data = AsList(1, 2, 5, 1, 2, 7); @@ -496,7 +496,7 @@ Arguments: 1. List. 2. [Aggregation factory](../basic.md#aggregationfactory). -**Examples** +**Examples:** ```yql SELECT ListAggregate(AsList(1, 2, 3), AggregationFactory("Sum")); -- 6 @@ -504,7 +504,7 @@ SELECT ListAggregate(AsList(1, 2, 3), AggregationFactory("Sum")); -- 6 ## ToDict and ToMultiDict {#todict} -Convert a list of tuples containing key-value pairs to a dictionary. In case of conflicting keys in the input list, `ToDict` leaves the first value and `ToMultiDict` builds a list of all the values. +Convert a list of tuples containing key-value pairs to a dictionary. If there are conflicting keys in the input list, `ToDict` leaves the first value and `ToMultiDict` builds a list of all the values. It means that: @@ -513,7 +513,7 @@ It means that: Optional lists are also supported, resulting in an optional dictionary. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -531,7 +531,7 @@ An optional list is also supported, resulting in an optional dictionary. Inverse function: get a list of keys for the [DictKeys](../dict.md#dictkeys) dictionary. -**Examples** +**Examples:** {% if feature_column_container_type %} ```yql @@ -539,6 +539,4 @@ SELECT ToSet(list_column) FROM my_table; ``` - {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md index 1b824272b7..f727c1ba4b 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md @@ -36,7 +36,7 @@ Arguments: * The first argument passes the source structure to be expanded. * All the other arguments must be named, each argument adds a new field and the argument's name is used as the field's name (as in [AsStruct](../basic.md#asstruct)). -**Examples** +**Examples:** ```yql $struct = <|a:1|>; @@ -60,7 +60,7 @@ Arguments: 2. Name of the new field. 3. Value of the new field. -**Examples** +**Examples:** ```yql $struct = <|a:1|>; @@ -83,7 +83,7 @@ Arguments: 1. Source structure. 2. Field name. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2|>; @@ -105,7 +105,7 @@ Arguments: 1. Source structure. 2. Field name. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2|>; @@ -127,7 +127,7 @@ Arguments: 1. Source structure. 2. List of field names. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2, c:3|>; @@ -149,7 +149,7 @@ Arguments: 1. Source structure. 2. List of field names. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2, c:3|>; @@ -171,7 +171,7 @@ Arguments: 1. Source structure. 2. List of field names. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2, c:3|>; @@ -190,7 +190,7 @@ If the resulting field set contains duplicate values, an error is returned. Arguments: two or more structures. -**Examples** +**Examples:** ```yql $struct1 = <|a:1, b:2|>; @@ -208,9 +208,9 @@ Combining the fields from multiple new structures into another new structure wit If the resulting field set contains duplicate values, an error is returned. -Arguments: two or more tuples of two items: prefix and structure. +Arguments: two or more tuples of two elements: prefix and structure. -**Examples** +**Examples:** ```yql $struct1 = <|a:1, b:2|>; @@ -228,7 +228,7 @@ Returns an unordered list of field names (possibly removing one Optional level) Argument: structure -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2|>; @@ -245,7 +245,7 @@ Arguments: 1. Source structure. 2. A tuple of field names: the original name, the new name. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2|>; @@ -262,7 +262,7 @@ Arguments: 1. Source structure. 2. A tuple of field names: the original name, the new name. -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2|>; @@ -272,11 +272,11 @@ SELECT ## GatherMembers {#gathermembers} -Returns an unordered list of tuples including the field name and value. For the `NULL` argument, `EmptyList` is returned. It can be used only in the cases when the types of items in the structure are the same or compatible. Returns an optional list for an optional structure. +Returns an unordered list of tuples including the field name and value. For the `NULL` argument, `EmptyList` is returned. It can be used only in the cases when the types of elements in the structure are the same or compatible. Returns an optional list for an optional structure. Argument: structure -**Examples** +**Examples:** ```yql $struct = <|a:1, b:2|>; @@ -286,14 +286,14 @@ SELECT ## SpreadMembers {#spreadmembers} -Creates a structure with a specified list of fields and applies a specified list of edits to it in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is Optional or `NULL`, the result has the same type. If the list of edits includes a field that is not in the list of expected fields, an error is returned. +Creates a structure with a specified list of fields and applies to it the specified list of updates in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is Optional or `NULL`, the result has the same type. If the list of edits includes a field that is not in the list of expected fields, an error is returned. Arguments: 1. List of tuples: field name, field value. 2. A list of all possible field names in the structure. -**Examples** +**Examples:** ```yql @@ -303,18 +303,17 @@ SELECT ## ForceSpreadMembers {#forcespreadmembers} -Creates a structure with a specified list of fields and applies to it the specified list of updates in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is optional or equal to `NULL`, the result has the same type. If the list of updates includes a field that is not in the list of expected fields, this edit is ignored. +Creates a structure with a specified list of fields and applies to it the specified list of updates in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is Optional or `NULL`, the result has the same type. If the list of updates includes a field that is not in the list of expected fields, this edit is ignored. Arguments: 1. List of tuples: field name, field value. 2. A list of all possible field names in the structure. -**Examples** +**Examples:** ```yql SELECT ForceSpreadMembers([('a',1),('a',2),('c',100)],['a','b']); -- (a: 2, b: null) ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md index 28c7b6f56d..4dcf44d0f0 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md @@ -8,7 +8,7 @@ Serializing a type {% if feature_codegen %} or a handle type{% endif %} to a hum Building a type from a string with description. [Documentation for its format](../../types/type_string.md). -**Examples** +**Examples:** ```yql SELECT FormatType(ParseType("List<Int32>")); -- List<int32> @@ -18,7 +18,7 @@ SELECT FormatType(ParseType("List<Int32>")); -- List<int32> Getting the type of value passed to the argument. -**Examples** +**Examples:** ```yql SELECT FormatType(TypeOf("foo")); -- String @@ -34,7 +34,7 @@ Returns an instance of the specified type that can only be used to get the type If this instance remains in the computation graph by the end of optimization, the operation fails. -**Examples** +**Examples:** ```yql SELECT FormatType(TypeOf( @@ -47,7 +47,7 @@ SELECT FormatType(TypeOf( Returns a type for [primitive data types](../../types/primitive.md) based on type name. -**Examples** +**Examples:** ```yql SELECT FormatType(DataType("Bool")); -- Bool @@ -58,7 +58,7 @@ SELECT FormatType(DataType("Decimal","5","1")); -- Decimal(5,1) Adds the option to assign `NULL` to the passed type. -**Examples** +**Examples:** ```yql SELECT FormatType(OptionalType(DataType("Bool"))); -- Bool? @@ -68,7 +68,7 @@ SELECT FormatType(OptionalType(DataType("Bool"))); -- Bool? Builds a list type or stream type based on the passed element type. -**Examples** +**Examples:** ```yql SELECT FormatType(ListType(DataType("Bool"))); -- List<Bool> @@ -78,7 +78,7 @@ SELECT FormatType(ListType(DataType("Bool"))); -- List<Bool> Builds a dictionary type based on the passed key types (first argument) and value types (second argument). -**Examples** +**Examples:** ```yql SELECT FormatType(DictType( @@ -91,7 +91,7 @@ SELECT FormatType(DictType( Builds the tuple type from the passed element types. -**Examples** +**Examples:** ```yql SELECT FormatType(TupleType( @@ -105,7 +105,7 @@ SELECT FormatType(TupleType( Builds the structure type based on the passed element types. The standard syntax of named arguments is used to specify the element names. -**Examples** +**Examples:** ```yql SELECT FormatType(StructType( @@ -118,7 +118,7 @@ SELECT FormatType(StructType( Returns the type of a variant based on the underlying type (structure or tuple). -**Examples** +**Examples:** ```yql SELECT FormatType(VariantType( @@ -130,7 +130,7 @@ SELECT FormatType(VariantType( Returns the type of the [resource](../../types/special.md) based on the passed string label. -**Examples** +**Examples:** ```yql SELECT FormatType(ResourceType("Foo")); -- Resource<'Foo'> @@ -144,7 +144,7 @@ Constructs the type of the called value using the following arguments: 2. Result type. 3. All the next arguments of CallableType are treated as types of arguments of the callable value, but with a shift for two required arguments (for example, the third argument of the CallableType describes the type of the first argument in the callable value). -**Examples** +**Examples:** ```yql SELECT FormatType(CallableType( @@ -155,11 +155,11 @@ SELECT FormatType(CallableType( )); -- Callable<(String,[Int64?])->Double> ``` -## GenericType, UnitType, and VoidType {#generictype} +## GenericType, UnitType and VoidType {#generictype} Return the same-name [special data types](../../types/special.md). They have no arguments because they are not parameterized. -**Examples** +**Examples:** ```yql SELECT FormatType(VoidType()); -- Void @@ -167,33 +167,31 @@ SELECT FormatType(VoidType()); -- Void ## OptionalItemType, ListItemType and StreamItemType {#optionalitemtype} -{% if feature_codegen %} If a type is passed to these functions, then they perform {% else %}Perform{% endif %} the action reverse to [OptionalType](#optionaltype), [ListType](#listtype), and [StreamType](#streamtype): return the item type based on its container type. +{% if feature_codegen %} If a type is passed to these functions, then they {% else %}Do{% endif %} the action reverse to [OptionalType](#optionaltype), [ListType](#listtype), and [StreamType](#streamtype): return the element type based on its container type. {% if feature_codegen %} -If a type handle is passed to these functions, then they perform the action reverse to [OptionalTypeHandle](#optionaltypehandle), [ListTypeHandle](#listtypehandle), and [StreamTypeHandle](#streamtypehandle): they return the handle of the element type based on the type handle of its container. {% endif %} +If a type handle is passed to these functions, then they do the action reverse to [OptionalTypeHandle](#optionaltypehandle), [ListTypeHandle](#listtypehandle), and [StreamTypeHandle](#streamtypehandle): they return the handle of the element type based on the type handle of its container. +{% endif %} -**Examples** +**Examples:** ```yql SELECT FormatType(ListItemType( ParseType("List<Int32>") )); -- Int32 ``` - {% if feature_codegen %} - ```yql SELECT FormatType(ListItemType( ParseTypeHandle("List<Int32>") )); -- Int32 ``` - {% endif %} ## DictKeyType and DictPayloadType {#dictkeytype} Returns the type of the key or value based on the dictionary type. -**Examples** +**Examples:** ```yql SELECT FormatType(DictKeyType( @@ -205,7 +203,7 @@ SELECT FormatType(DictKeyType( Returns the tuple's element type based on the tuple type and the element index (index starts from zero). -**Examples** +**Examples:** ```yql SELECT FormatType(TupleElementType( @@ -217,7 +215,7 @@ SELECT FormatType(TupleElementType( Returns the type of the structure element based on the structure type and element name. -**Examples** +**Examples:** ```yql SELECT FormatType(StructMemberType( @@ -229,7 +227,7 @@ SELECT FormatType(StructMemberType( `CallableResultType` returns the result type based on the type of the called value. `CallableArgumentType` returns the argument type based on the called value type and its index (index starts from zero). -**Examples** +**Examples:** ```yql $callable_type = ParseType("(String,Bool)->Double"); @@ -244,11 +242,12 @@ FormatType(CallableArgumentType( ## VariantUnderlyingType {#variantunderlyingtype} -{% if feature_codegen %}If a type is passed to this function, then it {% else %}Performs{% endif %} an action reverse to [VariantType](#varianttype): it returns the underlying type based on the variant type. +{% if feature_codegen %}If a type is passed to this function, then it {% else %}Does{% endif %} an action reverse to [VariantType](#varianttype): it returns the underlying type based on the variant type. {% if feature_codegen %} -If a type handle is passed to this function, it performs the action reverse to [VariantTypeHandle](#varianttypehandle): returns the handle of the underlying type based on the handle of the variant type. {% endif %} +If a type handle is passed to this function, it does the action reverse to[VariantTypeHandle](#varianttypehandle): returns the handle of the underlying type based on the handle of the variant type. +{% endif %} -**Examples** +**Examples:** ```yql SELECT FormatType(VariantUnderlyingType( @@ -258,9 +257,7 @@ FormatType(VariantUnderlyingType( ParseType("Variant<Int32,Double>") )); -- Tuple<Int32,Double> ``` - {% if feature_codegen %} - ```yql SELECT FormatType(VariantUnderlyingType( ParseTypeHandle("Variant<foo:Int32,bar:Double>") @@ -269,11 +266,9 @@ FormatType(VariantUnderlyingType( ParseTypeHandle("Variant<Int32,Double>") )); -- Tuple<Int32,Double> ``` - {% endif %} {% if feature_codegen %} - # Functions for data types during calculations To work with data types during calculations, use handle types: these are [resources](../../types/special.md) that contain an opaque type definition. After constructing the type handle, you can revert to the regular type using the [EvaluateType](#evaluatetype) function. For debug purposes, you can convert a handle type to a string using the [FormatType](#formattype) function. @@ -627,4 +622,3 @@ SELECT LambdaArgumentsCount(($x, $y)->($x+$y)) ``` {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md index 6f5f78cdfb..95d4b45b43 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md @@ -14,4 +14,3 @@ WINDOW w1 AS (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW), w2 AS (); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md index a3dc0c052b..3556ffc0f1 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md @@ -4,7 +4,7 @@ Access values from the first and last rows of the [window frame](../../../syntax Optionally, `OVER` can be preceded by the additional modifier `IGNORE NULLS`. It changes the behavior of functions to the first or last __non-empty__ (i.e., non-`NULL`) value among the window frame rows. The antonym of this modifier is `RESPECT NULLS`: it's the default behavior that can be omitted. -**Examples** +**Examples:** ```yql SELECT @@ -19,4 +19,3 @@ SELECT FROM my_table WINDOW w AS (ORDER BY key); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md index 334d448fed..3ece1f89f5 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md @@ -2,7 +2,7 @@ Accessing a value from a row in the [section](../../../syntax/window.md#partition) that lags behind (`LAG`) or leads (`LEAD`) the current row by a fixed number. The first argument specifies the expression to be accessed, and the second argument specifies the offset in rows. You may omit the offset. By default, the neighbor row is used: the previous or next, respectively (hence, 1 is assumed by default). For the rows having no neighbors at a given distance (for example `LAG(expr, 3)` `NULL` is returned in the first and second rows of the section. -**Examples** +**Examples:** ```yql SELECT @@ -10,4 +10,3 @@ SELECT FROM my_table WINDOW w AS (ORDER BY key); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md index 88e66e32d0..46a570d50b 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md @@ -11,7 +11,7 @@ Passing an argument to `RANK`/`DENSE_RANK` is a non-standard extension in YQL. {% endnote %} -**Examples** +**Examples:** ```yql SELECT @@ -25,5 +25,4 @@ SELECT RANK() OVER w FROM my_table WINDOW w AS (ORDER BY my_column); - - +``` diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md index 49c93db7fc..7f1b758b67 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md @@ -2,7 +2,7 @@ Row number within a [partition](../../../syntax/window.md#partition). No arguments. -**Examples** +**Examples:** ```yql SELECT @@ -10,4 +10,3 @@ SELECT FROM my_table WINDOW w AS (ORDER BY key); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md index 241d78b744..6993f977d4 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md @@ -2,4 +2,3 @@ A non-standard window function `SessionState()` (without arguments) lets you get the session calculation status from [SessionWindow](../../../syntax/group_by.md#session-window) for the current row. It's allowed only if `SessionWindow()` is present in the `PARTITION BY` section in the window definition. - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/toc_i.yaml b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/toc_i.yaml index 9481cd1ccc..99ee69f245 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/toc_i.yaml +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/toc_i.yaml @@ -1,13 +1,13 @@ items: -- { name: Overview, href: index.md } -- { name: Basic, href: basic.md } -- { name: Aggregate, href: aggregation.md } -- { name: Window, href: window.md, when: feature_window_functions } -- { name: For lists, href: list.md } -- { name: For dictionaries, href: dict.md } -- { name: For structures, href: struct.md } -- { name: For types, href: types.md } -- { name: For code generation, href: codegen.md, when: feature_codegen } +- { name: Overview, href: index.md } +- { name: Basic, href: basic.md } +- { name: Aggregate, href: aggregation.md } +- { name: Window, href: window.md, when: feature_window_functions } +- { name: For lists, href: list.md } +- { name: For dictionaries, href: dict.md } +- { name: For structures, href: struct.md } +- { name: For types, href: types.md } +- { name: For code generation, href: codegen.md, when: feature_codegen } - { name: For JSON, href: json.md } - name: C++ libraries include: { mode: link, path: ../udf/list/toc_i.yaml }
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md index 0ee45fa2f3..9e19a988c5 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md @@ -18,4 +18,3 @@ DO BEGIN SELECT 2 -- here and in the previous example, you might omit ';' before END END DO ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md index 97ef941ee7..3f6c920d43 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md @@ -4,7 +4,7 @@ Specifies a named action that is a parameterizable block of multiple top-level e **Syntax** -1. `DEFINE ACTION`: action definition. +1. `DEFINE ACTION`: Action definition. 1. [Action name](../../expressions.md#named-nodes) that will be used to access the defined action further in the query. 1. The values of parameter names are listed in parentheses. 1. `AS` keyword. @@ -48,4 +48,3 @@ DO $hello_world(NULL); DO $hello_world("John"); DO $hello_world(NULL, "Earth"); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md index 1a69668908..f19b7e9d8e 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md @@ -3,18 +3,18 @@ `EVALUATE IF`: Executing an action depending on the condition. It's followed by: 1. Condition. -2. [DO](#do) with the name and parameters of the action or an anonymous action. -3. An optional `ELSE` followed by the second `DO` for a situation where the condition is not met. +1. [DO](#do) with the name and parameters of the action or an anonymous action. +1. An optional `ELSE` followed by the second `DO` for a situation where the condition is not met. ## EVALUATE FOR {#evaluate-for} -`EVALUATE FOR`: Executing an action for each item in the list. It's followed by: +`EVALUATE FOR`: Executing an action for each element in the list. It's followed by: 1. [A named expression](../../expressions.md#named-nodes) applied to each next element in the list. -2. `IN` keyword. -3. The above-declared named expression applied to the list the action is executed on. -4. [DO](#do) with the name and parameters of an action or an anonymous action. In the parameters, you can use both the current element from the first paragraph and any named expressions declared above, including the list itself. -5. An optional `ELSE` followed by the second `DO` for the situation when the list is empty. +1. `IN` keyword. +1. The above-declared named expression applied to the list the action is executed on. +1. [DO](#do) with the name and parameters of an action or an anonymous action. In the parameters, you can use both the current element from the first paragraph and any named expressions declared above, including the list itself. +1. An optional `ELSE` followed by the second `DO` for the situation when the list is empty. **Examples** @@ -73,4 +73,3 @@ ELSE Note that `EVALUATE` is run before the operation starts. Please also note that in `EVALUATE` you can't use [anonymous tables](../../select.md#temporary-tables). {% endnote %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md index 692ed59a08..4e63c175fa 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md @@ -55,7 +55,7 @@ ALTER TABLE old_table_name RENAME TO new_table_name; If a table with a new name exists, an error is returned. The possibility of transactional table substitution under load is supported by ad-hoc CLI and SDK methods. -If a YQL query contains multiple `ALTER TABLE ... RENAME TO ...` commands, each of them will be executed in autocommit mode as a separate transaction. From the external process viewpoint, the tables will be renamed sequentially one by one. To rename multiple tables within a single transaction, use ad-hoc methods available in the CLI and SDK. +If a YQL query contains multiple `ALTER TABLE ... RENAME TO ...` commands, each of them will be executed in autocommit mode as a separate transaction. From the external process viewpoint, the tables will be renamed sequentially one by one. To rename multiple tables within a single transaction, use ad-hoc methods available in the CLI and SDK. Renaming can be used to move a table from one directory inside the database to another, for example: diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md index 003af35c54..3d9d15c4df 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md @@ -15,7 +15,7 @@ DECLARE $named-node AS data_type; 1. `DECLARE` keyword. 1. `$named-node`: The name by which you can access the passed value. It must start with `$`. 1. `AS` keyword. -1. `data_type` is the data type [represented as a string in the accepted format](../../../types/type_string.md). +1. `data_type`: The data type [represented as a string in the accepted format](../../../types/type_string.md). Only serializable data types are allowed: @@ -33,4 +33,3 @@ DECLARE $z AS List<String>; SELECT $x, $y, $z; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md index e1f3edfeb5..9f51cbd49a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md @@ -2,7 +2,7 @@ Checking whether a value is in a range. It's equivalent to two conditions with `>=` and `<=` (range boundaries are included). Can be used with the `NOT` prefix to support inversion. -**Examples** +**Examples:** ```yql SELECT * FROM my_table diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md index 064bcb9a32..00535fe777 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md @@ -2,7 +2,7 @@ Performs a bitwise conversion of an integer value to the specified integer type. The conversion is always successful, but may lose precision or high-order bits. -**Examples** +**Examples:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md index 50ee8fd8cd..199c9e4990 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md @@ -6,7 +6,7 @@ The `ELSE` branch is mandatory in the `CASE` expression. Expressions in `WHEN` a Since its syntax is quite sophisticated, it's often more convenient to use the built-in function [IF](../../../builtins/basic.md#if). -**Examples** +**Examples:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md index 9820614f91..bd10a5fbf9 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md @@ -9,7 +9,7 @@ For more information about casting rules, see [here](../../../types/cast.md). {% include [decimal_args](../../../_includes/decimal_args.md) %} -**Examples** +**Examples:** {% include [cast_examples](../../../_includes/cast_examples.md) %} diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md index f540daa4a9..4e2f29e95b 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md @@ -6,7 +6,7 @@ * Patterns can include two special characters: * `%`: Zero or more of any characters. - * `_`: Exactly one of any character.
+ * `_`: Exactly one of any character. All other characters are literals that represent themselves. * As opposed to `REGEXP`, `LIKE` must be matched exactly. For example, to search a substring, add `%` at the beginning and end of the pattern. * `ILIKE` is a case-insensitive version of `LIKE`. @@ -15,7 +15,7 @@ All other characters are literals that represent themselves. The most popular way to use the `LIKE` and `REGEXP` keywords is to filter a table using the statements with the `WHERE` clause. However, there are no restrictions on using templates in this context: you can use them in most of contexts involving strings, for example, with concatenation by using `||`. -**Examples** +**Examples:** ```yql SELECT * FROM my_table diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md index bf77137627..7fee75d903 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md @@ -6,9 +6,9 @@ As with other binary operators, if the data on either side is `NULL`, the result Don't confuse this operator with a logical "or": in SQL, it's denoted by the `OR` keyword. It's also not worth doing concatenation using `+`. -**Examples** +**Examples:** -```sql +``` sql SELECT "fo" || "o"; ``` diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md index c0bd34f103..a341d3ab54 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md @@ -2,14 +2,14 @@ Checking whether a value is inside of a set of values. It's logically equivalent to a chain of equality comparisons using `OR` but implemented more efficiently. -{% note warning "Warning" %} +{% note warning %} Unlike a similar keyword in Python, in YQL `IN ` **DOES NOT** searches for a substring inside a string. To search for a substring, use the function [String::Contains](../../../udf/list/string.md) or [LIKE/REGEXP](#like) mentioned above. {% endnote %} -Immediately after `IN`, you can specify the `COMPACT` hint.
-If `COMPACT` is not specified, then `IN` with a subquery is executed as a relevant `JOIN` (`LEFT SEMI` for `IN` and `LEFT ONLY` for `NOT IN`), if possible.
+Immediately after `IN`, you can specify the `COMPACT` hint. +If `COMPACT` is not specified, then `IN` with a subquery is executed as a relevant `JOIN` (`LEFT SEMI` for `IN` and `LEFT ONLY` for `NOT IN`), if possible. Using the `COMPACT` hint forces the in-memory execution strategy: a hash table is immediately built from the contents of the right `IN` part in-memory, and then the left part is filtered. The `COMPACT` hint must be used with care. Since the hash table is built in-memory, the query may fail if the right part of `IN` contains many large or different elements. @@ -17,7 +17,7 @@ The `COMPACT` hint must be used with care. Since the hash table is built in-memo {% if feature_mapreduce %} Since YQL imposes a limit on the query size in bytes (it's about 1Mb), add large lists of values to your query by URLs and use the [ParseFile](../../../builtins/basic.md#parsefile) function. {% endif %} -**Examples** +**Examples:** ```yql SELECT column IN (1, 2, 3) diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md index f8242bf2f4..cf3d836419 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md @@ -2,7 +2,7 @@ Matching an empty value (`NULL`). Since `NULL` is a special value [equal to nothing](../../../types/optional.md#null_expr), the ordinary [comparison operators](#comparison-operators) can't be used to match it. -**Examples** +**Examples:** ```yql SELECT key FROM my_table diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md index 6f4c1d2ad3..c3a2ad7029 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md @@ -9,7 +9,7 @@ For accessing the values inside containers: When using this syntax to access containers within table columns, be sure to specify the full column name, including the table name or table alias separated by a dot (see the first example below). -**Examples** +**Examples:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md index bb4d836725..ca32ff8582 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md @@ -10,7 +10,7 @@ Only use pure expressions inside the lambda body (those might also be other lamb One or more of the last lambda parameters can be marked with a question mark as optional: if they haven't been specified when calling lambda, they are assigned the `NULL` value. -**Examples** +**Examples:** ```yql $f = ($y) -> { diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md index 523d28251e..1a5afb359e 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md @@ -52,7 +52,7 @@ If named expression substitution results in completely identical subgraphs in th {% endnote %} -**Examples** +**Examples:** ```yql $multiplier = 712; diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md index 36f0685055..bec469f869 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md @@ -6,7 +6,7 @@ The operators `+`, `-`, `*`, `/`, `%` are defined for [primitive data types](../ For the Decimal data type, bankers rounding is used (to the nearest even integer). -**Examples** +**Examples:** ```yql SELECT 2 + 2; @@ -23,7 +23,7 @@ The operators `=`, `==`, `!=`, `<>`, `>`, `<` are defined for: * Primitive data types except Yson and Json. * Tuples and structures with the same set of fields. No order is defined for structures, but you can check for (non-)equality. Tuples are compared element-by-element left to right. -**Examples** +**Examples:** ```yql SELECT 2 > 1; @@ -33,7 +33,7 @@ SELECT 2 > 1; Use the operators `AND`, `OR`, `XOR` for logical operations on Boolean values (`Bool`). -**Examples** +**Examples:** ```yql SELECT 3 > 0 AND false; @@ -45,10 +45,10 @@ Bitwise operations on numbers: * `&`, `|`, `^`: AND, OR, and XOR, respectively. Don't confuse bitwise operations with the related keywords. The keywords `AND`, `OR`, and `XOR` are used * for Boolean values only*, but not for numbers. * ` ~ `: A negation. -* `<`, `>`: Left or right shifts. -* `|<`, `>|`: Circular left or right shifts. +* `<<`, `>>`: Left or right shifts. +* `|<<`, `>>|`: Circular left or right shifts. -**Examples** +**Examples:** ```yql SELECT @@ -71,7 +71,7 @@ The operators in the table are listed in descending order of precedence. | Priority | Operator | Description | Associativity | | --- | --- | --- | --- | -| 1 | <code>a[], a.foo, a()</code> | Accessing a container item, calling a function | Left | +| 1 | <code>a[], a.foo, a()</code> | Accessing a container element, calling a function | Left | | 2 | <code>+a, -a, ~a, NOT a</code> | Unary operators: plus, minus, bitwise and logical negation | Right | | 3 | <code>a || b</code> | [String concatenation](#concatenation) | Left | | 4 | <code>a*b, a/b, a%b</code> | Multiplication, division, remainder of division | Left | diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md index cb6e91aa27..0ecf032e73 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md @@ -35,7 +35,7 @@ SELECT $process[0].key; -- that returns 1 SELECT FormatType(TypeOf($input)); -- throws an error: $input in a scalar context must contain one column ``` -{% note warning "Warning" %} +{% note warning %} A common error is to use an expression in a scalar context rather than a table context or vector context. For example: diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md index f4d50b811c..4cf9c91d79 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md @@ -7,17 +7,17 @@ Converts rows in the source table using vertical unpacking of [containers](../.. For example: * Source table: - |[a, b, c]|1| - | --- | --- | - |[d]|2| - |[]|3| +|[a, b, c]|1| +| --- | --- | +|[d]|2| +|[]|3| * The table resulting from `FLATTEN BY` on the left column: - |a|1| - | --- | --- | - |b|1| - |c|1| - |d|2| +|a|1| +| --- | --- | +|b|1| +|c|1| +|d|2| {% if feature_column_container_type != true %} @@ -65,7 +65,7 @@ This conversion can be convenient in the following cases: `FLATTEN BY` interprets [optional data types](../../../types/optional.md) as lists of length 0 or 1. The table rows with `NULL` are skipped, and the column type changes to a similar non-optional type. -`FLATTEN BY` makes only one conversion at a time, so use `FLATTEN LIST BY` or `FLATTEN OPTIONAL BY` on optional containers, for example,`Optional<List<String>>`. +`FLATTEN BY` makes only one conversion at a time, so use `FLATTEN LIST BY` or `FLATTEN OPTIONAL BY` on optional containers, for example, `Optional<List<String>>`. {% endnote %} diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md index 3692fe89ef..1a229f14d5 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md @@ -1,8 +1,7 @@ ### Analogs of FLATTEN BY in other DBMS {#flatten-other-dmb} -* PostgreSQL: `unnest` -* Hive: `LATERAL VIEW` -* MongoDB: `unwind` -* Google BigQuery: `FLATTEN` -* ClickHouse: `ARRAY JOIN / arrayJoin` - +* PostgreSQL: `unnest`. +* Hive: `LATERAL VIEW`. +* MongoDB: `unwind`. +* Google BigQuery: `FLATTEN`. +* ClickHouse: `ARRAY JOIN / arrayJoin`. diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md index 9070a7cb22..7634b231a3 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md @@ -8,9 +8,9 @@ Applying `DISTINCT` to calculated values is not currently implemented. For this {% endnote %} -**Example** +**Example:** -```sql +``` sql SELECT key, COUNT (DISTINCT value) AS count -- top 3 keys by the number of unique values diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md index bb3e7fa1ac..25b44dbf56 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md @@ -15,8 +15,8 @@ SELECT -- In SELECT, you can use: FROM table GROUP BY column1, column2, ..., - <expr> AS key_n -- When grouping by expression, you can set a name for it using AS, - -- and use it in SELECT + <expr> AS key_n -- When grouping by expression, you can set a name for it using AS, + -- and use it in SELECT ``` The query in the format `SELECT * FROM table GROUP BY k1, k2, ...` returns all columns listed in GROUP BY, i.e., is equivalent to `SELECT DISTINCT k1, k2, ... FROM table`. @@ -31,7 +31,7 @@ Aggregate functions ignore `NULL` in their arguments, except for `COUNT`. YQL also provides aggregation factories implemented by the functions [`AGGREGATION_FACTORY`](../../../builtins/basic.md#aggregationfactory) and [`AGGREGATE_BY`](../../../builtins/aggregation.md#aggregateby). -**Examples** +**Examples:** ```sql SELECT key, COUNT(*) FROM my_table @@ -58,7 +58,7 @@ GROUP BY subkey as sk, ``` -{% note warning "Attention" %} +{% note warning %} Specifying a name for a column or expression in `GROUP BY .. AS foo` it is an extension on top of YQL. Such a name becomes visible in `WHERE` despite the fact that filtering by `WHERE` is executed [before](../../select.md#selectexec) the grouping. For example, if the `T` table includes two columns, `foo` and `bar`, then the query `SELECT foo FROM T WHERE foo > 0 GROUP BY bar AS foo` would actually filter data by the `bar` column from the source table. diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md index 9667097c43..4514e14280 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md @@ -54,6 +54,6 @@ SELECT STREAM FROM my_stream GROUP BY key + key AS double_key, - HOP(ts, "PT1М", "PT1M", "PT1M"); + HOP(ts, "PT1M", "PT1M", "PT1M"); ``` diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md index 5eca8c3171..93582e00f2 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md @@ -2,7 +2,7 @@ Filtering a `SELECT` based on the calculation results of [aggregate functions](../../../builtins/aggregation.md). The syntax is similar to [WHERE](../../select.md#where). -**Example** +**Example:** ```yql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md index d2c73fa0db..036701b67a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md @@ -31,7 +31,7 @@ The values of columns not used in calculations are replaced with `NULL` in the s * `0`: If `NULL` is used for the original empty value. * `1`: If `NULL` is added for a subtotal or overall total. -**Example** +**Example:** ```sql SELECT diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md index 28efac179d..902009abcd 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md @@ -19,28 +19,28 @@ The following happens in this case: If `GROUP BY` includes nothing more than SessionWindow, then the input table gets into one partition. 2) Each partition is split into disjoint subsets of rows (sessions). For this, the partition is sorted in the ascending order of the `time_expr` expression. - The session limits are drawn between neighboring items of the partition, that differ in their `time_expr` values by more than `timeout_expr`. + The session limits are drawn between neighboring elements of the partition, that differ in their `time_expr` values by more than `timeout_expr`. 3) The sessions obtained in this way are the final partitions on which aggregate functions are calculated. The SessionWindow() key column (in the example, it's `session_start`) has the value "the minimum `time_expr` in the session". -If `GROUP BY` includes SessionWindow(), you can use a special aggregate function [SessionStart](../../../builtins/aggregation.md#session-start). +If `GROUP BY` includes SessionWindow(), you can use a special aggregate function +[SessionStart](../../../builtins/aggregation.md#session-start). An extended version of SessionWindow with four arguments is also supported: `SessionWindow(<order_expr>, <init_lambda>, <update_lambda>, <calculate_lambda>)` Where: - -* `<order_expr>`: An expression used to sort the source partition -* `<init_lambda>`: A lambda function to initialize the state of session calculation. It has the signature `(TableRow())->State`. It's called once for the first (following the sorting order) element of the source partition +* `<order_expr>`: An expression used to sort the source partition. +* `<init_lambda>`: A lambda function to initialize the state of session calculation. It has the signature `(TableRow())->State`. It's called once for the first (following the sorting order) element of the source partition. * `<update_lambda>`: A lambda function to update the status of session calculation and define the session limits. It has the signature `(TableRow(), State)->Tuple<Bool, State>`. It's called for every item of the source partition, except the first one. The new value of state is calculated based on the current row of the table and the previous state. If the first item in the return tuple is `True`, then a new session starts from the _current_ row. The key of the new session is obtained by applying `<calculate_lambda>` to the second item in the tuple. * `<calculate_lambda>`: A lambda function for calculating the session key (the "value" of SessionWindow() that is also accessible via SessionStart()). The function has the signature `(TableRow(), State)->SessionKey`. It's called for the first item in the partition (after `<init_lambda>`) and those items for which `<update_lambda>` has returned `True` in the first item in the tuple. Please note that to start a new session, you should make sure that `<calculate_lambda>` has returned a value different from the previous session key. Sessions having the same keys are not merged. For example, if `<calculate_lambda>` returns the sequence `0, 1, 0, 1`, then there will be four different sessions. Using the extended version of SessionWindow, you can, for example, do the following: divide a partition into sessions, as in the SessionWindow use case with two arguments, but with the maximum session length limited by a certain constant: -**Example** +**Example:** -```sql +``` sql $max_len = 1000; is the maximum session length. $timeout = 100; is the timeout (timeout_expr in a simplified version of SessionWindow). @@ -62,4 +62,3 @@ GROUP BY user, SessionWindow(ts, $init, $update, $calculate) AS session_start ``` You can use SessionWindow in GROUP BY only once. - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md index c4e39dacec..cb962c4cc0 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md @@ -80,7 +80,7 @@ LEFT JOIN c_table AS c ON c.ref = a.key and c.column1 = b.value; If the statement filters data in addition to `JOIN`, we recommend that you wrap the criteria that would return `true` for most of the rows in the `LIKELY(...)` function call. If your assumption that positive values prevail for the criteria is correct, such a hint might speed up your query. `LIKELY` can be useful when the predicate calculation is a resource-intensive operation and JOIN significantly reduces the number of rows. In front of any data source for `JOIN`, you can add the `ANY` keyword to suppress duplicate `JOIN` keys on the given side. In this case, only one row is left from the set of rows with the same `JOIN` key value (no matter which one, that's why the keyword is called `ANY`). -This differs from the [ClickHouse](https://clickhouse.tech/docs/ru/sql-reference/statements/select/join/) syntax where `ANY` precedes the `JOIN` type and only applies to the right side. +This syntax differs from the one used in [ClickHouse]{% if lang == "en" %}(https://clickhouse.com/docs/en/sql-reference/statements/select/join/){% endif %}{% if lang == "ru" %}(https://clickhouse.tech/docs/ru/sql-reference/statements/select/join/){% endif %}where `ANY` is placed before the `JOIN` type and applies to the right side only. Request diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md index 8b7cb79647..7bc2c9941e 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md @@ -3,39 +3,37 @@ ## Debugging and auxiliary settings {#debug} {% if feature_webui %} - ### `DirectRead` | Value type | Default | -| --- | --- | -| Flag | false | +| ---------- | ------- | +| Flag | false | An auxiliary setting for previewing tables in the [HTTP API](../../../interfaces/http.md) (both for the web interface and console client). {% endif %} ### `config.flags("ValidateUdf", "Lazy")` -| Value type | Default | -| --- | --- | -| String: None/Lazy/Greedy | None | +| Value type | Default | +| ------------------------ | ------- | +| String: None/Lazy/Greedy | None | Validating whether UDF results match the declared signature. The Greedy mode enforces materialization of lazy containers, although the Lazy mode doesn't. ### `{{ backend_name_lower }}.DefaultCluster` -| Value type | Default | -| --- | --- | -| A string with the cluster name | hahn | +| Value type | Default | +| ------------------------------ | ------- | +| A string with the cluster name | hahn | Selecting a cluster for calculations that don't access tables. ### `config.flags("Diagnostics")` | Value type | Default | -| --- | --- | -| Flag | false | +| ---------- | ------- | +| Flag | false | Getting diagnostic information from YQL as an additional result of a query. {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md index dcc3cbe888..02ad9b8ff8 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md @@ -12,7 +12,7 @@ Redefinition of settings. * `Kb`, `Mb`, `Gb`: For the data amounts. * `sec`, `min`, `h`, `d`: For the time values. -**Examples** +**Examples:** ```yql PRAGMA AutoCommit; @@ -36,4 +36,3 @@ Unless otherwise specified, a pragma affects all the subsequent expressions up t If necessary and logically possible, you can change the value of this setting several times within a given query to make it different at different execution steps. There are also special scoped pragmas with the scope defined by the same rules as the scope of [named expressions](../../expressions.md#named-nodes). Unlike scoped pragmas, regular pragmas can only be used in the global scope (not inside lambda functions, ACTION{% if feature_subquery %}, SUBQUERY{% endif %}, etc.). - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md index 835e96ce40..6579feef5f 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md @@ -27,7 +27,6 @@ Attach a set of files to the query by URL. Works similarly to adding multiple fi | One or two arguments: the file name and an optional URL | — | Static | Treat the specified attached file as a library from which you can do [IMPORT](../../export_import.md). The syntax type for the library is determined from the file extension: - * `.sql`: For the YQL dialect of SQL <span style="color: green;">(recommended)</span>. * `.yql`: For [s-expressions](/docs/s_expressions). @@ -57,4 +56,3 @@ SELECT $x; ``` {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md index d4f32ba914..5a812939ea 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md @@ -67,7 +67,7 @@ When set to "auto", it enables a new compute engine. Computing is made, whenever When you use `SELECT foo.* FROM ... AS foo`, remove the `foo.` prefix from the names of the result columns. -It can be also used with a [JOIN](../../join.md), but in this case it may fail in the case of a name conflict (that can be resolved by using [WITHOUT](../../select.md#without) and renaming columns). For JOIN in SimpleColumns mode, an implicit Coalesce is made for key columns: the query `SELECT * FROM T1 AS a JOIN T2 AS b USING(key)` in the SimpleColumns mode works same as `SELECT a.key ?? b.key AS key, ... FROM T1 AS a JOIN T2 AS b USING(key)` +It can be also used with a [JOIN](../../join.md), but in this case it may fail in the case of a name conflict (that can be resolved by using [WITHOUT](../../select.md#without) and renaming columns). For JOIN in SimpleColumns mode, an implicit Coalesce is made for key columns: the query `SELECT * FROM T1 AS a JOIN T2 AS b USING(key)` in the SimpleColumns mode works same as `SELECT a.key ?? b.key AS key, ... FROM T1 AS a JOIN T2 AS b USING(key)`. ### CoalesceJoinKeysOnQualifiedAll @@ -77,7 +77,7 @@ It can be also used with a [JOIN](../../join.md), but in this case it may fail i | --- | --- | | Flag | true | -Controls implicit Coalesce for the key `JOIN` columns in the SimpleColumns mode. If the flag is set, the Coalesce is made for key columns if there is at least one expression in the format `foo.*` or `*` in SELECT: for example, `SELECT a.* FROM T1 AS a JOIN T2 AS b USING(key)`. If the flag is not set, then Coalesce for JOIN keys is made only if there is an asterisk '*' after `SELECT` +Controls implicit Coalesce for the key `JOIN` columns in the SimpleColumns mode. If the flag is set, the Coalesce is made for key columns if there is at least one expression in the format `foo.*` or `*` in SELECT: for example, `SELECT a.* FROM T1 AS a JOIN T2 AS b USING(key)`. If the flag is not set, then Coalesce for JOIN keys is made only if there is an asterisk '*' after `SELECT`. ### StrictJoinKeyTypes @@ -116,7 +116,7 @@ For more information about the `IN` behavior when operands include `NULL`s, see Aligns the RANK/DENSE_RANK behavior with the standard if there are optional types in the window sort keys or in the argument of such window functions. It means that: -* The result type is always Uint64 rather than Uint64?; +* The result type is always Uint64 rather than Uint64?. * NULLs in keys are treated as equal to each other (the current implementation returns NULL). You can explicitly select the old behavior by using the `DisableAnsiRankForNullableKeys` pragma. If no pragma is set, then a warning is issued and the old version works. @@ -201,4 +201,3 @@ Increasing the limit on the number of dimensions in [GROUP BY](../../group_by.md Use this option with care, because the computational complexity of the query grows exponentially with the number of dimensions. {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md index 1cca5678d8..1a3405eae0 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md @@ -11,4 +11,3 @@ An experimental pragma that allows you to reduce the isolation level of the current YDB transaction. {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md index 50058c132f..1a6ae1786a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md @@ -25,4 +25,3 @@ Strict mode control in all Yson UDF calls, including implicit calls. If the valu | Flag | false | An inverted version of `yson.Strict`. If the value is omitted or is `"true"`, it disables the strict mode. If the value is `"false"`, it enables the strict mode. - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md index 4a4cf40498..1bf5b933a5 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md @@ -11,4 +11,3 @@ SELECT key || "suffix" as key, -CAST(subkey as Int32) as subkey FROM my_table ASSUME ORDER BY key, subkey DESC; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md index 09bc26c7f5..7f4a575419 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md @@ -13,4 +13,3 @@ SELECT "Hello, world!"; ```yql SELECT 2 + 2; ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md index d6768bea13..62ab9ee3d7 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md @@ -11,14 +11,14 @@ The column order is ignored in YQL by default: If you enable `PRAGMA OrderedColumns;`, the order of columns is preserved in the query results and is derived from the order of columns in the input tables using the following rules: * `SELECT`: an explicit column enumeration dictates the result order. -* `SELECT` with an asterisk (`SELECT * FROM ...`) inherits the order from its input. {% if feature_join %}* The order of columns after [JOIN](../../join.md): First output the left-hand columns, then the right-hand ones. If the column order in any of the sides in the `JOIN` output is undefined, the column order in the result is also undefined.{% endif %} +* `SELECT` with an asterisk (`SELECT * FROM ...`) inherits the order from its input. +{% if feature_join %}* The order of columns after [JOIN](../../join.md): First output the left-hand columns, then the right-hand ones. If the column order in any of the sides in the `JOIN` output is undefined, the column order in the result is also undefined.{% endif %} * The order in `UNION ALL` depends on the [UNION ALL](#unionall) execution mode. * The column order for [AS_TABLE](#as_table) is undefined. -{% note warning "Attention" %} +{% note warning %} In the YT table schema, key columns always precede non-key columns. The order of key columns is determined by the order of the composite key. When `PRAGMA OrderedColumns;` is enabled, non-key columns preserve their output order. {% endnote %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md index 0f42606613..1bb572b18f 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md @@ -13,5 +13,4 @@ INSERT INTO result2 SELECT * FROM my_table; COMMIT; -- result2 will already include the SELECT contents from the second line: INSERT INTO result3 SELECT * FROM result2; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md index 4c1a31cc9b..e3fa933e29 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md @@ -8,12 +8,11 @@ Applying `DISTINCT` to calculated values is not currently implemented. For this {% endnote %} -**Example** +**Example:** ```yql SELECT DISTINCT value -- only unique values from the table FROM my_table; ``` -The `DISTINCT` keyword can also be used to apply [aggregate functions](../../../builtins/aggregation.md) only to distinct values. For more information, see the documentation for [GROUP BY](../../group_by.md). - +The `DISTINCT` keyword can also be used to apply [aggregate functions](../../../builtins/aggregation.md) only to distinct values. For more information, see the documentation for [GROUP BY](../../group_by.md).
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md index f41354bb83..6419d5108a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md @@ -4,17 +4,16 @@ The `SELECT` query result is calculated as follows: * Determine the set of input tables by evaluating the [FROM](#from) clauses. * Apply [SAMPLE](#sample)/[TABLESAMPLE](#sample) to input tables. -* Execute [FLATTEN COLUMNS](../../flatten.md#flatten-columns) or [FLATTEN BY](../../flatten.md); aliases set in `FLATTEN BY` become visible after this point. +* Execute [FLATTEN COLUMNS](../../flatten.md#flatten-columns) or [FLATTEN BY](../../flatten.md); the aliases set in `FLATTEN BY` become visible after this point. {% if feature_join %}* Execute every [JOIN](../../join.md).{% endif %} * Add to (or replace in) the data the columns listed in [GROUP BY ... AS ...](../../group_by.md). * Execute [WHERE](#where) — Discard all the data mismatching the predicate. * Execute [GROUP BY](../../group_by.md), evaluate aggregate functions. * Apply the filter [HAVING](../../group_by.md#having). -{% if feature_window_functions %} * values of [window functions](../../window.md) are calculated.{% endif %} +{% if feature_window_functions %} * Evaluate [window functions](../../window.md).{% endif %} * Evaluate expressions in `SELECT`. * Assign names set by aliases to expressions in `SELECT`. * Apply top-level [DISTINCT](#distinct) to the resulting columns. * Execute similarly every subquery inside [UNION ALL](#unionall), combine them (see [PRAGMA AnsiOrderByLimitInUnionAll](../../pragma.md#pragmas)). * Perform sorting with [ORDER BY](#order-by). -* Apply [OFFSET and LIMIT](#limit-offset) to the result. - +* Apply [OFFSET and LIMIT](#limit-offset) to the result.
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md index 436de60509..2dda348156 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md @@ -40,5 +40,4 @@ $table_paths = ( ); SELECT COUNT(*) FROM EACH($table_paths); -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md index 65b9356c6e..9560572640 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md @@ -4,7 +4,7 @@ Data source for `SELECT`. The argument can accept the table name, the result of {% if feature_mapreduce %}The table is searched by name in the database specified by the operator [USE](../../use.md).{% endif %} -**Examples** +**Examples:** ```yql SELECT key FROM my_table; @@ -18,5 +18,4 @@ SELECT * FROM ```yql $table_name = "my_table"; SELECT * FROM $table_name; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md index c5fe4b8f2b..f5d90c4c67 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md @@ -2,9 +2,9 @@ Accessing named expressions as tables using the `AS_TABLE` function. -`AS_TABLE($variable)` lets you use the value of `$variable` as the data source for the query. In this case, the variable `$variable` must have the type `List>>`. +`AS_TABLE($variable)` lets you use the value of `$variable` as the data source for the query. In this case, the variable `$variable` must have the type `List<Struct<...>>`. -**Example** +**Example:** ```yql $data = AsList( @@ -13,5 +13,4 @@ $data = AsList( AsStruct(3u AS Key, "v3" AS Value)); SELECT Key, Value FROM AS_TABLE($data); -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md index 386e5ca429..5e8121a416 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md @@ -2,7 +2,7 @@ An inverted format, first specifying the data source and then the operation. -**Examples** +**Examples:** ```yql FROM my_table SELECT key, value; @@ -13,5 +13,4 @@ FROM a_table AS a JOIN b_table AS b USING (key) SELECT *; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md index b084524013..2219b99023 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md @@ -18,7 +18,7 @@ The following functions are defined for these purposes: ```FILTER(`prefix`, `callable`, `suffix`, `view`)```: The `callable` argument must be a callable expression with the `(String)->Bool` signature that will be called for each table/subdirectory in the prefix folder. The query will only include those tables for which the callable value returned `true`. It is most convenient to use, as callable values, [lambda functions](../../expressions.md#lambda){% if yql == true %} or user-defined functions (UDF) written in [Python](../../../udf/python.md) or [JavaScript](../../../udf/javascript.md){% endif %}. -{% note warning "Attention" %} +{% note warning %} All of the above functions don't guarantee the order of the table union. @@ -110,5 +110,4 @@ SELECT * FROM FILTER( `my_folder`, $callable ); -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md index 17de5253c0..d55c2ecf0a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md @@ -2,9 +2,9 @@ `LIMIT` limits the output to the specified number of rows. By default, the output is not restricted. -`OFFSET`: specifies the offset from the beginning (in rows). By default, it's zero. +`OFFSET` specifies the offset from the beginning (in rows). By default, it's zero. -**Examples** +**Examples:** ```yql SELECT key FROM my_table @@ -19,5 +19,4 @@ LIMIT 7 OFFSET 3; ```yql SELECT key FROM my_table LIMIT 3, 7; -- equivalent to the previous example -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md index 2390f02238..bb43b3186f 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md @@ -3,21 +3,18 @@ Sorting the `SELECT` result using a comma-separated list of sorting criteria. As a criteria, you can use a column value or an expression on columns. Ordering by column sequence number is not supported (`ORDER BY N`where `N` is a number). Each criteria can be followed by the sorting direction: - -- `ASC`: Sorting in the ascending order. Applied by default. -- `DESC`: Sorting in the descending order. +* `ASC`: Sorting in the ascending order. Applied by default. +* `DESC`: Sorting in the descending order. Multiple sorting criteria will be applied left-to-right. -**Example** +**Example:** ```yql SELECT key, string_column FROM my_table ORDER BY key DESC, LENGTH(string_column) ASC; ``` - {% if feature_window_functions %} -You can also use `ORDER BY` for [window functions](../../window.md). -{% endif %} - +You can use `ORDER BY` also for [window functions](../../window.md). +{% endif %}
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md index dc706d2c75..4574b8a2ac 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md @@ -38,5 +38,4 @@ TABLESAMPLE SYSTEM(1.0); -- about one percent of the table SELECT * FROM my_table SAMPLE 1.0 / 3; -- one-third of the table -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md index 30da15826d..2d5e58989e 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md @@ -8,7 +8,7 @@ SELECT * WHERE … ``` -**Examples** +**Examples:** * Select all the fields from the `series` table using the `views_index` index with the `views >=someValue` criteria: @@ -26,5 +26,4 @@ SELECT * INNER JOIN users VIEW name_index AS t2 ON t1.uploaded_user_id == t2.user_id WHERE t2.name == userName; - ``` - + ```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md index 0117bfd058..f4de7a5d54 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md @@ -30,5 +30,4 @@ SELECT 1 AS one, 2 AS two, 3 AS three; COMMIT; SELECT * FROM @$tmp_name; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md index 505dc1f182..5d93b113d1 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md @@ -12,7 +12,6 @@ The order of output columns in this mode is equal to the largest common prefix o If the largest common prefix is empty (for example, if the order isn't specified for one of the inputs), then the output order is undefined. In the "by position" mode, the output of the resulting data schema uses the following rules: - * All inputs must have equal number of columns * The order of columns must be defined for all inputs * The names of the resulting columns must match the names of columns in the first table @@ -20,7 +19,7 @@ In the "by position" mode, the output of the resulting data schema uses the foll The order of the output columns in this mode is the same as the order of columns in the first input. -**Examples** +**Examples:** ```yql SELECT 1 AS x @@ -30,7 +29,7 @@ UNION ALL SELECT 3 AS z; ``` -In the default mode, this query returns a selection with three columns x, y, and z. When `PRAGMA PositionalUnionAll;` is enabled, the selection only includes the x column. +In the default mode, this query returns a selection with three columns x, y, and z. When `PRAGMA PositionalUnionAll;` is enabled, the selection includes only the x column. ```yql PRAGMA PositionalUnionAll; @@ -38,5 +37,4 @@ PRAGMA PositionalUnionAll; SELECT 1 AS x, 2 as y UNION ALL SELECT * FROM AS_TABLE([<|x:3, y:4|>]); -- error: the order of columns in AS_TABLE is undefined -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md index 7c41e08bf8..7fdbe70a31 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md @@ -1,5 +1,4 @@ * The resulting table includes all columns that were found in at least one of the input tables. * If a column wasn't present in all the input tables, then it's automatically assigned the [optional data type](../../../types/optional.md) (that can accept `NULL`). * If a column in different input tables had different types, then the shared type (the broadest one) is output. -* If a column in different input tables had a heterogeneous type, for example, string and numeric, an error is raised. - +* If a column in different input tables had a heterogeneous type, for example, string and numeric, an error is raised.
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md index 193e6d526b..4286c475f1 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md @@ -19,5 +19,4 @@ If the meta attributes of the table specify an automatic UDF call to convert raw USE some_cluster; SELECT * FROM my_table VIEW my_view; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md index 3c5e5bf18b..ac2aabe77b 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md @@ -2,10 +2,9 @@ Filtering rows in the `SELECT` result based on a condition. -**Example** +**Example:** ```yql SELECT key FROM my_table WHERE value > 0; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md index b99e65fd32..1d6be48d85 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md @@ -39,5 +39,4 @@ SELECT key, value FROM my_table WITH COLUMNS Struct<value:Int32?>; ```yql SELECT key, value FROM EACH($my_tables) WITH SCHEMA Struct<key:String, value:List<Int32>>; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md index f61e5e9625..b3c5306469 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md @@ -2,7 +2,7 @@ Excluding columns from the result of `SELECT *`. -**Examples** +**Examples:** ```yql SELECT * WITHOUT foo, bar FROM my_table; @@ -12,5 +12,4 @@ SELECT * WITHOUT foo, bar FROM my_table; PRAGMA simplecolumns; SELECT * WITHOUT t.foo FROM my_table AS t CROSS JOIN (SELECT 1 AS foo) AS v; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md index f9e2f51a7a..4bf1e4e3ee 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md @@ -29,7 +29,7 @@ Even if the list of parameters in the subquery template definition is empty, whe {% if feature_mapreduce %} In some cases, instead of `DEFINE SUBQUERY` it's more convenient to use an equivalent [lambda function](../expressions.md#lambda). -In this case, the lambda function must accept, as the first argument, the special object called `world` that passes dependencies to make certain PRAGMA or COMMIT statements visible at the query template's point of use. Also, make sure to pass this object as the first argument along with the other arguments (if any) to other query templates, if you use them in your lambda function. +In this case, the lambda function must accept, as the first argument, the special object called `world` that passes dependencies to make certain PRAGMA or COMMIT statements visible at the query template's point of use. Make also sure to pass this object as the first argument along with the other arguments (if any) to other query templates, if you use them in your lambda function. The return value of the lambda function must have the structure list type (output table) or a list of variants over a tuple of structures (multiple output tables). In the latter case, the following unpacking is usually used at the query template's point of use: ```yql @@ -199,4 +199,3 @@ $sub2 = SubqueryOrderBy($sub, [('x',false), ('y',true)]); PROCESS $sub2(); ``` - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/upsert_into.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/upsert_into.md index 53b3c767f1..775f009a08 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/upsert_into.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/upsert_into.md @@ -5,7 +5,7 @@ Adds or updates multiple rows in a table based on primary key matching. Missing {% if feature_mapreduce %} The table is searched by name in the database specified by the [USE](../use.md) operator.{% endif %} {% if feature_replace %} -`UPSERT` and [`REPLACE`](../replace_into.md) are data modification operations that don't require a prefetch and run faster and cheaper than other operations because of that. +`UPSERT` and [`REPLACE`](../replace_into.md) are data modification operations that don't require a pre-fetch and run faster and cheaper than other operations because of that. {% else %} `UPSERT` is the only data modification operation that doesn't require prefetching and runs faster and cheaper than other operations because of that. {% endif %} diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/window.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/window.md index 2176228d10..f406bebf29 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/window.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/window.md @@ -83,7 +83,7 @@ The set of rows in the window frame may change depending on which row is the cur Setting `UNBOUNDED PRECEDING` as the frame start means "from the first partition row" and `UNBOUNDED FOLLOWING` as the frame end — "up to the last partition row". Setting `CURRENT ROW` means "from/to the current row". -If no `frame_definition` is specified, a set of rows to be included in the window frame depends on whether there is `ORDER BY` in the `window_definition`.
+If no `frame_definition` is specified, a set of rows to be included in the window frame depends on whether there is `ORDER BY` in the `window_definition`. Namely, if there is `ORDER BY`, then `ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW` is implicitly assumed. If none, then `ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING`. Further, depending on the specific window function, it's calculated either based on the set of rows in the partition or the set of rows in the window frame. diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md index e3bce9d7dd..a381efbc22 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md @@ -29,4 +29,3 @@ {% include [x](_includes/expressions/lambda.md) %} {% include [x](_includes/expressions/items-access.md) %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md index 3594e5b469..af923dcb90 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md @@ -53,4 +53,3 @@ {% if feature_mapreduce %} * [EXPORT and IMPORT](export_import.md) {% endif %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md index ed23eefd90..fda95879dd 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md @@ -47,4 +47,3 @@ {% include [x](_includes/select/temporary_table.md) %} {% include [x](_includes/select/from_as_table.md) %} - diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml index 23ec63ac5e..a551690344 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml @@ -14,7 +14,7 @@ items: - { name: FLATTEN, href: flatten.md } - { name: INSERT, href: insert_into.md } - { name: INTO RESULT, href: into_result.md } -- { name: JOIN, href: join.md, when: feature_join } +- { name: JOIN, href: join.md, when: feature_join } - { name: PRAGMA, href: pragma.md } - { name: PROCESS STREAM, href: process.md, when: feature_mapreduce and process_command == "PROCESS STREAM" } - { name: PROCESS, href: process.md, when: feature_mapreduce and process_command == "PROCESS" } @@ -28,4 +28,4 @@ items: - { name: USE, href: use.md, when: feature_mapreduce } - { name: VALUES, href: values.md } - { name: WINDOW, href: window.md, when: feature_window_functions } -- { name: Unsupported statements, href: not_yet_supported.md } +- { name: Unsupported statements, href: not_yet_supported.md } diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md index b89466dfc8..cd112ee587 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md @@ -27,8 +27,8 @@ SELECT ### Rules for List/Dict -* To create a list, `CAST` is applied to each item in the source list to cast it to the target type. -* If the target item type is non-optional and `CAST` on the item might fail, then such casting is discarded. In this case, the resulting list might be shorter or even empty if every casting failed. +* To create a list, `CAST` is applied to each element in the source list to cast it to the target type. +* If the target element type is non-optional and `CAST` on the element might fail, then such casting is discarded. In this case, the resulting list might be shorter or even empty if every casting failed. * For dictionaries, the casting is totally similar to lists, with `CAST` being applied to keys and values. ```yql @@ -42,7 +42,7 @@ SELECT ### Rules for Struct/Tuple -* A structure or tuple is created by applying `CAST` to each item of the source type to cast it to an item with the same name or target type index. +* A structure or tuple is created by applying `CAST` to each element of the source type to cast it to an element with the same name or target type index. * If some field is missing in the target type, it's simply discarded. * If some field is missing in the source value type, then it can be added only if it's optional and accepts the `NULL` value. * If some field is non-optional in the target type, but its casting might fail, then `CAST` adds Optional to the structure or tuple level and might return `NULL` for the entire result. @@ -53,7 +53,7 @@ SELECT CAST((-2, 0) AS Tuple<Uint16, Utf8>), -- null CAST((3, 4) AS Tuple<Uint16, String>), -- (3, "4"): the type is Tuple<Uint16, String>? CAST(("4",) AS Tuple<Uint16, String?>), -- (4, null) - CAST((5, 6, null) AS Tuple<Uint8?>); -- (5,): the items were removed. + CAST((5, 6, null) AS Tuple<Uint8?>); -- (5,): the elements were removed. SELECT -- One field was removed and one field was added: ("three":null, "two": "42") CAST(<|one:"8912", two:42|> AS Struct<two:Utf8, three:Date?>); diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md index b9146a071d..69dc03e12a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md @@ -4,7 +4,7 @@ | ------------ | ---------------- | ------------- | | List | `List<Type>`,</br>`List<Int32>` | A variable-length sequence consisting of same-type elements. | | Dictionary | `Dict<KeyType, ValueType>`,</br>`Dict<String,Int32>` | Set of key-value pairs with a fixed type of keys and values. | -| Set | `Set<KeyType>`,</br>`Set<String>` | A set of elements with a fixed type is a special case of a dictionary with the `Void` value type. | +| Set | `Set<KeyType>`,</br>`Set<String>` | A set of elements with a fixed type is a special case of a dictionary with the `Void` type of values. | | Tuple | `Tuple<Type1, ..., TypeN>`,</br>`Tuple<Int32,Double>` | Set of unnamed fixed-length elements with types specified for all elements. | | Structure | `Struct<Name1:Type1, ..., NameN:TypeN>`,</br> `Struct<Name:String,Age:Int32>` | A set of named fields with specified value types, fixed at query start (must be data-independent). | | Stream | `Stream<Type>`,</br> `Stream<Int32>` | Single-pass iterator by same-type values, not serializable | diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md index 43f545cb85..e2d00e1d57 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md @@ -14,6 +14,6 @@ | `Decimal` | A real number with the specified precision, up to 35 decimal digits | {% if feature_map_tables %}When used in table columns, precision is fixed: Decimal (22,9).</br>Can't be used in the primary key{% endif %} | {% if feature_map_tables %} -`DyNumber` | A binary representation of a real number with an accuracy of up to 38 digits.<br/>Acceptable values: positive numbers from 1×10<sup>-130</sup> up to 1×10<sup>126</sup>–1, negative numbers from -1×10<sup>126</sup>–1 to -1×10<sup>-130</sup>, and 0.<br/>Compatible with the `Number` type in AWS DynamoDB. It's not recommended for {{ backend_name_lower }}-native applications. | +| `DyNumber` | A binary representation of a real number with an accuracy of up to 38 digits.<br/>Acceptable values: positive numbers from 1×10<sup>-130</sup> up to 1×10<sup>126</sup>–1, negative numbers from -1×10<sup>126</sup>–1 up to -1×10<sup>-130</sup>, and 0.<br/>Compatible with the `Number` type in AWS DynamoDB. It's not recommended for {{ backend_name_lower }}-native applications. | {% endif %} diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md index 95d59aafc6..0fbfd8e255 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md @@ -7,7 +7,7 @@ | `Yson` | [YSON](https://yt.yandex-team.ru/docs/description/common/yson.html) in a textual or binary representation. | Doesn't support matching{% if feature_map_tables %}, can't be used in the primary key{% endif %} | | `Uuid` | Universally unique identifier [UUID](https://tools.ietf.org/html/rfc4122) | Not supported for table columns | -{% note info "Cell size restrictions" %} +{% note info %} The maximum value size for a {% if feature_map_tables %}non-key {% endif %} column cell with any string data type is 8 MB. diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md index c449e86bb0..e0be51a469 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md @@ -28,7 +28,7 @@ Unsigned integer types. Real 4-byte number. -* Type in JSON: `number`. +* Type in JSON — `number`. * Sample {{ backend_name }} value: `0.12345679`. * Sample JSON value: `0.12345679`. diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md index 17791bc2f9..0560c4a57a 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md @@ -42,7 +42,7 @@ Explicit casting using [CAST](../../syntax/expressions.md#cast): | **Timestamp** | No | Yes | Yes | Yes | Yes | No | | **Interval** | No | Yes | Yes | Yes | Yes | No | -<sup>1</sup> `True` is converted to `1` and `False` to `0`. +<sup>1</sup> `True` is converted to `1`, `False` is converted to `0`. <sup>2</sup> Any value other than `0` is converted to `True`, `0` is converted to `False`. <sup>3</sup> Possible only in the case of a non-negative value. <sup>4</sup> Using the built-in function [Yson::ConvertTo](../../udf/list/yson.md#ysonconvertto). diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md index 8298c9d2f9..d574f82672 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md @@ -68,7 +68,7 @@ Functions for ASCII strings: The third argument includes the following parameters: - DelimeterString:Bool? — treating a delimiter as a string (true, by default) or a set of characters "any of" (false) - SkipEmpty:Bool? — whether to skip empty strings in the result, is false by default - - Limit:Uint64? — Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last item + - Limit:Uint64? — Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last element * ```String::JoinFromList(List<String>{Flags:AutoMap}, String) -> String``` diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md index 327cf1443c..4553f311e9 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md @@ -5,7 +5,7 @@ Functions for Unicode strings. **List of functions** * ```Unicode::IsUtf(String) -> Bool``` -Checks whether a string is a valid UTF-8 sequence. For example, the string ```"\xF0"``` isn't a valid UTF-8 sequence, but the ```"\xF0\x9F\x90\xB1"``` string correctly describes a UTF-8 cat emoji. +Checks whether a string is a valid UTF-8 sequence. For example, the string ```"\xF0"``` isn't a valid UTF-8 sequence, but the string ```"\xF0\x9F\x90\xB1"``` correctly describes a UTF-8 cat emoji. * ```Unicode::GetLength(Utf8{Flags:AutoMap}) -> Uint64``` Returns the length of a utf-8 string in unicode code points. Surrogate pairs are counted as one character. @@ -15,7 +15,7 @@ Returns the length of a utf-8 string in unicode code points. Surrogate pairs are * ```Unicode::RFind(Utf8{Flags:AutoMap}, Utf8, [Uint64?]) -> Uint64?``` * ```Unicode::Substring(Utf8{Flags:AutoMap}, from:Uint64?, len:Uint64?) -> Utf8``` -Returns a substring starting with ```from``` with the length of ```len``` characters. If the ```len``` argument is omitted, the substring is taken to the end of the source string. +Returns a substring starting with ```from``` with the length of ```len``` characters. If the ```len``` argument is omitted, the substring is moved to the end of the source string. * The ```Unicode::Normalize...``` functions convert the passed UTF-8 string to a [normalization form](https://unicode.org/reports/tr15/#Norm_Forms): * ```Unicode::Normalize(Utf8{Flags:AutoMap}) -> Utf8``` -- NFC @@ -37,7 +37,7 @@ Returns a substring starting with ```from``` with the length of ```len``` charac Arguments: ```input```, ```find```, ```replacement```. Replaces all occurrences of the ```find``` string in the ```input``` with ```replacement```. * ```Unicode::ReplaceFirst(Utf8{Flags:AutoMap}, Utf8, Utf8) -> Utf8``` - Arguments: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the first occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair. + Arguments: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the first occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair. * ```Unicode::ReplaceLast(Utf8{Flags:AutoMap}, Utf8, Utf8) -> Utf8``` Arguments: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the last occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair. @@ -69,7 +69,7 @@ Returns a substring starting with ```from``` with the length of ```len``` charac The third argument includes the following parameters: - DelimeterString:Bool? — treating a delimiter as a string (true, by default) or a set of characters "any of" (false) - SkipEmpty:Bool? - whether to skip empty strings in the result, is false by default - - Limit:Uint64? - Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last item + - Limit:Uint64? - Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last element * ```Unicode::JoinFromList(List<Utf8>{Flags:AutoMap}, Utf8) -> Utf8``` diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md index b78e8348f0..91bd4a5b12 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md @@ -4,8 +4,8 @@ * ```Url::Normalize(String) -> String?``` -Normalizes the URL in a robot-friendly way: converts the hostname into lowercase, strips out certain fragments, and so on. -The normalization result only depends on the URL itself. The normalization **DOES NOT** include operations depending on the external data: transformation based on duplicates, mirrors, etc. +Normalizes the URL in a robot-friendly way: converts the hostname into lowercase, strips out certain fragments, etc. +The normalization result depends only on the URL itself. The normalization **DOES NOT** include operations depending on the external data: transformation based on duplicates, mirrors, etc. Returned value: @@ -121,7 +121,7 @@ Get a component of the URL. Returns a second-level domain in most cases and a third-level domain for the hostnames like: ***.XXX.YY, where XXX is com, net, org, co, gov, or edu. You can redefine this list using an optional second argument * ```Url::GetOwner(String{Flags:AutoMap}) -> String``` - Returns the domain that's most likely owned by an individual or organization. Unlike Url::GetSignificantDomain, it uses a special whitelist. Besides the ***.co.uk domains, it can return a third-level domain used by free hosting sites and blogs (for example: something.livejournal.com) + Returns the domain that's most likely owned by an individual or organization. Unlike Url::GetSignificantDomain, it uses a special whitelist. Besides the ***.co.uk domains, it can return a third-level domain used by free hosting sites and blogs (for example: something.livejournal.com)s **Examples** @@ -188,13 +188,13 @@ Url::QueryStringToDict(String{Flag:AutoMap}, [ MaxFields:Uint32?, -- The maximum number of fields. If exceeded, an exception is thrown. Defaults to Max<Uint32>. Separator:String? -- A key-value pair separator, defaults to '&'. ]) -> Dict<String, List<String>> -Url::BuildQueryString(Dict<String, List<String>>{Flag:AutoMap}, [ +Url::BuildQueryString(Dict<String, List<String?>>{Flag:AutoMap}, [ Separator:String? -- A key-value pair separator, defaults to '&'. ]) -> String -Url::BuildQueryString(Dict<String, String>{Flag:AutoMap}, [ +Url::BuildQueryString(Dict<String, String?>{Flag:AutoMap}, [ Separator:String? -- A key-value pair separator, defaults to '&'. ]) -> String -Url::BuildQueryString(List<Tuple<String, String>>{Flag:AutoMap}, [ +Url::BuildQueryString(List<Tuple<String, String?>>{Flag:AutoMap}, [ Separator:String? -- A key-value pair separator, defaults to '&'. ]) -> String ``` diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md index fed6a90482..c355b9e21e 100644 --- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md +++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md @@ -18,7 +18,7 @@ Implementation specifics and functionality of the module: * `Yson::Parse***`: Getting a resource with a DOM object from serialized data, with all further operations performed on the obtained resource. * `Yson::From`: Getting a resource with a DOM object from simple YQL data types or containers (lists or dictionaries). * `Yson::ConvertTo***`: Converting a resource to [primitive data types](../../types/primitive.md) or [containers](../../types/containers.md). - * `Yson::Lookup***`: Getting a single list item or a dictionary with optional conversion to the relevant data type. + * `Yson::Lookup***`: Getting a single list element or a dictionary with optional conversion to the relevant data type. * `Yson::YPath***`: Getting one element from the document tree based on the relative path specified, optionally converting it to the relevant data type. * `Yson::Serialize***`: Getting a copy of data from the resource and serializing the data in one of the formats. * For convenience, when serialized Yson and Json are passed to functions expecting a resource with a DOM object, implicit conversion using `Yson::Parse` or `Yson::ParseJson` is done automatically. In SQL syntax, the dot or square brackets operator automatically adds a `Yson::Lookup` call. To serialize a resource, you still need to call `Yson::ConvertTo***` ([here's the ticket about CAST syntax support](https://st.yandex-team.ru/YQL-2610)) or `Yson::Serialize***`. It means that, for example, to get the "foo" element as a string from the Yson column named mycolumn and serialized as a dictionary, you can write: `SELECT Yson::ConvertToString(mycolumn["foo"]) FROM mytable;` or `SELECT Yson::ConvertToString(mycolumn.foo) FROM mytable;`. In the variant with a dot, special characters can be escaped by [general rules for IDs](../../syntax/expressions.md#escape). @@ -28,7 +28,7 @@ The module's functions must be considered as "building blocks" from which you ca * `Yson::Parse*** -> Yson::Serialize***`: Converting from one format to other. * `Yson::Parse*** -> Yson::Lookup -> Yson::Serialize***`: Extracting the value of the specified subtree in the source YSON tree. -* `Yson::Parse*** -> Yson::ConvertToList -> ListMap -> Yson::Lookup***`: Extracting items by a key from the YSON list. +* `Yson::Parse*** -> Yson::ConvertToList -> ListMap -> Yson::Lookup***`: Extracting elements by a key from the YSON list. See also examples of combining YSON functions in the [tutorial](https://yql.yandex-team.ru/Tutorial/yt_17_Yson_and_Json). @@ -36,7 +36,7 @@ See also examples of combining YSON functions in the [tutorial](https://yql.yand ```yql $node = Json(@@ - {"abc": {"def": 123, "ghi": "hello"}} + {"abc": {"def": 123, "ghi": "привет"}} @@); SELECT Yson::SerializeText($node.abc) AS `yson`; -- {"def"=123;"ghi"="\xD0\xBF\xD1\x80\xD0\xB8\xD0\xB2\xD0\xB5\xD1\x82"} @@ -77,7 +77,7 @@ Yson::ParseJsonDecodeUtf8(String{Flags:AutoMap}) -> Resource<'Yson2.Node'>? The result of all three functions is non-serializable: it can only be passed as the input to other function from the Yson library. However, you can't save it to a table or return to the client as a result of the operation: such an attempt results in a typing error. You also can't return it outside [subqueries](../../syntax/select.md): if you need to do this, call [Yson::Serialize](#ysonserialize), and the optimizer will remove unnecessary serialization and deserialization if materialization isn't needed in the end. -{% note info "Note" %} +{% note info %} The `Yson::ParseJsonDecodeUtf8` expects that characters outside the ASCII range must be additionally escaped. For detailed escaping rules, see the [YT code](https://a.yandex-team.ru/arc/trunk/arcadia/yt/yt/core/misc/utf8_decoder.cpp). diff --git a/ydb/docs/en/core/yql/toc_i.yaml b/ydb/docs/en/core/yql/toc_i.yaml index d38ee02b48..f6779a637f 100644 --- a/ydb/docs/en/core/yql/toc_i.yaml +++ b/ydb/docs/en/core/yql/toc_i.yaml @@ -1,6 +1,6 @@ items: -- name: Обзор +- name: Overview href: reference/index.md - include: { mode: link, path: reference/toc_i.yaml } -- name: Туториал YQL +- name: YQL tutorial include: { mode: link, path: tutorial/toc_i.yaml }
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md b/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md index 850bdb1e72..6d5f5dabac 100644 --- a/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md +++ b/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md @@ -14,5 +14,4 @@ The tutorial consists of 15 steps: 1. [{#T}](../../update.md) 1. [{#T}](../../delete.md) 1. [{#T}](../../alter_table.md) -1. [{#T}](../../delete_table.md) - +1. [{#T}](../../delete_table.md)
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md b/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md index d4eda537bc..d0a127faff 100644 --- a/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md +++ b/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md @@ -2,5 +2,4 @@ We assume that you already created tables in step [{#T}](../create_demo_tables.md) and populated them with data in step [{#T}](../fill_tables_with_data.md). -{% endnote %} - +{% endnote %}
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/alter_table.md b/ydb/docs/en/core/yql/tutorial/alter_table.md index fe79e0b8a2..cf95093f0f 100644 --- a/ydb/docs/en/core/yql/tutorial/alter_table.md +++ b/ydb/docs/en/core/yql/tutorial/alter_table.md @@ -18,5 +18,4 @@ Delete the column you added from the table: ```sql ALTER TABLE episodes DROP COLUMN viewers; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/basic_aggregation.md b/ydb/docs/en/core/yql/tutorial/basic_aggregation.md index 415fb866b3..80bf81e70b 100644 --- a/ydb/docs/en/core/yql/tutorial/basic_aggregation.md +++ b/ydb/docs/en/core/yql/tutorial/basic_aggregation.md @@ -19,7 +19,7 @@ SELECT FROM episodes GROUP BY - series_id, -- The query result will follow the listed order of columns + series_id, -- The query result will follow the listed order of columns. season_id -- Multiple columns are separated by a comma. -- Other columns can be listed after a SELECT only if -- they are passed to an aggregate function. @@ -29,5 +29,4 @@ ORDER BY ; COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md b/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md index e99e6127f2..b962e99dc1 100644 --- a/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md +++ b/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md @@ -14,8 +14,8 @@ SELECT FROM episodes WHERE - series_id = 1 -- List of conditions to build the result - AND season_id > 1 -- Logical AND is used for complex conditions + series_id = 1 -- List of conditions to build the result. + AND season_id > 1 -- Logical AND is used for complex conditions. ORDER BY -- Sorting the results. series_id, -- ORDER BY sorts the values by one or multiple @@ -27,5 +27,4 @@ LIMIT 3 -- LIMIT N after ORDER BY means ; -- depending on sort order. COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/conditional_values.md b/ydb/docs/en/core/yql/tutorial/conditional_values.md index 9587168313..f7288163c5 100644 --- a/ydb/docs/en/core/yql/tutorial/conditional_values.md +++ b/ydb/docs/en/core/yql/tutorial/conditional_values.md @@ -34,8 +34,8 @@ WHERE series_id IN (1,2) -- IN defines the set of values in the WHERE cla -- IN or NOT IN may lead to undesirable outcomes. AND season_id = 1 GROUP BY - CASE -- CASE evaluates a list of conditions and - -- returns one of multiple possible resulting + CASE -- CASE evaluates a list of conditions + -- and returns one of multiple possible resulting -- expressions. CASE can be used in any -- statement or with any clause -- that supports a given statement. For example, you can use CASE in @@ -51,5 +51,4 @@ GROUP BY ; COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/create_demo_tables.md b/ydb/docs/en/core/yql/tutorial/create_demo_tables.md index 9a1c14300f..5881d3a38b 100644 --- a/ydb/docs/en/core/yql/tutorial/create_demo_tables.md +++ b/ydb/docs/en/core/yql/tutorial/create_demo_tables.md @@ -44,5 +44,4 @@ CREATE TABLE episodes ); COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/delete.md b/ydb/docs/en/core/yql/tutorial/delete.md index d9d726a626..7fcd5f9d6d 100644 --- a/ydb/docs/en/core/yql/tutorial/delete.md +++ b/ydb/docs/en/core/yql/tutorial/delete.md @@ -41,5 +41,4 @@ COMMIT; SELECT * FROM episodes WHERE series_id = 1 AND season_id = 1; COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/delete_table.md b/ydb/docs/en/core/yql/tutorial/delete_table.md index 0fa9da6de9..5d008a40bc 100644 --- a/ydb/docs/en/core/yql/tutorial/delete_table.md +++ b/ydb/docs/en/core/yql/tutorial/delete_table.md @@ -6,5 +6,4 @@ Delete the [created](create_demo_tables.md) tables using the [DROP TABLE](../ref DROP TABLE episodes; DROP TABLE seasons; DROP TABLE series; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md b/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md index 2a5d2b4152..90f78abae8 100644 --- a/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md +++ b/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md @@ -7,7 +7,7 @@ REPLACE INTO series (series_id, title, release_date, series_info) VALUES - -- By default, numeric literals have type Int32 + -- By default, numeric literals have type Int32 -- if the value is within the range. -- Otherwise, they automatically expand to Int64. ( @@ -115,5 +115,4 @@ VALUES (2, 5, 8, "Fifty-One Percent", CAST(Date("2018-05-13") AS Uint64)); COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/insert_into.md b/ydb/docs/en/core/yql/tutorial/insert_into.md index ee4c778227..d4c63fed72 100644 --- a/ydb/docs/en/core/yql/tutorial/insert_into.md +++ b/ydb/docs/en/core/yql/tutorial/insert_into.md @@ -1,6 +1,6 @@ # Inserting data with INSERT -Add data to the table using [INSERT INTO](../reference/syntax/insert_into.md): +Add data to the table using [INSERT INTO](../reference/syntax/insert_into.md). {% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %} @@ -36,5 +36,4 @@ COMMIT; SELECT * FROM episodes WHERE series_id = 2 AND season_id = 5; COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/join_tables.md b/ydb/docs/en/core/yql/tutorial/join_tables.md index 7e5f905d8b..3b101d2175 100644 --- a/ydb/docs/en/core/yql/tutorial/join_tables.md +++ b/ydb/docs/en/core/yql/tutorial/join_tables.md @@ -24,5 +24,4 @@ ORDER BY -- Sorting of the results. -- Columns are separated by commas. COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/replace_into.md b/ydb/docs/en/core/yql/tutorial/replace_into.md index 2e791d3eb4..221a127b7a 100644 --- a/ydb/docs/en/core/yql/tutorial/replace_into.md +++ b/ydb/docs/en/core/yql/tutorial/replace_into.md @@ -1,6 +1,6 @@ # Inserting and updating data with REPLACE -Add data to the table using [REPLACE INTO](../reference/syntax/replace_into.md): +Add data to the table using [REPLACE INTO](../reference/syntax/replace_into.md). {% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %} @@ -31,5 +31,4 @@ COMMIT; SELECT * FROM episodes WHERE series_id = 2 AND season_id = 5; COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/select_all_columns.md b/ydb/docs/en/core/yql/tutorial/select_all_columns.md index a0d55bbff6..02163fb936 100644 --- a/ydb/docs/en/core/yql/tutorial/select_all_columns.md +++ b/ydb/docs/en/core/yql/tutorial/select_all_columns.md @@ -1,6 +1,6 @@ # Selecting data from all columns -Select all columns from the table using [SELECT](../reference/syntax/select.md): +Select all columns from the table using [SELECT](../reference/syntax/select.md). {% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %} @@ -12,5 +12,4 @@ SELECT -- Data selection operator. FROM episodes; -- The table to select the data from. COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/update.md b/ydb/docs/en/core/yql/tutorial/update.md index 134d9d004e..ba5b33613d 100644 --- a/ydb/docs/en/core/yql/tutorial/update.md +++ b/ydb/docs/en/core/yql/tutorial/update.md @@ -1,6 +1,6 @@ # Updating data with UPDATE -Update data in the table using the [UPDATE](../reference/syntax/update.md) operator: +Update data in the table using the [UPDATE](../reference/syntax/update.md) operator. {% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %} @@ -44,5 +44,4 @@ COMMIT; SELECT * FROM episodes WHERE series_id = 1 AND season_id = 1; COMMIT; -``` - +```
\ No newline at end of file diff --git a/ydb/docs/en/core/yql/tutorial/upsert_into.md b/ydb/docs/en/core/yql/tutorial/upsert_into.md index 75f2137f48..8532613d42 100644 --- a/ydb/docs/en/core/yql/tutorial/upsert_into.md +++ b/ydb/docs/en/core/yql/tutorial/upsert_into.md @@ -1,6 +1,6 @@ # Inserting and updating data with UPSERT -Add data to the table using [UPSERT INTO](../reference/syntax/upsert_into.md): +Add data to the table using [UPSERT INTO](../reference/syntax/upsert_into.md). {% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %} @@ -29,5 +29,4 @@ COMMIT; SELECT * FROM episodes WHERE series_id = 2 AND season_id = 5; COMMIT; -``` - +```
\ No newline at end of file |