使用 db-shell - where 子句查询 MapR

Querying MapR with db-shell - where clause

以下作品:

mapr dbshell 'find /sourcepath --q {"$select":"source","$where":{"$and":[{"$eq":{"status":"file_LOAD_START"}}]}}'

以下也适用:

mapr dbshell 'find /sourcepath --q {"$select":"source","$where":{"$and":[{"$eq":{"car_id":"number"}}]}}'

但是下面的不行

mapr dbshell 'find /sourcepath --q {"$select":"source","$where":{"$and":[{"$eq":{"status":"file_LOAD_START"}}, {"$eq":{"car_id":"number"}}]}}'

错误消息指出

"You cannot specify '{"$eq":{"car_id":"number"}}]}}' 作为单个命令中默认 ('') 选项的另一个值。 您之前已经提供了“/sourcepath”。 您是否忘记在另一个选项的值周围添加引号?"

空白处不起作用的原因。

删除{"status":"file_LOAD_START"}}和{"$eq":{"car_id":"number"}}]}}之间的空格解决了问题