Hello, im trying to add custom mapping to the "id" column in my database (Mongodb connected via connection string):
As you can see its a type/integer and i have no nulls in my db so it should let me custom map it but:
It has only use original value....
ive seen this issue Custom Mapping is not available on Mongodb collections' fields · Issue #7462 · metabase/metabase · GitHub
which said it worked in v 0.41.1. I tried it in both latest version (0.41.6) and version 0.41.1 and both of them didnt let me the option to custom map it
Hi @jackfish823
Make sure you set it to "A list of all values" and do a browser refresh:
https://github.com/metabase/metabase/issues/16322 - upvote by clicking on the first post
1 Like
Thank you for the quick replay!
it worked!
PS: is there any way to insert "js function to a mongo aggregation?" something like:
{
body: function (status) {
var arr = [];
arr[1] = "Planned";
arr[2] = "On Going";
arr[3] = "Done";
return arr[status]
},
args: ["$_id.status"],
lang: "js"
}
@jackfish823 No, Native query does not support functions like that.