Skip to content
Snippets Groups Projects
Unverified Commit 99c5a59d authored by github-automation-metabase's avatar github-automation-metabase Committed by GitHub
Browse files

docs: special field filter syntax (#46982) (#46985)


* field filter syntax

* Update docs/questions/native-editor/sql-parameters.md



---------

Co-authored-by: default avatarAlex Yarosh <alexandra@metabase.com>
Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>
parent 46a37133
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,17 @@ A MongoDB native query example might look like this:
For a more in-depth guide, check out [Field Filters: create smart filter widgets for SQL questions][field-filter].
### Field filters in BigQuery and Oracle
Make sure your SQL dialect matches the database you've selected. Common issues involving how tables are quoted in the query:
| Database | Dialect quirk | Example |
| -------- | -------------------------- | -------------------- |
| BigQuery | Schemas and tables must be quoted with backticks. | `` FROM `dataset.table` `` |
| Oracle | Schemas and tables must be quoted in double quotes. | `FROM schema.table` |
For more help, see [Troubleshooting SQL error messages](../../troubleshooting-guide/error-message.md#sql-editor).
## How to create different types of filter widgets
The kind of filter widget that Metabase displays when you create a Field Filter widget depends on a setting for that field in Metabase called **Filtering on this field**. Admins can set this field option to:
......
......@@ -82,17 +82,6 @@ For questions, [dashboards](../../dashboards/start.md), and [models](../../data-
See [History](../../exploration-and-organization/history.md).
## Your SQL syntax must match the dialect used by the database
Make sure your SQL dialect matches the database you've selected. Common errors:
| Database | Do this | Avoid |
| -------- | -------------------------- | -------------------- |
| BigQuery | `` FROM `dataset.table` `` | `FROM dataset.table` |
| Oracle | `FROM "schema"."table"` | `FROM schema.table` |
For more help, see [Troubleshooting SQL error messages](../../troubleshooting-guide/error-message.md#sql-editor).
## Explore SQL question results using the Query Builder
On saved SQL questions without [parameters](./sql-parameters.md), you'll get the **Explore results** button. It will create a new Query Builder question that uses the SQL question results as a data source.
......
......@@ -76,6 +76,10 @@ Metabase needs to know the data type of a column in order to present you with a
Timestamps, in particular, are the root of all evil, so please be patient with your Metabase admin (or yourself!) when trying to get the data type right.
## Field filters in BigQuery and Oracle
If you are getting an error when using field filters with BigQuery or Oracle, make sure you use the correct syntax for the `FROM` clause. See [Field filters in BigQuery and Oracle](../questions/native-editor/sql-parameters.md#field-filters-in-bigquery-and-oracle).
## Missing or incorrect filter values
If your filter dropdown menu displays the wrong values for a column:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment