canary-redpanda-privatelink-sources.td 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. $ kafka-create-topic topic=bytes-privatelink replication-factor=3
  10. $ kafka-ingest format=bytes key-terminator=: key-format=bytes topic=bytes-privatelink repeat=100
  11. abc:abc
  12. > DROP SOURCE IF EXISTS redpanda_privatelink_bytes CASCADE;
  13. > DROP CONNECTION IF EXISTS redpanda_privatelink_conn CASCADE;
  14. > DROP SECRET IF EXISTS redpanda_privatelink_password CASCADE;
  15. > CREATE SECRET redpanda_privatelink_password AS '${arg.redpanda-password}';
  16. > VALIDATE CONNECTION privatelink_conn;
  17. # When run immediately: ERROR: Meta data fetch error: BrokerTransportFailure
  18. $ sleep-is-probably-flaky-i-have-justified-my-need-with-a-comment duration=120s
  19. > CREATE CONNECTION redpanda_privatelink_conn TO KAFKA (
  20. AWS PRIVATELINK privatelink_conn (PORT 30292),
  21. SASL MECHANISMS = 'SCRAM-SHA-512',
  22. SASL USERNAME = '${arg.redpanda-username}',
  23. SASL PASSWORD = SECRET redpanda_privatelink_password
  24. );
  25. > CREATE SOURCE redpanda_privatelink_bytes
  26. IN CLUSTER canary_sources
  27. FROM KAFKA CONNECTION redpanda_privatelink_conn (TOPIC 'testdrive-bytes-privatelink-${testdrive.seed}');
  28. > CREATE TABLE redpanda_privatelink_bytes_tbl FROM SOURCE redpanda_privatelink_bytes (REFERENCE "testdrive-bytes-privatelink-${testdrive.seed}")
  29. FORMAT BYTES
  30. ENVELOPE NONE;
  31. > CREATE MATERIALIZED VIEW redpanda_privatelink_bytes_view AS SELECT COUNT(*) AS cnt FROM redpanda_privatelink_bytes_tbl;
  32. > CREATE DEFAULT INDEX ON redpanda_privatelink_bytes_view;
  33. > SELECT cnt from redpanda_privatelink_bytes_view
  34. 100