Skip to content

Commit

Permalink
control substitution on
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Sep 11, 2024
1 parent a888d33 commit a7fccea
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions e2e_test/source_inline/kafka/protobuf/recover.slt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
control substitution on

system ok
rpk topic create 'test-pb-struct'


system ok
jq -sR '{"schema":.,"schemaType":"PROTOBUF"}' << EOF | curl -X POST -H 'content-type: application/json' -d @- 'http://schemaregistry:8082/subjects/test-pb-struct-value/versions'
jq -sR '{"schema":.,"schemaType":"PROTOBUF"}' << EOF | curl -X POST -H 'content-type: application/json' -d @- "${RISEDEV_SCHEMA_REGISTRY_URL}/subjects/test-pb-struct-value/versions"
syntax = "proto3";
package test;
message User {
Expand All @@ -20,17 +22,16 @@ EOF
# create a source with v1 schema
statement ok
create source s with (
connector = 'kafka',
properties.bootstrap.server = 'message_queue:29092',
${RISEDEV_KAFKA_WITH_OPTIONS_COMMON},
topic = 'test-pb-struct')
format plain encode protobuf (
schema.registry = 'http://schemaregistry:8082',
schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}',
message = 'test.User');


# register a v2 schema
system ok
jq -sR '{"schema":.,"schemaType":"PROTOBUF"}' << EOF | curl -X POST -H 'content-type: application/json' -d @- 'http://schemaregistry:8082/subjects/test-pb-struct-value/versions'
jq -sR '{"schema":.,"schemaType":"PROTOBUF"}' << EOF | curl -X POST -H 'content-type: application/json' -d @- "${RISEDEV_SCHEMA_REGISTRY_URL}/subjects/test-pb-struct-value/versions"
syntax = "proto3";
package test;
message User {
Expand Down Expand Up @@ -59,11 +60,10 @@ create sink sk as select
1 as id,
row('Alan', 'Turing', 'Mathison')::struct<first_name varchar, last_name varchar, middle_name varchar> as name
with (
connector = 'kafka',
properties.bootstrap.server = 'message_queue:29092',
${RISEDEV_KAFKA_WITH_OPTIONS_COMMON},
topic = 'test-pb-struct')
format plain encode protobuf (
schema.registry = 'http://schemaregistry:8082',
schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}',
message = 'test.User');


Expand All @@ -86,11 +86,11 @@ drop source s;


system ok
curl -X DELETE 'http://schemaregistry:8082/subjects/test-pb-struct-value'
curl -X DELETE "${RISEDEV_SCHEMA_REGISTRY_URL}/subjects/test-pb-struct-value"


system ok
curl -X DELETE 'http://schemaregistry:8082/subjects/test-pb-struct-value?permanent=true'
curl -X DELETE "${RISEDEV_SCHEMA_REGISTRY_URL}/subjects/test-pb-struct-value?permanent=true"


system ok
Expand Down

0 comments on commit a7fccea

Please sign in to comment.