Skip to content
Snippets Groups Projects
user avatar
Walter Leibbrandt authored
* Port tests from expectations to clojure.test

* Fix docstring

* Added :question template tag type with lookup

* s/question/card/

* Fix typo: s/substitue/substitute/g

* Wrap card query parameter data in a record

Just like `FieldFilter`s.

* Unrelated: Improve test layout

* Add substitution of card query parameters in queries

This implementation is incomplete.

* Finish substitution of card query in parent query

* Basic FE support for question template tags

* Update card ID on tag name update

Also, don't use `\d` in regexes.

* yarn prettier

* Add support for MBQL queries in template tag lookup

* Return query strings directly as tag value

* Fix query type lookup

* Initialize QP store for MBQL→native conversion

* Fix MBQL to native query conversion

* Port tests from expectations to clojure.test

* Add middleware to resolve tables/fields from referenced cards

This needs to happen before `substitute-parameters` in the QP pipeline,
so that `substitute-parameters` can convert any MBQL queries (from
referenced cards) into native queries. Maybe it should be consolidated
with the other resolution steps.

* Use mbql-query util instead of manual query def

* Add docstring to now public function

* Remove unused import

* Fix docstring positioning :face_palm:



* Clean ns declaration

* Convert tests to clojure.test

* Be more specific about errors we're looking expecting

Invalid queries caused unexpected exceptions to be thrown when checking
permissions.

* Recursively check permissions of referenced queries

* Add incomplete test [WIP]

* Finish permission check test for referenced MBQL queries

* Add tests for referenced native queries perms check

* Clean ns

* Use existing mbql-to-native middleware

Rather than calling driver-specific `mbql->native` directly.

* Fix formatting

* Use more comprehensive qp func for converting query to native

* front end updates

* Check that all referenced queries are from the same db

* Add test for checking db id of referenced MBQL query

* Clean ns

* add metadata and better error states to UI

* move error message beneath the question picker

* Combine `vals`+`filter`+`map` into a single `keep`

* Rename `CardQuery`→`ReferencedCardQuery`

* Cosmetic: fix typo and formatting

* Test substitution of multiple sub-queries

* Test CTE syntax substitution of multiple sub-queries

* Clean ns

* Clean ns

* Simplify referenced card substitution tests

* Test recursive sub-query substitution

* Cosmetic: typos

* Fix parameter names in comments

* Check that queries don't include circular sub-queries

* Clean ns

* Give users a more user-friendly error for circular referencing sub-queries

* Test referencing queries with parameters

* Update src/metabase/query_processor/middleware/resolve_referenced.clj

Co-Authored-By: default avatarMaz Ameli <maz@metabase.com>

* Fix error message and combine card name queries

* Wrap sub-query error in a more user friendly explanation

* Cosmetic: function argument alignment

* Test error handling of referenced sub-queries

* Remove unused 1-arity version of `card-subquery-graph`

* Cosmetic: indentation

* Normalize l10n of error messages

* Reuse functions for looking up referenced cards from query

* implement FE PR feedback

* card -> card_id backend changes

* fix tests

* fix another test

* disallow space between # and number

* Align new middleware with newer QP architecture

* Align sub-query error handling with the new QP

It seems like exceptions are handled more consistently in the new QP, so
we can be less hacky.

* (Re)wrap sub-query errors in user-friendly expalanation

* Rename `xformf`→`rff` to align with QP changes

* force cypress click on select placeholder

* move popover attachement and cap its height

* icon spacing

* customize highlighting for template tags

Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
Co-authored-by: default avatarMaz Ameli <maz@metabase.com>
013a6a0d
History

Metabase

Metabase is the easy, open source way for everyone in your company to ask questions and learn from data.

Metabase Product Screenshot

Latest Release GitHub license Circle CI Gitter chat

Features

  • 5 minute setup (We're not kidding)
  • Let anyone on your team ask questions without knowing SQL
  • Rich beautiful dashboards with auto refresh and fullscreen
  • SQL Mode for analysts and data pros
  • Create canonical segments and metrics for your team to use
  • Send data to Slack or email on a schedule with Pulses
  • View data in Slack anytime with MetaBot
  • Humanize data for your team by renaming, annotating and hiding fields
  • See changes in your data with alerts

For more information check out metabase.com

Supported databases

  • Postgres
  • MySQL
  • Druid
  • SQL Server
  • Redshift
  • MongoDB
  • Google BigQuery
  • SQLite
  • H2
  • Oracle
  • Vertica
  • Presto
  • Snowflake
  • SparkSQL

Don't see your favorite database? File an issue to let us know.

Installation

Metabase can be run just about anywhere so checkout our Installation Guides for detailed instructions for various deployments. Here's the TLDR:

Docker

To run Metabase via Docker, just type

docker run -d -p 3000:3000 --name metabase metabase/metabase

JVM Jar

To run the jar you will need to have a Java Runtime installed. As a quick check to see if you system already has one, try

java -version

If you see something like

java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

you are good to go. Otherwise, download the Java Runtime Environment at http://java.com/

Go to the Metabase Download Page and download the current build. Place the downloaded jar into a newly created directory (as it will create some files when it is run), and run it on the command line:

java -jar metabase.jar

Now, open a browser and go to http://localhost:3000 , and you will be asked a set of questions that will set up a user account, and then you can add a database connection. For this to work you will need to get some information about which database you want to connect to, such as the Host Name and Port that it is running on, the Database Name and the User and Password that you will be using.

Once you have added this connection, you will be taken into the app and you'll be ready to ask your first question.

For a more detailed walkthrough, check out our Getting Started guide.

Frequently Asked Questions

Some questions come up over and over again. Check here first: FAQ

Security Disclosure

Security is very important to us. If you discover any issue regarding security, please disclose the information responsibly by sending an email to security@metabase.com and not by creating a GitHub issue.

Contributing

To get started with a development installation of the Metabase, follow the instructions at our Developers Guide.

Then take a look at our Contribution Guide for information about our process and where you can fit in!

Talk to other contributors in our Gitter room.

Internationalization

We want Metabase to be available in as many languages as possible. See what translations are available and help contribute to internationalization using our project over at POEditor

Extending and Deep Integrations

Metabase also allows you to hit our Query API directly from Javascript to integrate the simple analytics we provide with your own application or third party services to do things like:

  • Build moderation interfaces
  • Export subsets of your users to third party marketing automation software
  • Provide a specialized customer lookup application for the people in your company

Danger zone

The button below will deploy the branch where this README.md lives onto Heroku. Metabase developers use it to deploy branches of Metabase to test our PRs, etc. We DO NOT recommend you using this for production. Instead, please use a stable build.

Deploy

License

Unless otherwise noted, all Metabase source files are made available under the terms of the GNU Affero General Public License (AGPL).

See LICENSE.txt for details and exceptions.

Unless otherwise noted, all files © 2019 Metabase, Inc.