Enable case sensitive for SQL queries on Redshift DB

  1. My goal: "set enable_case_sensitive_super_attribute to true;" to allow accessing the super attribute of a raw_data column which contains a json format of data
  2. Issue: Does not seem to be possible in the SQL query directly
  3. Steps I've taken to troubleshoot: Contacted Support and this is the answer they gave me:

It seems like there may be some workarounds that COULD work with your need to set the enable_case_sensitive_super_attribute to true.
You could possibly alter session variables via SQL statements within a query. Or possibly using a JS code block that queries the database session before running your main business logic query. So this would take two steps: set the session attribute with the JS scriptn, then run the main query.
If you need help looking into these options or other solutions, please ask for help on our Developer Community Forum . There are community experts and Retool Community Engineers who can provide you with assistance.

  1. Additional info: -

I am relatively new to Retool, so appreciate any help with this. Thank you

Hi @manuelz,

I am not super familiar with Redshift and super attributes but I was able to find some details on what you could try to accomplish this.

If you have any screenshots of what you have tried already that would be helpful to narrow down if there are any bugs reports or feature requests needed to allow for setting case sensitive to true for a super attribute.

In a SQL command try the below command prior to the main query.

SET enable_case_sensitive_super_attribute TO true

Or try adding that command to the beginning of your main query.

SET enable_case_sensitive_super_attribute TO true;
SELECT raw_data."KeyName" FROM my_table;

Where raw_data is of type SUPER. From what I found online, Redshift defaults to case-insensitive, and accessing "KeyName" and "keyname" is the same.

Let me know if this works for you or if you have a screen shot of any error messages.

Hi @manuelz,

Any updates? Did my suggestion work?