troubleshooting

How to handle case sensitivity in column names when parsing JSON with Kafka source in PostgreSQL?

I'm facing an issue where keys are lowercased when parsing JSON using a Kafka source in PostgreSQL, resulting in NULL values for columns with mixed case in the JSON. How can I handle this case sensitivity in column names?

Ma

Malthe Borch

Asked on Dec 08, 2022

  1. In PostgreSQL, column names are case-insensitive by default.
  2. To handle case sensitivity in column names, you can double-quote the column name when creating the table.
  3. Quoting an identifier makes it case-sensitive, while unquoted names are always folded to lower case.
  4. Use double quotes around the column name in the CREATE TABLE statement to maintain the original case.

Example:

CREATE TABLE t ("myKey" int);
Dec 08, 2022Edited by