Get
Returns detailed information about a given format schema.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetFormatSchemaRequest =
cloudApi.mdb.clickhouse_format_schema_service.GetFormatSchemaRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.FormatSchemaServiceClient);
const result = await client.get(
GetFormatSchemaRequest.fromPartial({
clusterId: "clusterId",
formatSchemaName: "formatSchemaName",
})
);
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 GetFormatSchemaRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(FormatSchemaServiceStub)
response = service.Get(
GetFormatSchemaRequest(cluster_id="clusterId", format_schema_name="formatSchemaName")
)
print(response)
GetFormatSchemaRequest
clusterId
: string
ClickHouse cluster ID.
To get a ClickHouse cluster ID, use the ClusterService.List method.
formatSchemaName
: string
Format schema name.
To get a format schema name, use the FormatSchemaService.List method.
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.