Hey Darrel,

From my understanding of the problem, the issue is likely due to Metabase using a $function operator in aggregation queries, which requires server-side JavaScript execution, something DigitalOcean’s MongoDB doesn’t allow.

Since $function is the problem, we need to rewrite the query to remove JavaScript execution. You have a few options:

  1. Replace $function with a native MongoDB aggregation operator

  2. Use a client-side transformation

Could you share the specific MongoDB query that fails? That would help in converting it to a JavaScript-free alternative

Thanks,
Tim