create-in-v0.27.0-csv.td 1.0 KB

123456789101112131415161718192021222324252627282930
  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=csv
  10. $ kafka-ingest topic=csv format=bytes
  11. id,value
  12. 1,person
  13. >[version>=7800] CREATE CONNECTION IF NOT EXISTS kafka_conn TO KAFKA (
  14. BROKER '${testdrive.kafka-addr}',
  15. SECURITY PROTOCOL PLAINTEXT
  16. )
  17. >[version<7800] CREATE CONNECTION IF NOT EXISTS kafka_conn TO KAFKA (
  18. BROKER '${testdrive.kafka-addr}'
  19. )
  20. > CREATE SOURCE csv_upgrade_no_header
  21. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-csv-${testdrive.seed}')
  22. FORMAT CSV WITH 2 COLUMNS
  23. > CREATE SOURCE csv_upgrade_no_header_alias (al, sia)
  24. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-csv-${testdrive.seed}')
  25. FORMAT CSV WITH 2 COLUMNS