I am creating a “Query” from Metabase’s graphical interface and I need to add a filter so that it only shows data from a column in my database called “interviews” that do not contain “[]” … meaning, if the column has only “[]”, it should not be counted. This column has JSON information, but if the column only contains “[]”, it shouldn’t be included.
If I use a normal filter, it only gives me the options “Empty” and “Not Empty”, so I’m trying to customize a filter, but I’m not sure how to add it using “doesNotContain”.
If not, then go into Table Metadata and change the field semantic type to ‘Category’ so it gets treated as text, then the other string filter options (like ‘does not contain’) may become available.
If you need it to be unpacked, this might help as you can check if all the unpacked columns are empty. This might not be semantically the same as other possibilities though–the columns won’t unpack if the column is an empty string instead of an empty array either, if you need to tell the difference between the two.
Another option is to create a view in the database that adds a (boolean) column that checks for this condition that you can apply a filter to in Metabase.