30-configure-debezium.td 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. # Note that this file is *not* reentrant. Debezium does not allow
  11. # error-free dropping of objects that may or may not exist
  12. # using the same set of commands for all cases.
  13. #
  14. # Furthermore, doing a couple of REST calls against the same Debezium
  15. # connector is an easy way to bork it, so please always do
  16. #
  17. # ./mzcompose -down v
  18. #
  19. # before running this test framework again.
  20. #
  21. #
  22. # We need to sleep here otherwise there is a race condition between taking
  23. # the initial snapshot and the beginning of regular replication which causes
  24. # the data from the initial snapshot to be replicated twice.
  25. #
  26. $ sleep-is-probably-flaky-i-have-justified-my-need-with-a-comment duration="10s"
  27. $ http-request method=POST url=http://debezium:8083/connectors content-type=application/json
  28. {
  29. "name": "sql-server-connector",
  30. "config": {
  31. "connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
  32. "database.hostname": "sql-server",
  33. "database.encrypt": "false",
  34. "database.port": "1433",
  35. "database.user": "sa",
  36. "database.password": "${arg.sa-password}",
  37. "database.names": "test",
  38. "database.server.name": "sql-server",
  39. "database.history.kafka.bootstrap.servers": "kafka:9092",
  40. "database.history.kafka.topic": "schema-changes.history",
  41. "schema.history.internal.kafka.bootstrap.servers": "kafka:9092",
  42. "schema.history.internal.kafka.topic": "schemahistory.sql-server",
  43. "snapshot.isolation.mode": "exclusive",
  44. "provide.transaction.metadata": "true",
  45. "topic.prefix": "sql-server"
  46. #,
  47. # "signal.data.collection": "test.dbo.debezium_signal"
  48. }
  49. }
  50. # Sleep for 10 seconds, as Debezium may fail to replicate any
  51. # statements that come immediately afterwards
  52. $ sleep-is-probably-flaky-i-have-justified-my-need-with-a-comment duration="10s"