Replace character in string during projecting the data.
I am getting this error for replaceOne operator, which works perfectly directly on mongo, but it's making an issue when I try to use it through metabase
$replaceOne' on server mongo-westus.XXX.xxx.azure.com:10222. The full response is { "ok" : 0.0, "errmsg" : "unknown operator: $replaceOne", "code" : 168, "codeName" : "168"
This error shows when I try to use replaceOne operator on projection section
Hi @alaahammouda
Which version of Mongo are you using? Seems like there has been a lot of changes to that operator, but it's working as expected, when I test with Mongo 5.0 [{"$project":{"_id":"$_id","vendor":"$vendor","category":{"$replaceOne":{input:"$category",find:"G",replacement:"REPLACE"}},"ean":"$ean","title":"$title","id":"$id","price":"$price","created_at":"$created_at","rating":"$rating"}},{"$limit":1048575}]