Getting a list of background operations
Using the ydb operation list subcommand, you can get a list of background operations of the specified type.
General command format:
ydb [global options...] operation list [options...] <kind>
global options: Global parameters.options: Parameters of the subcommand.kind: The type of operation. Possible values:buildindex: The build index operations.export/s3: The export to S3 operations.import/s3: The import from S3 operations.
View the description of the command for getting a list of background operations:
ydb operation list --help
Subcommand parameters
| Name | Default value | Description |
|---|---|---|
-s, --page-size |
10 (it is set on the server side and may vary depending on the kind of operation) |
Number of operations on one page. If the list of operations contains more strings than specified in the --page-size parameter, the result will be split into several pages. To get the next page, specify the --page-token parameter. |
-t, --page-token |
0 |
Page token. |
--format |
pretty |
Acceptable values: |
Examples
Note
The examples use the quickstart profile. To learn more, see Creating a profile to connect to a test database.
Get a list of background index building operations for the series table:
ydb -p quickstart operation list \
buildindex
Result:
┌───────────────────────────────────────┬───────┬─────────┬───────┬──────────┬─────────────────────┬─────────────┐
│ id │ ready │ status │ state │ progress │ table │ index │
├───────────────────────────────────────┼───────┼─────────┼───────┼──────────┼─────────────────────┼─────────────┤
│ ydb://buildindex/7?id=281489389055514 │ true │ SUCCESS │ Done │ 100.00% │ /my-database/series │ release_idx │
├╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴╴╴╴╴┤
│ Create time: 2023-04-20T11:04:29Z │
│ End time: 2023-04-20T11:04:29Z │
├───────────────────────────────────────┬───────┬─────────┬───────┬──────────┬─────────────────────┬─────────────┤
│ ydb://buildindex/7?id=281489389055513 │ true │ SUCCESS │ Done │ 100.00% │ /my-database/series │ title_idx │
├╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴┴╴╴╴╴╴╴╴╴╴╴╴╴╴┤
│ Create time: 2023-04-20T10:58:29Z │
│ End time: 2023-04-20T10:59:29Z │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Next page token: 0
By default, buildindex displays only the first 10 operations, sorted by id in descending order. New operations are typically assigned a larger identifier, but this is not guaranteed. If a new operation is assigned an id smaller than existing ones, it may appear on a different page.