Incubator-superset: Does superset support integration with MongoDB?

Created on 18 Jan 2018  ·  17Comments  ·  Source: apache/incubator-superset

I tried connecting using the following SQLAlchemy URI
mongodb://localhost:27017/test

and faced the following error:
ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nCan't load plugin: sqlalchemy.dialects:mongodb"}

Is there any workaround? Please suggest.

inactive

Most helpful comment

so , how may anyone use superset with MongoDB .
Please, tell me any possible way of doing it

All 17 comments

Feel free to contribute a mongodb sqlalchemy dialect.

@priyankajuyal I think there're 3 methods to support mongodb in superset:

  • Implement a mongodb in sqlalchemy, this requires a lot of work and may not be easy to do cause sqlalchemy is a object relational mapper library, while mongodb is not relational.
  • Implement a new connector for superset. Right now superset has two connectors, one is for sqlalchemy, one is for druid, and similar things can be implemented for mongodb, this should be the right choice.
  • Transform mongodb to some relational db, stripe has a deprecated project for this job: https://github.com/stripe/mosql.

4th option:

Use an SQL wrapper like https://dremio.com.

(I am not related to this project or company, but happened to stumble upon it, recently)

5th option:

There is a tool called BI Connector from mongodb, this tool can map mongodb schemata to relational. It's used to interact e.g. with Tableau or other BI Tools. Unfortunately AFAIK it's only available in a paid mongodb version. https://www.mongodb.com/products/bi-connector

@rumbin I don't think there's a Dremio connector for Superset though, have you seen one?

I have created a MongoDB connector for Superset under the name of cosmos. It is still WIP. Feel free to check it out. Star it and post issues so that it can be developed further. https://github.com/ksangeet9ap/incubator-superset

For Dremio, your best bet is probably https://github.com/sqggles/sqlalchemy_dremio

@mistercrunch Any plans on integrating NoSQL databases to Superset?

The real question is "Any plans for NoSQL databases to start supporting SQL?". ElasticSearch just added experimental SQL support, Druid added SQL a few years back. Apache Calcite makes that a lot easier now.

Even though it's totally doable with Superset (check out the superset/connectors folder, and druid/ as an example of NoSQL support), I haven't heard anyone working on it besides the ElasticSearch effort on an open PR. Now that ElasticSearch offers SQL support we'll probably go the SQLAlchemy route.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

so , how may anyone use superset with MongoDB .
Please, tell me any possible way of doing it

1、Mongodb-BI-Connector with sqlalchemy-mongobi
2、Presto MongoDB Connector
@yuxiaorui can you provide an example or more details?

1、Mongodb-BI-Connector with sqlalchemy-mongobi
2、Presto MongoDB Connector

Could you explain how I would implement this?

5th option:

There is a tool called BI Connector from mongodb, this tool can map mongodb schemata to relational. It's used to interact e.g. with Tableau or other BI Tools. Unfortunately AFAIK it's only available in a paid mongodb version. https://www.mongodb.com/products/bi-connector

Its available for free now. I would like to know if someone was able to connect through it

1、Mongodb-BI-Connector with sqlalchemy-mongobi
http://docs.mongodb.com/bi-connector/master/
https://pypi.org/project/sqlalchemy-mongobi/
2、Presto MongoDB Connector
https://prestodb.io/docs/current/connector/mongodb.html

I tried using the 1st option. It gives me driver not found error. I installed it in the same venv also. but still no luck. Did anyone got it working this way?
ERROR: Could not load database driver: mongobi
the exact error when testing connection using sql alchemy uri

Is there anybody using Superset and MongoDB?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbrian picture gbrian  ·  3Comments

lenguyenthedat picture lenguyenthedat  ·  3Comments

thoralf-gutierrez picture thoralf-gutierrez  ·  3Comments

eliab picture eliab  ·  3Comments

kalimuthu123 picture kalimuthu123  ·  3Comments