table-persistence-before-sinks.td 990 B

1234567891011121314151617181920212223242526272829
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. #
  10. # Test sinks that derive from table sources
  11. #
  12. > CREATE TABLE sink_table (f1 INTEGER);
  13. > INSERT INTO sink_table VALUES (1);
  14. > CREATE CONNECTION kafka_conn TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT);
  15. > CREATE CONNECTION IF NOT EXISTS csr_conn TO CONFLUENT SCHEMA REGISTRY (
  16. URL '${testdrive.schema-registry-url}'
  17. );
  18. > CREATE SINK sink_sink FROM sink_table
  19. INTO KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-exactly-once-sink-${testdrive.seed}')
  20. FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
  21. ENVELOPE DEBEZIUM;
  22. > INSERT INTO sink_table VALUES (2);