diff options
author | alexv-smirnov <alexv-smirnov@yandex-team.ru> | 2022-06-07 12:00:22 +0300 |
---|---|---|
committer | alexv-smirnov <alexv-smirnov@yandex-team.ru> | 2022-06-07 12:00:22 +0300 |
commit | 014aa4109972ec445b23f4f7660c27231cd40e32 (patch) | |
tree | 506ff9842dc44195c18ded12baa9a594294bc93c | |
parent | e351e37692f0b8faeb390217b514ae2772ad40e6 (diff) | |
download | ydb-014aa4109972ec445b23f4f7660c27231cd40e32.tar.gz |
ydb docs tools dump/restore file structure clarifications
ref:636a29bc6194c7ce4e5da406b8441fe8e96b9335
-rw-r--r-- | ydb/docs/en/core/reference/ydb-cli/export_import/_includes/file_structure.md | 56 | ||||
-rw-r--r-- | ydb/docs/ru/core/reference/ydb-cli/export_import/_includes/file_structure.md | 56 |
2 files changed, 108 insertions, 4 deletions
diff --git a/ydb/docs/en/core/reference/ydb-cli/export_import/_includes/file_structure.md b/ydb/docs/en/core/reference/ydb-cli/export_import/_includes/file_structure.md index 3cbd66e4fd..f240be1f78 100644 --- a/ydb/docs/en/core/reference/ydb-cli/export_import/_includes/file_structure.md +++ b/ydb/docs/en/core/reference/ydb-cli/export_import/_includes/file_structure.md @@ -1,6 +1,6 @@ # File structure of data export -The file structure described below is used for exporting data both to the file system and S3-compatible object storage. +The file structure described below is used for exporting data both to the file system and S3-compatible object storage. When using S3, file path is written to the object key, while export directory is a key prefix. ## Directories {#dir} @@ -15,7 +15,7 @@ Each DB table also has a corresponding same-name directory in the file structure ## Data files {#datafiles} -Data is stored in `.csv` files, one file line per table entry, without a row with column headers. URL-encoded format is used for string representation. For example, a file line for a table with uint64 and uft8 columns containing the number 1 and the string "Hello", respectively, looks like this: +Data is stored in `.csv` files, one file line per table entry, without a row with column headers. URL-encoded format is used for string representation. For example, a file line for a table with uint64 and utf8 columns containing the number 1 and the string "Привет" ("Hello" in Russian), respectively, looks like this: ``` 1,"%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82" @@ -37,3 +37,55 @@ When exporting tables created within a tutorial when [Getting started with YQL]( └── scheme.pb ``` +File `series/scheme.pb` contents: + +``` +columns { + name: "series_id" + type { + optional_type { + item { + type_id: UINT64 + } + } + } +} +columns { + name: "title" + type { + optional_type { + item { + type_id: UTF8 + } + } + } +} +columns { + name: "series_info" + type { + optional_type { + item { + type_id: UTF8 + } + } + } +} +columns { + name: "release_date" + type { + optional_type { + item { + type_id: UINT64 + } + } + } +} +primary_key: "series_id" +storage_settings { + store_external_blobs: DISABLED +} +column_families { + name: "default" + compression: COMPRESSION_NONE +} +``` diff --git a/ydb/docs/ru/core/reference/ydb-cli/export_import/_includes/file_structure.md b/ydb/docs/ru/core/reference/ydb-cli/export_import/_includes/file_structure.md index cfef9ccded..81d892006a 100644 --- a/ydb/docs/ru/core/reference/ydb-cli/export_import/_includes/file_structure.md +++ b/ydb/docs/ru/core/reference/ydb-cli/export_import/_includes/file_structure.md @@ -1,7 +1,7 @@ # Файловая структура выгрузки -Описанная ниже файловая структура применяется для выгрузки как в файловую систему, так и в S3-совместимое объектное хранилище. +Описанная ниже файловая структура применяется для выгрузки как в файловую систему, так и в S3-совместимое объектное хранилище. При работе с S3 в ключ объекта записывается путь к файлу, а директория выгрузки является префиксом ключа. ## Директории {#dir} @@ -16,7 +16,7 @@ ## Файлы с данными {#datafiles} -Формат файлов с данными - `.csv`, одна строка соответствует одной записи в таблице, без строки с заголовками колонок. Для строк применяется представление в urlencoded формате. Например, строка файла для таблицы с колонками uint64 и uft8, содержащая число 1 и строку "Привет" соответственно, выглядит таким образом: +Формат файлов с данными - `.csv`, одна строка соответствует одной записи в таблице, без строки с заголовками колонок. Для строк применяется представление в urlencoded формате. Например, строка файла для таблицы с колонками uint64 и utf8, содержащая число 1 и строку "Привет" соответственно, выглядит таким образом: ``` 1,"%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82" @@ -38,3 +38,55 @@ └── scheme.pb ``` +Содержимое файла `series/scheme.pb`: + +``` +columns { + name: "series_id" + type { + optional_type { + item { + type_id: UINT64 + } + } + } +} +columns { + name: "title" + type { + optional_type { + item { + type_id: UTF8 + } + } + } +} +columns { + name: "series_info" + type { + optional_type { + item { + type_id: UTF8 + } + } + } +} +columns { + name: "release_date" + type { + optional_type { + item { + type_id: UINT64 + } + } + } +} +primary_key: "series_id" +storage_settings { + store_external_blobs: DISABLED +} +column_families { + name: "default" + compression: COMPRESSION_NONE +} +```
\ No newline at end of file |