all-things-risingwave

How to use JSONB array as an SQL datatype and stream data from a Kafka topic in a table?

I am trying to use a JSONB array as an SQL datatype and stream data from a Kafka topic into a table. However, I am facing issues with mapping the data properly. How can I achieve this?

Jf

Jf p

Asked on Jul 07, 2023

  1. To use JSONB array as an SQL datatype, you can define the column as jsonb[] in the table creation.

  2. When streaming data from a Kafka topic, ensure that the column names in the create source statement match the keys in the JSON event.

  3. To stream data with embedded arrays of JSON, define the column as jsonb[] in the create source statement.

  4. Use SOME_COLUMN::jsonb for casting instead of to_jsonb.

  5. Check the log in the compute node for any errors and ensure you are using the latest version of the platform.

Jul 07, 2023Edited by