List
Returns a list of format schemas in a cluster.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListFormatSchemasRequest =
cloudApi.mdb.clickhouse_format_schema_service.ListFormatSchemasRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.FormatSchemaServiceClient);
const result = await client.list(
ListFormatSchemasRequest.fromPartial({
clusterId: "clusterId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.mdb.clickhouse.v1.format_schema_service_pb2_grpc import FormatSchemaServiceStub
from yandex.cloud.mdb.clickhouse.v1.format_schema_service_pb2 import ListFormatSchemasRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(FormatSchemaServiceStub)
response = service.List(
ListFormatSchemasRequest(
cluster_id="clusterId",
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
ListFormatSchemasRequest
clusterId
: string
ClickHouse cluster ID.
To get a ClickHouse cluster ID, use the ClusterService.List method.
pageSize
: int64
The maximum number of results per page to return. If the number of the results is larger than page_size, the service returns ListFormatSchemasResponse.next_page_token. You can use it to get the next page of the results in subsequent requests of a format schema list.
pageToken
: string
Page token. To get the next page of results, set page_token to the ListFormatSchemasResponse.next_page_token returned by the previous format schema list request.
ListFormatSchemasResponse
formatSchemas
: FormatSchema
List of format schemas.
nextPageToken
: string
This token allows you to get the next page of results when requesting the format schema list. If the number of the results is larger than ListFormatSchemasRequest.page_size, use the next_page_token as the value for the ListFormatSchemasRequest.page_token parameter in the next request. Each subsequent request will have its own next_page_token to continue paging through the results.
FormatSchema
name
: string
Format schema name.
clusterId
: string
ClickHouse cluster ID.
type
: FormatSchemaType
Schema type. Possible values are the following:
- FORMAT_SCHEMA_TYPE_PROTOBUF - Protobuf data format (including ProtobufSingle).
- FORMAT_SCHEMA_TYPE_CAPNPROTO - Cap'n Proto data format.
uri
: string
Link to the file of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.