40-check-smoke.td 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. $ schema-registry-wait topic=sql-server.test.dbo.t1
  10. $ sql-server-connect name=sql-server
  11. server=tcp:sql-server,1433;IntegratedSecurity=true;TrustServerCertificate=true;User ID=sa;Password=${arg.sa-password}
  12. $ sql-server-execute name=sql-server
  13. USE test;
  14. INSERT INTO t1 VALUES (345);
  15. $ schema-registry-wait topic=sql-server.transaction
  16. > CREATE CONNECTION IF NOT EXISTS csr_conn TO CONFLUENT SCHEMA REGISTRY (
  17. URL '${testdrive.schema-registry-url}'
  18. );
  19. > CREATE CONNECTION IF NOT EXISTS kafka_conn TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT);
  20. > CREATE SOURCE sqlserver_tx_metadata
  21. FROM KAFKA CONNECTION kafka_conn (TOPIC 'sql-server.transaction');
  22. > CREATE TABLE sqlserver_tx_metadata_tbl FROM SOURCE sqlserver_tx_metadata (REFERENCE "sql-server.transaction")
  23. FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
  24. ENVELOPE NONE;
  25. # TODO: make sqlserver debezium tx_metadata work. It doesn't send the END message
  26. > CREATE SOURCE t1
  27. FROM KAFKA CONNECTION kafka_conn (TOPIC 'sql-server.test.dbo.t1');
  28. > CREATE TABLE t1_tbl FROM SOURCE t1 (REFERENCE "sql-server.test.dbo.t1")
  29. FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
  30. ENVELOPE DEBEZIUM;
  31. $ sql-server-execute name=sql-server
  32. INSERT INTO t1 VALUES (456);
  33. > SELECT * FROM t1_tbl;
  34. 123
  35. 234
  36. 345
  37. 456