YDB CLI commands
General syntax for calling YDB CLI commands:
ydb [global options] <command> [<subcommand> ...] [command options]
where:
ydbis the command to run the YDB CLI from the OS command line.[global options]are global options that are common for all YDB 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
You can learn about the necessary commands by selecting the subject section in the menu on the left or using the alphabetical list below.
Any command can be run from the command line with the --help option to get help on it. You can get a list of all commands supported by the YDB CLI by running the YDB CLI with the --help option, but without any command.
| Command / subcommand | Brief description |
|---|---|
| admin cluster bridge failover | Emergency switchover when pile is unavailable |
| admin cluster bridge list | List state of each pile in bridge mode |
| admin cluster bridge rejoin | Returning pile to the cluster after maintenance or recovery |
| admin cluster bridge switchover | Planned PRIMARY pile change |
| admin cluster bridge takedown | Taking pile out of the cluster for maintenance |
| admin cluster config fetch | Getting the current dynamic configuration of the cluster |
| admin cluster config generate | Generating a dynamic configuration from a static startup configuration |
| admin cluster config replace | Replacing the cluster dynamic configuration |
| admin cluster config resolve | Computing the final cluster dynamic configuration based on the base configuration and override selectors |
| admin cluster config version | Displaying the cluster configuration version on nodes |
| admin cluster dump | Dumping cluster' metadata to the file system |
| admin cluster restore | Restoring cluster' metadata from the file system |
| admin database config fetch | Getting the current dynamic configuration of the database |
| admin database config generate | Generating a database dynamic configuration from a static startup configuration |
| admin database config replace | Replacing the database dynamic configuration |
| admin database config resolve | Computing the final database dynamic configuration based on the base configuration and override selectors |
| admin database config version | Displaying the database configuration version |
| admin database dump | Dumping database' data and metadata to the file system |
| admin database restore | Restoring database' data and metadata from the file system |
| admin node config init | Initializing node configuration |
| auth get-token | Getting an authentication token from authentication parameters |
| config info | Viewing connection parameters |
| config profile activate | Activating a profile |
| config profile create | Creating a profile |
| config profile delete | Deleting a profile |
| config profile deactivate | Deactivating the current active profile |
| config profile get | Getting parameters of a profile |
| config profile list | List of profiles |
| config profile replace | Creating or replacing a profile with new parameter values |
| config profile set | Activating a profile |
| config profile update | Updating an existing profile |
| debug latency | Checking baseline latency with a variable number of parallel requests |
| debug ping | Checking YDB availability |
| discovery list | List of endpoints |
| discovery whoami | Authentication check |
| export s3 | Exporting data to S3 storage |
| import file csv | Importing data from a CSV file |
| import file json | Importing data from a JSON file |
| import file parquet | Importing data from a Parquet file |
| import file tsv | Importing data from a TSV file |
| import s3 | Importing data from S3 storage |
| init | Initializing the CLI, creating a profile |
| monitoring healthcheck | Health check |
| operation cancel | Aborting long-running operations |
| operation forget | Deleting long-running operations from the list |
| operation get | Status of long-running operations |
| operation list | List of long-running operations |
| scheme describe | Description of a data schema object |
| scheme ls | List of data schema objects |
| scheme mkdir | Creating a directory |
| scheme permissions chown | Change object owner |
| scheme permissions clear | Clear permissions |
| scheme permissions grant | Grant permission |
| scheme permissions revoke | Revoke permission |
| scheme permissions set | Set permissions |
| scheme permissions list | View permissions |
| scheme permissions clear-inheritance | Disable permission inheritance |
| scheme permissions set-inheritance | Enable permission inheritance |
| scheme rmdir | Deleting a directory |
| scripting yql | Executing a YQL script (deprecated, use ydb sql) |
| sql | Execute any query |
| table attribute add | Adding an attribute for a row-oriented or column-oriented table |
| table attribute drop | Deleting an attribute from a row-oriented or column-oriented table |
| table drop | Deleting a row-oriented or column-oriented table |
| table index add global-async | Adding an asynchronous secondary index for row-oriented tables |
| table index add global-sync | Adding a synchronous secondary index for row-oriented tables |
| table index drop | Deleting a secondary index from row-oriented tables |
| table index rename | Renaming a secondary index for the specified table |
| table query execute | Executing a YQL query (deprecated, use ydb sql) |
| table query explain | YQL query execution plan (deprecated, use ydb sql --explain) |
| table read | Streaming row table reads |
| table ttl set | Setting TTL parameters for row-oriented and column-oriented tables |
| table ttl reset | Resetting TTL parameters for row-oriented and column-oriented tables |
| tools copy | Copying tables |
| tools dump | Dumping individual schema objects to the file system |
| tools infer csv | Generate a CREATE TABLE SQL query from a CSV file |
| tools rename | Renaming row-oriented tables |
| tools restore | Restoring individual schema objects from the file system |
| topic create | Creating a topic |
| topic alter | Updating topic parameters and consumers |
| topic drop | Deleting a topic |
| topic consumer add | Adding a consumer to a topic |
| topic consumer describe | Describing a topic consumer |
| topic consumer drop | Deleting a consumer from a topic |
| topic consumer offset commit | Saving a reading offset |
| topic read | Reading messages from a topic |
| topic write | Writing messages to a topic |
| update | Update the YDB CLI |
| version | Output details about the YDB CLI version |
| workload clickbench init | Creating and initializing tables for the Clickbench workload |
| workload clickbench import files | Loading the Clickbench dataset from files |
| workload clickbench run | Running the Clickbench benchmark |
| workload clickbench clean | Deleting tables created during the Clickbench workload initialization |
| workload kv init | Creating and initializing tables for the Key-Value workload |
| workload kv run upsert | Inserting random tuples into a table using UPSERT in the Key-Value workload |
| workload kv run insert | Inserting random tuples into a table using INSERT in the Key-Value workload |
| workload kv run mixed | Simultaneous insertion and reading of tuples with verification of successfully read data in the Key-Value workload |
| workload kv run read-rows | Executing ReadRows queries returning rows by exact primary key match in the Key-Value workload |
| workload kv run select | Selecting data returning rows by exact primary key match in the Key-Value workload |
| workload kv clean | Deleting tables created during the Key-Value workload initialization |
| workload log init | Creating and initializing tables for the Log workload |
| workload log import generator | Random data generator in the Log workload |
| workload log run bulk-upsert | Bulk inserting random rows into a table near the current time in the Log workload |
| workload log run delete | Deleting random rows from a table near the current time in the Log workload |
| workload log run insert | Inserting random rows into a table near the current time in the Log workload using INSERT |
| workload log run upsert | Inserting random rows into a table near the current time in the Log workload using UPSERT |
| workload log run select | Executing a set of analytical queries for log analysis: record counting, aggregation by levels, services, and components, metadata analysis, and time ranges in the Log workload |
| workload log clean | Deleting tables created during the Log workload initialization |
| workload mixed init | Creating and initializing tables for the Mixed workload |
| workload mixed run bulk-upsert | Bulk inserting random rows into a table near the current time using BULK_UPSERT in the Mixed workload |
| workload mixed run insert | Inserting random rows into a table near the current time using INSERT in the Mixed workload |
| workload mixed run upsert | Updating random rows in a table near the current time using UPSERT in the Mixed workload |
| workload mixed run select | Selecting random rows from a table in the Mixed workload |
| workload mixed clean | Deleting tables created during the Mixed workload initialization |
| workload query init | Initializing tables and their configurations for the Query workload |
| workload query import | Filling tables with data for the Query workload |
| workload query run | Starting the Query workload load testing |
| workload query clean | Deleting tables used for the Query workload |
| workload stock init | Creating and initializing tables for the Stock workload |
| workload stock run add-rand-order | Inserting orders with a random ID without processing them in the Stock workload |
| workload stock run put-rand-order | Submitting random orders with processing in the Stock workload |
| workload stock run put-same-order | Submitting orders with the same products in the Stock workload |
| workload stock run rand-user-hist | Selecting orders for a random customer in the Stock workload |
| workload stock run user-hist | Selecting orders for the 10,000th customer in the Stock workload |
| workload stock clean | Deleting tables created during the Stock workload initialization |
| workload topic init | Creating and initializing a topic for the Topic workload |
| workload topic run full | Performing a full load on a topic with simultaneous message reading and writing in the Topic workload |
| workload topic run read | Performing a load for reading messages from a topic in the Topic workload |
| workload topic run write | Performing a load for writing messages to a topic in the Topic workload |
| workload topic clean | Deleting the topic created during the Topic workload initialization |
| workload tpcc init | Creating and initializing tables for the TPC-C benchmark |
| workload tpcc import | Filling tables with initial data for the TPC-C benchmark |
| workload tpcc check | Checking TPC-C data consistency |
| workload tpcc run | Running the TPC-C benchmark |
| workload tpcc clean | Deleting tables created by the TPC-C benchmark |
| workload tpcds init | Creating and initializing tables for the TPC-DS benchmark |
| workload tpcds import generator | Generating the TPC-DS dataset using the built-in generator |
| workload tpcds run | Running the TPC-DS benchmark |
| workload tpcds clean | Deleting tables created during the TPC-DS workload initialization |
| workload tpch init | Creating and initializing tables for the TPC-H benchmark |
| workload tpch import generator | Generating the TPC-H dataset using the built-in generator |
| workload tpch run | Running the TPC-H benchmark |
| workload tpch clean | Deleting tables created during the TPC-H workload initialization |
| workload transfer topic-to-table init | Creating and initializing a topic with consumers and tables for a load transferring data from a topic to a table |
| workload transfer topic-to-table run | Starting a load reading messages from a topic and writing them to a table in transactions |
| workload transfer topic-to-table clean | Deleting the topic and tables created during the workload initialization |
| workload vector init | Creating and initializing tables for the Vector workload |
| workload vector run select | Getting top-K vectors in the Vector workload |
| workload vector run upsert | Upserting vector rows into a table in the Vector workload |
| workload vector clean | Deleting tables created during the Vector workload initialization |
| workload fulltext init | Creating and initializing tables for the Fulltext workload |
| workload fulltext import files | Importing fulltext data from files in the Fulltext workload |
| workload fulltext import generator | Generating synthetic text data using a Markov chain model in the Fulltext workload |
| workload fulltext run select | Running fulltext search queries in the Fulltext workload |
| workload fulltext run upsert | Inserting or updating documents in a table in the Fulltext workload |
| workload fulltext clean | Deleting tables created during the Fulltext workload initialization |
| workload fulltext model | Building a Markov chain model from a text dataset for the Fulltext workload |
| yql | Executing a YQL script with streaming support (deprecated, use ydb sql) |