1

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_entityproperty.

Thanks!

Taher A. Ghaleb
  • 5,120
  • 5
  • 31
  • 44
Pablo D
  • 393
  • 2
  • 6
  • 22

1 Answers1

0

Your query should have single quotes around not equal operator SELECT "attrs","location" FROM "doc"."raw_foo" WHERE attrs['management_entity'] != '' LIMIT 100;

metase
  • 1,169
  • 2
  • 16
  • 29