envelope-none-bytes-before.td 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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=envelope-none-bytes
  10. $ kafka-ingest topic=envelope-none-bytes format=bytes repeat=5000
  11. ABC
  12. XYZ
  13. > CREATE CONNECTION IF NOT EXISTS kafka_conn TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT);
  14. > CREATE SOURCE envelope_none_bytes
  15. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-envelope-none-bytes-${testdrive.seed}')
  16. > CREATE TABLE envelope_none_bytes_tbl FROM SOURCE envelope_none_bytes (REFERENCE "testdrive-envelope-none-bytes-${testdrive.seed}")
  17. FORMAT BYTES
  18. INCLUDE PARTITION AS kafka_partition, OFFSET AS mz_offset
  19. ENVELOPE NONE
  20. > SELECT COUNT(*) FROM envelope_none_bytes_tbl
  21. 10000
  22. $ kafka-create-topic topic=envelope-none-text
  23. $ kafka-ingest topic=envelope-none-text format=bytes repeat=5000
  24. ABC
  25. XYZ
  26. > CREATE SOURCE envelope_none_text
  27. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-envelope-none-text-${testdrive.seed}')
  28. > CREATE TABLE envelope_none_text_tbl FROM SOURCE envelope_none_text (REFERENCE "testdrive-envelope-none-text-${testdrive.seed}")
  29. FORMAT TEXT
  30. INCLUDE PARTITION AS kafka_partition, OFFSET AS mz_offset
  31. ENVELOPE NONE
  32. > SELECT COUNT(*) FROM envelope_none_text_tbl
  33. 10000