Querying into CrateDB objects and skip if property

2019-07-27 04:16发布

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!

标签: cratedb
1条回答
放荡不羁爱自由
2楼-- · 2019-07-27 04:57

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

查看更多
登录 后发表回答