Skip to content

Commit

Permalink
Update description about protobuf descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
tabVersion authored Sep 20, 2024
1 parent 8e44f0f commit c7f0c21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions versioned_docs/version-2.0/ingest/ingest-from-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ WITH (
message = 'package.message_name',
access_key = 'your_access_key',
secret_key = 'your secret_key',
location = 'https://demo_bucket_name.s3-us-west-2.amazonaws.com/demo.proto'
-- compiled from protoc
location = 'https://demo_bucket_name.s3-us-west-2.amazonaws.com/schema_descriptor.pb'
);
```

Expand Down Expand Up @@ -290,14 +291,14 @@ RisingWave supports reading schemas from a Web location in `http://...`, `https:
For Protobuf, if a schema location is specified, the schema file must be a `FileDescriptorSet`, which can be compiled from a `.proto` file with a command like this:

```shell
protoc -I=$include_path --include_imports --descriptor_set_out=schema.pb schema.proto
protoc -I=$include_path --include_imports --descriptor_set_out=schema_descriptor.pb schema.proto
```

To specify a schema location, add this clause to a `CREATE SOURCE` statement.

```sql
ENCODE data_encode (
schema.location = 'location'
schema.location = 'file://...' -- path to schema_descriptor.pb
)
```

Expand Down

0 comments on commit c7f0c21

Please sign in to comment.