I am trying to run a simple mongoDB query which returns the total count of documents in a collection with a variable which verdict_time which has been mapped to the corresponding field using field filter. The query is as follows:
[
{
"$match": {
"$expr": {{verdict_time}}
}
},
{
"$count": "count"
}
]
while running this query without passing any data to the variable it gives the appropriate results. But while passing any date as the filter I am getting the following error:
Command failed with error 16020 (Location16020): 'Expression $gte takes exactly 2 arguments. 1 were passed in.' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "Expression $gte takes exactly 2 arguments. 1 were passed in.", "code": 16020, "codeName": "Location16020"}
I want to understand if there is a problem in my approach or does metabase does not support vatibale for mongo queries.
Extra Deets:
- MongoDB Version: 7.0.12
- Metabase Open Source Version: v0.50.17
Suvam Behera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.