Skip to main content

Get

Returns detailed information about a given format schema.

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);
})();

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:

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.