Skip to content
Snippets Groups Projects
Unverified Commit 50ca0eb0 authored by Natalie's avatar Natalie Committed by GitHub
Browse files

docs - update sql and error troubleshooting (#27964)

parent be435ce6
No related merge requests found
......@@ -4,40 +4,28 @@ title: Troubleshooting error messages
# Troubleshooting error messages
## [API error messages][discourse-search-api-error]
An error message can help you find the right troubleshooting guide. The exact wording depends on your database and Metabase version, so try to look for the closest match.
- Appear in red text when you load a dashboard or run a question.
- Contain a three-digit API error code, such as `400` or `404`.
- If your error message contains part of your SQL query, go to SQL error messages below.
## SQL editor
## [SQL error messages][debugging-sql-syntax]
See if your error details contain any of:
- Appear in red text when you run a question that uses the [SQL editor][sql-editor].
- Contain part of your SQL query, such as a column or table name.
- May also contain a three-digit API error code, such as `400` or `404`.
- [Table or column not found](https://www.metabase.com/learn/debugging-sql/sql-syntax.html#column-or-table-name-is-not-found-or-not-recognized).
- [Function does not exist](https://www.metabase.com/learn/debugging-sql/sql-syntax.html#sql-function-does-not-exist).
- [Permission denied](./data-permissions.md#getting-a-permission-denied-error-message).
### Common SQL error messages
For example, this SQL error tells you that the function `DATEFROMPARTS` does not work on a BigQuery database:
- [Column or table name is "not found" or "not recognized"][sql-error-not-found].
- [Function does not exist][sql-error-function-does-not-exist].
- [Permission denied to a table or schema][permission-denied].
![Sample SQL error message](./images/sample-error-sql.png)
## [Metabase error messages][discourse-search-metabase-error]
- Appear in gray text when you load a dashboard or run a question.
### Common Metabase error messages
## Questions and dashboards
- [Your question took too long](./timeout.md).
- [Still waiting...](./my-dashboard-is-slow.md).
[api-error-message]: #api-error-messages
[debugging-sql-syntax]: https://www.metabase.com/learn/debugging-sql/sql-syntax.html
[discourse-search-api-error]: https://discourse.metabase.com/search?q=api%20error%20message
[discourse-search-metabase-error]: https://discourse.metabase.com/search?q=metabase%20error%20message
[metabase-error-message]: #metabase-error-messages
[sql-editor]: https://www.metabase.com/glossary/native_query_editor.html
[sql-error-function-does-not-exist]: https://www.metabase.com/learn/debugging-sql/sql-syntax.html#sql-function-does-not-exist
[sql-error-message]: #sql-error-messages
[sql-error-not-found]: https://www.metabase.com/learn/debugging-sql/sql-syntax.html#column-or-table-name-is-not-found-or-not-recognized
[permission-denied]: ./data-permissions.md#getting-a-permission-denied-error-message
## Are you still stuck?
If you can't find your error on this page:
- Search or ask the [Metabase community](https://discourse.metabase.com/).
- Search for [known bugs or limitations](./known-issues.md).
......@@ -37,7 +37,7 @@ It's always a good idea to start with a quick sanity check:
If you're having trouble filtering on a:
- [Custom column](../questions/query-builder/introduction.md#creating-custom-columns): check if the custom expression is working as expected. For example, your custom expression might be returning blank values when you expect numbers.
- [SQL field filter](../questions/native-editor/sql-parameters.md#the-field-filter-variable-type): make sure you're using the correct [field filter syntax](../questions/native-editor/sql-parameters.md#field-filter-syntax), then see [Troubleshooting SQL variables](./sql.md#field-filter-variables).
- [SQL field filter](../questions/native-editor/sql-parameters.md#the-field-filter-variable-type): make sure you're using the correct [field filter syntax](../questions/native-editor/sql-parameters.md#field-filter-syntax), then see [Troubleshooting SQL variables](./sql.md#sql-variables-and-field-filters).
**Explanation**
......@@ -74,7 +74,7 @@ Timestamps, in particular, are the root of all evil, so please be patient with y
## Related topics
- [Troubleshooting linked filters](./linked-filters.md)
- [Troubleshooting SQL variables](./sql.md#field-filter-variables)
- [Troubleshooting SQL variables](./sql.md#sql-variables-and-field-filters)
- [Troubleshooting dates and times](./timezones.md)
- [Creating dropdown filters](../data-modeling/metadata-editing.md#changing-a-search-box-filter-to-a-dropdown-filter)
- [Creating SQL filters](../questions/native-editor/sql-parameters.md#the-field-filter-variable-type)
......
docs/troubleshooting-guide/images/sample-error-sql.png

60.5 KiB

......@@ -4,57 +4,30 @@ title: Troubleshooting SQL questions
# Troubleshooting SQL questions
## [I'm getting a SQL syntax error][debugging-sql-syntax]
## SQL syntax errors
The error message:
For some common error messages, see [SQL error messages](./error-message.md#sql).
- Appears in red text when you run a question that uses the [SQL editor][sql-editor].
- Contains part of your SQL query, such as a column or table name.
- May also contain a three-digit API error code, such as `400` or `404`.
## Incorrect results
## [My SQL query results are incorrect][debugging-sql-logic]
- [Aggregations (counts, sums, etc.) are wrong](https://www.metabase.com/learn/debugging-sql/sql-logic#aggregated-results-counts-sums-etc-are-wrong).
- [Results have duplicated rows](https://www.metabase.com/learn/debugging-sql/sql-logic-duplicated-data).
- [Results are missing rows](https://www.metabase.com/learn/debugging-sql/sql-logic-missing-data).
- [Dates and times are wrong](./timezones.md).
- [Data isn't up to date](./sync-fingerprint-scan.md).
- [Aggregations (counts, sums, etc.) are wrong][debugging-aggregations].
- [Results have duplicated rows][debugging-duplicated-data].
- [Results are missing rows][debugging-missing-data].
- [Dates and times are wrong][troubleshooting-datetimes].
- [Data isn't up to date][troubleshooting-database-syncs].
## My SQL variables aren't working
What type of [SQL variable][sql-variable-def] are you using?
### Field filter variables
## SQL variables and field filters
- [Filter widget doesn't display a dropdown menu of values](../data-modeling/metadata-editing.md#changing-a-search-box-filter-to-a-dropdown-filter).
- [SQL query contains a subquery (nested query) or CTE](../questions/native-editor/sql-parameters.md#field-filters-dont-work-with-table-aliases).
- [400 error from BigQuery](../questions/native-editor/sql-parameters.md#some-databases-require-the-schema-in-the-from-clause).
- [SQL syntax error: missing `FROM` clause](../questions/native-editor/sql-parameters.md#include-dependencies-in-your-query).
### Text, number, or date variables
- [No option to display a filter widget](../questions/native-editor/sql-parameters.md#field-filter-compatible-types).
### I don't know the variable type
- [Different types of SQL variables][sql-variable-type].
- [I don't know the SQL variable type](https://www.metabase.com/learn/sql-questions/sql-variables#the-different-types-of-variables-available-for-native-sql-queries).
## Are you still stuck?
If you can’t solve your problem using the troubleshooting guides:
- Search or ask the [Metabase community][discourse].
- Search for [known bugs or limitations][known-issues].
[debugging-aggregations]: https://www.metabase.com/learn/debugging-sql/sql-logic#aggregated-results-counts-sums-etc-are-wrong
[debugging-duplicated-data]: https://www.metabase.com/learn/debugging-sql/sql-logic-duplicated-data
[debugging-missing-data]: https://www.metabase.com/learn/debugging-sql/sql-logic-missing-data
[debugging-sql-logic]: https://www.metabase.com/learn/debugging-sql/sql-logic
[debugging-sql-syntax]: https://www.metabase.com/learn/debugging-sql/sql-syntax
[discourse]: https://discourse.metabase.com/
[known-issues]: ./known-issues.md
[sql-editor]: https://www.metabase.com/glossary/native_query_editor
[sql-variable-def]: https://www.metabase.com/glossary/variable#example-variable-in-metabase
[sql-variable-type]: https://www.metabase.com/learn/sql-questions/sql-variables#the-different-types-of-variables-available-for-native-sql-queries
[troubleshooting-database-syncs]: ./sync-fingerprint-scan.md
[troubleshooting-datetimes]: ./timezones.md
- Search or ask the [Metabase community](https://discourse.metabase.com/).
- Search for [known bugs or limitations](./known-issues.md).
- Hire a [Metabase Expert](https://www.metabase.com/partners/){:target="_blank"}.
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