start-offset-after.td 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. # Insert 10K values prior to restart and check that we never re-ingest
  11. # the entire topic as observed by the librdkafka counters
  12. #
  13. $ set count=1000
  14. $ set keyschema={
  15. "type": "record",
  16. "name": "Key",
  17. "fields": [
  18. {"name": "f1", "type": "string"}
  19. ]
  20. }
  21. $ set schema={
  22. "type" : "record",
  23. "name" : "test",
  24. "fields" : [
  25. {"name":"f2", "type":"string"}
  26. ]
  27. }
  28. $ kafka-ingest format=avro topic=offset key-format=avro key-schema=${keyschema} schema=${schema} repeat=${count} timestamp=4
  29. {"f1": "d${kafka-ingest.iteration}"} {"f2": "d${kafka-ingest.iteration}"}
  30. > SELECT COUNT(*) FROM start_offset_tbl;
  31. 3900
  32. > SELECT COUNT(*) FROM kafka_time_offset_tbl;
  33. 3000