Comment on page
CREATE DESCRIPTOR_SOURCE
CREATE DESCRIPTOR_SOURCE
descriptor_source_name
WITH (descriptor_source_parameter = value [, ...]);
Creates Descriptor(s) from the schemas available in the Descriptor source file. When creating a Descriptor Source in DeltaStream, the Descriptor Source is parsed and all schemas are extracted and created as separate descriptors for the user. These descriptors can then be used to set serialization format for Topic.
Name of the Descriptor Source to be imported. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.
Parameter Name | Description |
---|---|
file | Required. Specifies a local filesystem path to import the descriptor(s) from.
Type: String Valid values: A valid file path in the current user's local filesystem. |
The following creates a Descriptor Source from the ProtoBuf descriptors file
/descriptors/pageviews.desc
on the local filesystem and gives it a recognizable name pageviews
for reference from a Topic:<no-db>/<no-store># CREATE DESCRIPTOR_SOURCE pageviews WITH ( 'file' = '/descriptors/pageviews.desc' );
<no-db>/<no-store># LIST DESCRIPTOR_SOURCES;
Name | Tags | Type | Owner | Created at | Updated at
------------+----------+----------+----------+----------------------+-----------------------
pageviews | protobuf | protobuf | sysadmin | 2023-02-10T18:43:24Z | 2023-02-10T18:43:24Z
Once the Descriptor Source is imported, all its ProtoBuf descriptors descriptors are extracted and are made available in the LIST DESCRIPTORS command:
<no-db>/<no-store># LIST DESCRIPTORS;
Name
--------------------------
pageviews.PageviewsKey
pageviews.Pageviews
Last modified 1mo ago