Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodb Custom Query returns "Query failure: with-mongo-connection failed: bad connection details:" #2456

Closed
pygeek opened this issue Apr 28, 2016 · 3 comments

Comments

@pygeek
Copy link
Contributor

pygeek commented Apr 28, 2016

This issue is only present when creating a custom Question on a MongoDB database.


screen shot 2016-04-28 at 9 31 16 am


Here is what is being logged by Metabase:

04-28 13:19:28 ERROR metabase.driver :: {:status :failed,
 :class java.lang.Exception,
 :error "with-mongo-connection failed: bad connection details:",
 :stacktrace
 ["driver.mongo.util$_with_mongo_connection.invokeStatic(util.clj:51)"
  "driver.mongo.util$_with_mongo_connection.invoke(util.clj:42)"
  "driver.mongo$process_query_in_context$fn__33206.invoke(mongo.clj:47)"
  "driver.query_processor$pre_expand$fn__29939.invoke(query_processor.clj:120)"
  "driver.query_processor$pre_add_settings$fn__29935.invoke(query_processor.clj:113)"
  "driver.query_processor$wrap_catch_exceptions$fn__29929.invoke(query_processor.clj:97)"
  "driver.query_processor$process.invokeStatic(query_processor.clj:357)"
  "driver.query_processor$process.invoke(query_processor.clj:348)"
  "driver$process_query.invokeStatic(driver.clj:413)"
  "driver$process_query.invoke(driver.clj:409)"
  "driver$dataset_query.invokeStatic(driver.clj:452)"
  "driver$dataset_query.invoke(driver.clj:418)"
  "api.dataset$fn__18916$fn__18919.invoke(dataset.clj:32)"
  "api.common.internal$wrap_catch_api_exceptions.invokeStatic(internal.clj:219)"
  "api.common.internal$wrap_catch_api_exceptions.invoke(internal.clj:216)"
  "api.dataset$fn__18916.invokeStatic(dataset.clj:26)"
  "api.dataset$fn__18916.invoke(dataset.clj:26)"
  "middleware$enforce_authentication$fn__23903.invoke(middleware.clj:80)"
  "api.routes$fn__24009.invokeStatic(routes.clj:40)"
  "api.routes$fn__24009.invoke(routes.clj:40)"
  "routes$fn__28918.invokeStatic(routes.clj:23)"
  "routes$fn__28918.invoke(routes.clj:23)"
  "middleware$log_api_call$fn__23996.invoke(middleware.clj:260)"
  "middleware$add_security_headers$fn__23956.invoke(middleware.clj:197)"
  "middleware$bind_current_user$fn__23907.invoke(middleware.clj:93)"
  "middleware$wrap_current_user_id$fn__23881.invoke(middleware.clj:62)"
  "middleware$wrap_api_key$fn__23922.invoke(middleware.clj:104)"
  "middleware$wrap_session_id$fn__23874.invoke(middleware.clj:53)"],
 :query {:type "native", :native {:query "db.account.find()"}, :constraints {:max-results 10000, :max-results-bare-rows 2000}},
 :expanded-query nil}

04-28 13:19:28 ERROR metabase.driver :: Query failure: with-mongo-connection failed: bad connection details:

  • I am using the Safari browser.
  • My computer's OS is OS X.
  • I'm running Metabase docker. [locally from the JAR / locally with the Mac App / on AWS / on Herkou / etc.]
  • My database is MongoDB.
  • My Metabase version is 16.1.
@agilliland
Copy link
Contributor

As of right now that's an unsupported feature, but we are working on adding full support for native query execution on Mongo #2072

@pygeek based on your screenshot I'm curious about your expectations for the native syntax. our currently thinking is that we'd support the aggregation pipeline as the native format, not the syntax from the mongo console.

https://docs.mongodb.org/manual/core/aggregation-pipeline/

@camsaul
Copy link
Member

camsaul commented May 4, 2016

@pygeek we've received feedback from others that they'd prefer we implement support for Mongo Aggregation Pipeline queries as the native query option for Mongo; please go ahead and let us know if you have similar or different preferences in a comment on issue #2072.

Closing as duplicate of #2072.

@camsaul camsaul closed this as completed May 4, 2016
@anki-code
Copy link

anki-code commented Jun 9, 2016

@camsaul or @agilliland, could you please tell me more about solution which realised in #2072? I've built the JAR 0.18 version from master. Can I try to use a custom requests for the MongoDB?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants