Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for YDB
  • Getting started
    • Overview
    • Connecting to a database using the YDB CLI
    • Managing databases
    • Migrating a database to a different availability zone
    • Managing tables and directories
    • Reading and writing data
    • Monitoring DB status
    • Using YDB via the ydb-mcp server with the Cursor IDE as an example
  • Access management
  • Monitoring metrics
  • Audit Trails events
  • FAQ
  • Public materials

In this article:

  • Creating a table
  • Row-oriented table
  • Document table
  • Column-oriented table
  • Changing the table schema
  • Row-oriented table
  • Document table
  • Column-oriented table
  • Deleting a table
  • Row-oriented table
  • Document table
  • Column-oriented table
  • Creating and deleting directories
  1. Step-by-step guides
  2. Managing tables and directories

Managing tables and directories

Written by
Yandex Cloud
Improved by
Max Z.
Updated at February 9, 2026
  • Creating a table
    • Row-oriented table
    • Document table
    • Column-oriented table
  • Changing the table schema
    • Row-oriented table
    • Document table
    • Column-oriented table
  • Deleting a table
    • Row-oriented table
    • Document table
    • Column-oriented table
  • Creating and deleting directories

This section describes how to manage row-oriented and document tables as well as directories using the cloud management console or Terraform.

You can do the following:

  • Create a table.
  • Change the table schema.
  • Delete a table.
  • Create and delete directories.

To work with tables and directories, you will need a database.

Creating a tableCreating a table

You can create a row-oriented table or a document table.

Row-oriented tableRow-oriented table

Management console
Terraform
  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to create your table in.
  4. Navigate to the Navigation tab.
  5. Select Create → Table on the right side of the page.
  6. Configure the table:
    • Table Name must be unique within the database.
    • Table type: Row table.
  7. Add columns:
    • Column Name must be unique within the table.
    • Column data Type. Regardless of the data type, each column may contain a NULL value.
    • Primary key. Specify whether the column is part of the primary key. Primary indexes are automatically created based on the primary key.
  8. Set up secondary indexes, if needed:
    • Secondary index Name must be unique within the table.
    • Key: One or more columns that make up a key for creating a secondary index.
  9. Configure the partitioning policy:
    • None: The table is not partitioned.
    • Evenly: The entire range of values of Uint32 or Uint64 key columns (from 0 to the maximum value) is split into same-length partitions. When using this policy, set the number of partitions in the Count field.
    • Explicitly: Allows you to explicitly specify values for keys that will act as split points for initial table partitioning. To add another split point, click Add split point.
  10. Configure automatic partitioning:
    • By size: If enabled, a partition is split into two when it reaches a certain data size.
    • By load: If enabled, a partition is split into two if it receives high throughput (uses a lot of CPU time) for a certain period of time.
  11. Specify advanced table settings:
    • Auto-partitioning by size in MB: Data size threshold that triggers auto-partitioning by size.
    • Minimum number of partitions: Number of partitions in the table below which no partitions are merged by size or load.
    • Maximum number of partitions: Number of partitions in the table above which no partitions are split by size or load.
    • Bloom filter for primary key: If enabled, YDB uses a Bloom filter to search data by key. In some cases, it can speed up key reads.
  12. Click Create table.

To create row-oriented tables, you can also use the CREATE TABLE command.

To learn how to create a row-oriented table using Terraform, see Creating row-oriented and column-oriented tables in a database.

Document tableDocument table

Management console
Terraform

Note

Document tables are only available in Managed Service for YDB serverless mode.

  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to create your table in.
  4. Select Create → Table on the right side of the page.
  5. Configure the table:
    • Table Name must be unique within the database.
    • Table type: Document table.
  6. Add columns:
    • Column Name must be unique within the table.
    • Column data Type. Regardless of the data type, each column may contain a NULL value.
    • Partition key: Simple primary key that consists of one attribute. YDB uses a partition key as an input for internal hashing. The hashing function result determines the partition the element will be stored in.
    • Sort key. A primary key can be composite and consist of a partition key and a sort key. All elements sharing the partition key will be stored together and sorted according to their sort key value. In a document table that has both a partition key and a sort key, any two elements may share the partition key value but must have different sort key values.
  7. Click Create table.

You can learn how to create a document table using Terraform in Creating document tables in a database.

Column-oriented tableColumn-oriented table

Management console
Terraform
  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to create your table in.
  4. Navigate to the Navigation tab.
  5. Select Create → Table on the right side of the page.
  6. Configure the table:
    • Table Name must be unique within the database.
    • Table type: Column table.
  7. Add columns:
    • Column Name must be unique within the table.

    • Column data Type.

    • Primary key. Specify whether the column is part of the primary key. Primary indexes are automatically created based on the primary key.

      Note

      The column order in the primary key depends on the column order in the table you are creating.

    • NOT NULL constraint. Specify whether the column may contain a NULL value.

  8. Configure the table TTL parameters:
    • Column. Select the column whose value will be used to calculate the lifetime of rows.
    • Lifetime. Specify the lifetime of table rows.
    • Unit. Select the measurement unit for the table row lifetime you specified.
  9. Configure partitioning:
    • Partition key: Specify the column to split the table by.
    • Partition count: Specify the number of partitions for the table.
  10. Click Create table.

To create column-oriented tables, you can also use the CREATE TABLE command.

You can learn how to create a column-oriented table using Terraform in Creating row-oriented and column-oriented tables in a database.

Changing the table schemaChanging the table schema

Row-oriented tableRow-oriented table

Management console
Terraform

In the YDB cloud console, you can add non-key columns to a table and change its automatic partitioning settings.

  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to update a table in.
  4. Find the table in the list and select → Edit.
  5. Add new columns to the table and specify their parameters:
    • Column Name must be unique within the table.
    • Column data Type. Regardless of the data type, each column may contain a NULL value.
  6. To delete non-key columns from the table, click in the relevant row. You cannot delete columns that make up a primary key.
  7. Configure automatic partitioning:
    • By size: If enabled, a partition is split into two when it reaches a certain data size.
    • By load: If enabled, a partition is split into two if it receives high throughput (uses a lot of CPU time) for a certain period of time.
  8. Specify advanced table settings:
    • Auto-partitioning by size in MB: Data size threshold that triggers auto-partitioning by size.
    • Minimum number of partitions: Number of partitions in the table below which no partitions are merged by size or load.
    • Maximum number of partitions: Number of partitions in the table above which no partitions are split by size or load.
    • Bloom filter for primary key: If enabled, YDB uses a Bloom filter to search data by key. In some cases, it can speed up key reads.
  9. Click Alter table.

Learn more about the table entities you can change using Terraform in Creating row-oriented and column-oriented tables in a database.

Document tableDocument table

Management console
Terraform

Note

Currently, you can only add new rows to a table, without any preview in the management console.

  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to update a table in.
  4. Find the table in the list and click it.
  5. Click Add row.
  6. Enter the values for the columns listed in the form, then click Add.

Learn more about the table entities you can change using Terraform in Creating document tables in a database.

To edit row-oriented tables, you can also use the ALTER TABLE command.

Column-oriented tableColumn-oriented table

Management console
Terraform
  1. In the management console, navigate to the folder page.

  2. Go to Managed Service for YDB.

  3. Select the database to update a table in.

  4. Find the table in the list and select → Edit.

    Update the table schema as needed. You can do the following:

    • Add new columns to the table and specify their parameters:
      • Column Name must be unique within the table.
      • Column data Type. Regardless of the data type, each column may contain a NULL value.
    • To delete non-key columns from the table, click in the relevant row. You cannot delete columns that make up a primary key.
    • Configure the table TTL parameters:
      • Column. Select the column whose value will be used to calculate the lifetime of rows.
      • Lifetime. Specify the lifetime of table rows.
      • Unit. Select the measurement unit for the table row lifetime you specified.
  5. Click Alter table.

To update column-oriented tables, you can also use the ALTER TABLE command.

Learn more about the table entities you can change using Terraform in Creating row-oriented and column-oriented tables in a database.

Note

Updating the store and partition_by parameters of the column-oriented table will result in recreating the table.

Deleting a tableDeleting a table

Row-oriented tableRow-oriented table

Management console
Terraform
  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to delete your table from.
  4. Find the table in the list and select → Delete.
  5. Confirm the deletion.

To delete a row-oriented table, delete the yandex_ydb_table resource.

Document tableDocument table

Management console
Terraform
  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Navigate to the database to delete your document table from.
  4. Select the document table from the list, then click → Delete.
  5. Confirm the deletion.

To delete a document table, delete the aws_dynamodb_table resource.

Column-oriented tableColumn-oriented table

Management console
Terraform
  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to delete your table from.
  4. Find the table in the list and select → Delete.
  5. Confirm the deletion.

To delete a column-oriented table, delete the yandex_ydb_table resource.

To delete tables, you can also use the DROP TABLE command.

Creating and deleting directoriesCreating and deleting directories

Management console
  1. In the management console, navigate to the folder page.
  2. Go to Managed Service for YDB.
  3. Select the database to create a directory in.
  4. Select Create → Directory on the right side of the page.
  5. Enter a name for your directory and click Create directory.

Was the article helpful?

Previous
Migrating a database to a different availability zone
Next
Reading and writing data
© 2026 Direct Cursus Technology L.L.C.