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

Allow Native Queries for Mongo #2072

Closed
salsakran opened this Issue Mar 2, 2016 · 12 comments

Comments

Projects
None yet
9 participants
@salsakran
Copy link
Contributor

salsakran commented Mar 2, 2016

Right now we only allow native SQL queries. This was initially because hand rolling druid or mongo query dictionaries didn't seem like something people would do.

This issue is meant to gauge community interest in being able to paste and reuse raw mongo/druid queries. Please chime in if this is something you would actually use, and if possible give us a sense of the use case and why the query builder wasn't doing it for you!

@dcoueron

This comment has been minimized.

Copy link

dcoueron commented Mar 16, 2016

+1 on this.

@4Z4T4R

This comment has been minimized.

Copy link

4Z4T4R commented Mar 26, 2016

+2 Please include the ability to run custom MongoDB queries in Metabase... We have a deep need for this functionality in our project. Some things to consider:

  1. Don't bother with any query autocompletion in Mongo queries. If we're writing custom queries, we know what we're doing.
  2. Prevent CUD operations by filtering commands [e.g. db.dropDatabase()] and destructive queries [e.g. bulk.find({foo: 'nar'}).remove() or db.collection.remove({foo.'nar'})]
  3. Honor regular expressions within queries. [e.g. db.collection.find({foo: /^na/})]

Make it easy... focus on reads with queries, projections, and even aggregations. Ignore everything else in your first pass.

Thank you for Metabase! It is super.

@lukemcintyre

This comment has been minimized.

Copy link

lukemcintyre commented Apr 3, 2016

+1 for this. Any idea on timeframes? Mongo support is really great so far guys, good stuff!

@edmarriner

This comment has been minimized.

Copy link

edmarriner commented Apr 27, 2016

This would be huge for us!

@agilliland

This comment has been minimized.

Copy link
Contributor

agilliland commented Apr 27, 2016

@edmarriner which database specifically?

@salsakran salsakran added this to the 0.18.0 milestone Apr 28, 2016

@agilliland agilliland changed the title Allow Native Queries for Mongo + Druid Allow Native Queries for Mongo May 2, 2016

@agilliland

This comment has been minimized.

Copy link
Contributor

agilliland commented May 2, 2016

For folks using Mongo, what is your expected format for inputting the queries? We are looking at doing this via Mongo Aggregation Pipelines, would that work? https://docs.mongodb.org/manual/core/aggregation-pipeline/

So this would be a JSON based input. Thoughts?

@4Z4T4R

This comment has been minimized.

Copy link

4Z4T4R commented May 2, 2016

YES! to aggregation pipelines. They're the best solution for generating
derived tables that we can then just plug back into metabase. You could
just accept an array of stages as input.

Bartosz Solowiej

Senior Software Engineer
Olio Devices

www.oliodevices.com
1-650-360-2278

CONFIDENTIALITY NOTICE: This transmission may contain information which is
Olio confidential and/or legally privileged. The information is intended
only for the use of the individual or entity named on this transmission. If
you are not the intended recipient, you are hereby notified that any
disclosure, copying, or distribution of the contents of this transmission
is strictly prohibited. If you have received this transmission in error,
please immediately notify me by return e-mail and destroy all copies of the
original message.

On Mon, May 2, 2016 at 12:53 PM, Allen Gilliland notifications@github.com
wrote:

For folks using Mongo, what is your expected format for inputting the
queries? We are looking at doing this via Mongo Aggregation Pipelines,
would that work?
https://docs.mongodb.org/manual/core/aggregation-pipeline/

So this would be a JSON based input. Thoughts?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#2072 (comment)

@edmarriner

This comment has been minimized.

Copy link

edmarriner commented May 5, 2016

The aggregation pipeline would be well suited to this I think!
Yep, a JSON based approach seems logical to me 👍

@camsaul camsaul assigned camsaul and unassigned camsaul May 6, 2016

@camsaul camsaul closed this May 6, 2016

@olmaga

This comment has been minimized.

Copy link

olmaga commented Jun 7, 2016

+1

@camsaul

This comment has been minimized.

Copy link
Member

camsaul commented Jun 7, 2016

@olmaga this will ship as part of our upcoming 0.18 release.

@bmurzeau

This comment has been minimized.

Copy link

bmurzeau commented Jun 8, 2016

+1

@camsaul

This comment has been minimized.

Copy link
Member

camsaul commented Jun 8, 2016

@bmurzeau this will ship as part of our upcoming 0.18 release.

@metabase metabase locked and limited conversation to collaborators Jun 8, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.