I'm trying to make a query into my CrateDB querying in objects where a property may exist. But I'm having some issues getting a ColumnUnknownException
.
My query looks quite easy:
SELECT "attrs","location" FROM "doc"."raw_foo" WHERE attrs['management_entity'] != "" LIMIT 100;
attrs
column is an object with many attributes and, as I told before, some rows have management_entity
property.
Thanks!
Your query should have single quotes around not equal operator
SELECT "attrs","location" FROM "doc"."raw_foo" WHERE attrs['management_entity'] != '' LIMIT 100;