Querying into CrateDB objects and skip if property

2019-07-27 04:04发布

问题:

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!

回答1:

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



标签: cratedb