02-after-rehydration.td 865 B

12345678910111213141516171819202122232425262728293031
  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. $ set keyschema={
  10. "type": "record",
  11. "name": "Key",
  12. "fields": [
  13. {"name": "key", "type": "string"}
  14. ]
  15. }
  16. $ set schema={
  17. "type" : "record",
  18. "name" : "test",
  19. "fields" : [
  20. {"name":"f1", "type":"string"},
  21. {"name":"f2", "type":"long"}
  22. ]
  23. }
  24. $ kafka-ingest format=avro topic=upsert key-format=avro key-schema=${keyschema} schema=${schema}
  25. {"key": "fish"} {"f1": "random", "f2": 3}
  26. > SELECT f2 from upsert_tbl
  27. 3