Sample Header Ad - 728x90

How to query redshift SUPER for non empty objects

0 votes
2 answers
1650 views
**Context:** I have a column called event_properties which has a lot of values of {} which is a redshift SUPER datatype. A lot of values are of empty object such as: empty event properties **Objective:** Filter out values that aren't an "empty object" **What I've Tried**: - casting as ::text, will result in null values - the len (length) function is not supported for SUPER type **What I'm trying to accomplish:** (the queries below don't work, but should demonstrate what I'm trying to accomplish)
select event_properties from native_app_events where event_properties::text != '{}'
select event_properties from native_app_events where len(event_properties) > 5
Asked by Andrew Wei (205 rep)
Jan 30, 2023, 08:45 PM
Last activity: May 10, 2024, 08:53 PM