Skip to content
Snippets Groups Projects
Unverified Commit 0c40e756 authored by Alex Yarosh's avatar Alex Yarosh Committed by GitHub
Browse files

docs: minor 51 notes (#49191)


* minor 51 notes

* Update docs/questions/sharing/visualizations/line-bar-and-area-charts.md

* link

* Apply suggestions from code review

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

* review

---------

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>
parent a85f7507
No related branches found
No related tags found
No related merge requests found
Showing
with 83 additions and 40 deletions
......@@ -60,6 +60,8 @@ Single Date and Date Range will provide a calendar widget, while the other optio
You can add a time grouping widget to a dashboard to change how charts are grouped by time. For example, you may want to look at the time series charts grouped by month by default, but give people the option to view the results by other groupings: by week, by quarter, and so on.
> Time grouping parameter widget can only be connected to questions built with the [graphical query builder](../questions/query-builder/introduction.md).
This widget doesn't filter data in the charts; the widget just changes the time granularity for any cards that have a datetime field connected to the widget.
You can group by:
......@@ -128,6 +130,8 @@ To undo this auto-connecting of cards, click on the toast that pops up when Meta
If you're trying to connect a filter to a card with a native/SQL questions, you'll need to [add a variable or field filter to your query](../questions/native-editor/sql-parameters.md). For an in-depth article, check out [Adding filters to dashboards with SQL questions](https://www.metabase.com/learn/dashboards/filters).
You can't connect a time grouping parameter widget to a card with a SQL question.
## Wiring up dashboard filters to text cards
You can even wire up filters to text cards, but only if [the text card includes a variable](./introduction.md#including-variables-in-text-cards).
......
---
title: Interactive dashboards
redirect_from:
- /docs/latest/users-guide/interactive-dashboards
- /docs/latest/users-guide/interactive-dashboards
---
# Interactive dashboards
......@@ -42,7 +42,7 @@ For questions composed using the query builder, you can select from three option
- Go to a custom destination.
- Update a dashboard filter (if the dashboard has a filter).
SQL questions will only have the option to **Go to a custom destination**, and **Update a dashboard filter**, as the drill-through menu is only available to questions composed with the query builder.
SQL questions will only have the option to **Go to a custom destination**, and **Update a dashboard filter**.
If your dashboard has a filter, you'll also see an option to [update the filter](#use-a-chart-to-filter-a-dashboard).
......@@ -94,11 +94,11 @@ What we need to do here is to type in the full URL of where a user should go whe
For example, we could type a URL like this:
```
https://www.metabase.com/search.html?query={% raw %}{{Category}}{% endraw %}
```
```
https://www.metabase.com/search.html?query={% raw %}{{Category}}{% endraw %}
```
The important part is the `{% raw %}{{Category}}{% endraw %}` bit. What we’re doing here is referring to the `Category` that the user clicked on. So if a user clicks on the `Widget` bar in our chart, the value of the `Category` column for that bar (`Widget`) would be inserted into our URL: `https://www.metabase.com/search.html?query=Widget`. Your URL can use as many column variables as you want - you can even refer to the same column multiple times in different parts of the URL. Click on the dropdown menu **Values you can reference** to see your options for which variables you can include in the URL.
The important part is the `{% raw %}{{Category}}{% endraw %}` bit. What we’re doing here is referring to the `Category` that the user clicked on. So if someone clicks on the `Widget` bar in our chart, the value of the `Category` column for that bar (`Widget`) would be inserted into our URL: `https://www.metabase.com/search.html?query=Widget`. Your URL can use as many column variables as you want - you can even refer to the same column multiple times in different parts of the URL. To see which variables you can include in the URL, click on the dropdown menu **Values you can reference**.
Next we’ll click **Done**, then **Save** our dashboard. Now when we click our chart, we’ll be taken to the URL that we entered above, with the value of the clicked bar inserted into the URL.
......
......@@ -41,7 +41,7 @@ Note: you won’t be able to add another saved question to multi-series visualiz
## Combining two saved questions
If you already have two or more saved questions you’d like to compare, and they share a dimension, they can be combined onto a single dashboard card. You can even compare questions that pull data from different databases. Here’s how:
If you already have two or more saved questions you’d like to compare, and they have the same first dimension, they can be combined onto a single dashboard card. You can even compare questions that pull data from different databases. Here’s how:
1. Add a question with a dimension like time or category to a dashboard. In practice, these will usually be line charts or bar charts.
......
......@@ -144,6 +144,10 @@ While data types themselves can't be edited in Metabase, admins can manually [ca
See [Working with JSON](./json-unfolding.md).
### Arrays
Metabase currently does not support array types with any database. You'll only be able to use **Is empty** or **Is not empty** filters on columns containing arrays.
## Further Reading
- [Exploring data with Metabase's data browser](https://www.metabase.com/learn/getting-started/data-browser.html).
......
......@@ -68,3 +68,4 @@ For example, if you upload a CSV with JSON in it, you might need to update the d
- [PostgreSQL](../databases/connections/postgresql.md)
- [MySQL](../databases/connections/mysql.md)
- [Druid (JDBC)](../databases/connections/druid.md)
- [BigQuery](../databases/connections/bigquery.md) (always enabled)
......@@ -23,7 +23,7 @@ For a deep dive on why and how to use models, check out our [Learn article on mo
You can use models to:
- Create, uh, models, with model here meaning an intuitive description of some concept in your business that you codify as a set of columns. An example model could be a "customer", which is a table that pulls together customer information from multiple tables and adds computed columns, like adding a lifetime value (LTV) column. This model represents the [measures and dimensions][measures-dimensions] that you think are relevant to your understanding of your customers.
- Let people explore the results of SQL queries with the drill-through menu and query builder (provided you [set the column types](#column-type)).
- Let people explore the results of SQL queries with the query builder (provided you [set the column types](#column-type)).
- Create summary tables that pull in or aggregate data from multiple tables.
- Clean up tables with unnecessary columns and rows filtered out.
......@@ -82,7 +82,7 @@ You can also edit the model's metadata.
## Add metadata to columns in a model
Metadata is the secret sauce of models. When you write a SQL query, Metabase can display the results, but it can't "know" what kind of data it's returning (like it can with questions built using the query builder). What this means in practice is that people won't be able to drill-through the results, or explore the results with the query builder, because Metabase doesn't understand what the results are. With models, however, you can tell Metabase what kind of data is in each returned column so that Metabase can still do its drill-through magic. Metadata will also make filtering nicer by showing the correct filter widget, and it will help Metabase to pick the right visualization for the results.
Metadata is the secret sauce of models. When you write a SQL query, Metabase can display the results, but it can't "know" what kind of data it's returning (like it can with questions built using the query builder). What this means in practice is that people won't be able explore the results with the query builder, because Metabase doesn't understand what the results are. With models, however, you can tell Metabase what kind of data is in each returned column so that Metabase can still do its query magic. Metadata will also make filtering nicer by showing the correct filter widget, and it will help Metabase to pick the right visualization for the results.
If you only set one kind of metadata, set the **Column type** to let Metabase know what kind of data it's working with.
......@@ -102,7 +102,7 @@ For models based on SQL queries, you can tell Metabase if the column has the sam
You can set the [column type][column-type]. The default is "No special type".
If your model is based on a SQL query and you want people to be able to explore the results with the query builder and drill-through menu, you'll need to set the [column type](./field-types.md) for each column in your model.
If your model is based on a SQL query and you want people to be able to explore the results with the query builder, you'll need to set the [column type](./field-types.md) for each column in your model.
### This column should appear in...
......
......@@ -83,11 +83,7 @@ See the PostgreSQL docs for a table about the different [SSL Modes](https://jdbc
If you set the SSL Mode to either "verify-ca" or "verify-full", you'll need to specify a root certificate (PEM). You have the option of using a **Local file path** or an **Uploaded file path**. If you're on Metabase Cloud, you'll need to select **Uploaded file path** and upload your certificate.
### Use an SSH tunnel
See our [guide to SSH tunneling](../ssh-tunnel.md).
### Authenticate client certificate
#### Authenticate client certificate
Toggle on to bring up client certificate options.
......@@ -109,6 +105,12 @@ openssl pkcs8 -topk8 -inform PEM -outform DER -in client-key.pem -out client-key
Note: if you're using GCP and you managed to issue client certificates, everything will be given in PEM format, you only need to transform the client-key.pem into a client-key.der for the "SSL Client Key"
### Use an SSH tunnel
See our [guide to SSH tunneling](../ssh-tunnel.md).
## Advanced settings
### Unfold JSON Columns
For PostgreSQL databases, Metabase can unfold JSON columns into component fields to yield a table where each JSON key becomes a column. JSON unfolding is on by default, but you can turn off JSON unfolding if performance is slow.
......
......@@ -88,7 +88,7 @@ In this example of orders by product category per month, clicking on a data poin
- **Automatic insights**: See orders for a particular category over a shorter time range.
- **Filter by this value**: update the chart based on the value you clicked: equal to, less than, greater than, or not equal to.
> Note that while charts created with SQL don't currently have the drill-through menu, you can add SQL questions to a dashboard and customize their click behavior. You can send people to a [custom destination](https://www.metabase.com/learn/building-analytics/dashboards/custom-destinations.html) (like another dashboard or an external URL), or have the clicked value [update a dashboard filter](https://www.metabase.com/learn/building-analytics/dashboards/cross-filtering.html).
> Note that while charts created with SQL currently only have [limited drill-through menu](../questions/native-editor/writing-sql.md#drill-though-in-sql-questions), you can add SQL questions to a dashboard and customize their click behavior. You can send people to a [custom destination](https://www.metabase.com/learn/building-analytics/dashboards/custom-destinations.html) (like another dashboard or an external URL), or have the clicked value [update a dashboard filter](https://www.metabase.com/learn/building-analytics/dashboards/cross-filtering.html).
Clicking on a table cell will often allow you to filter the results using a comparison operator, like =, >, or <. For example, you can click on a table cell, and select the less than operator `<` to filter for values that are less than the selected value.
......
---
title: observability-with-prometheus
title: Observability with Prometheus
---
# Observability with Prometheus
......@@ -47,24 +47,24 @@ Change into the Prometheus directory, add the following YAML file to configure y
```yaml
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
monitor: "codelab-monitor"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
- job_name: "prometheus"
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
# use whatever port here that you set for MB_PROMETHEUS_SERVER_PORT
static_configs:
- targets: ['localhost:9191']
- targets: ["localhost:9191"]
```
You need to change the "target" to where Metabase is, for this particular example, Metabase resides in the same host where Prometheus is running ("localhost").
......
docs/questions/images/bulk-filter-modal.png

180 KiB | W: | H:

docs/questions/images/bulk-filter-modal.png

207 KiB | W: | H:

docs/questions/images/bulk-filter-modal.png
docs/questions/images/bulk-filter-modal.png
docs/questions/images/bulk-filter-modal.png
docs/questions/images/bulk-filter-modal.png
  • 2-up
  • Swipe
  • Onion skin
docs/questions/images/data-picker.png

170 KiB

docs/questions/images/legend.png

69.8 KiB

......@@ -88,13 +88,12 @@ On saved SQL questions without [parameters](./sql-parameters.md), you'll get the
![Explore results button](../images/explore-results.png)
## To enable drill-through, turn a SQL question into a model and set the data types
## Drill-though in SQL questions
Visualizations created with SQL do not have [drill-through][drill-through] capability. To enable drill-through on a SQL question, you can turn it into a model:
Visualizations created with SQL have limited [drill-through][drill-through] capabilities:
1. Save the SQL question and [turn it into a model](../../data-modeling/models.md#create-a-model-from-a-saved-question).
2. [Edit the column metadata](../../data-modeling/metadata-editing.md#column-field-settings) in the model's settings. Make sure to set the data types for all the columns.
3. [Create a Query Builder question](../query-builder/introduction.md#creating-a-new-question-with-the-query-builder) based on the model. You should be able to use drill-through on this question, if you configured the metadata correctly.
- You can filter results of SQL queries by clicking on data points, zoom in on time series or maps, and use some [column header actions](../sharing/visualizations/table.md#column-heading-options-for-filtering-and-summarizing).
- You won't be able to drill down to unaggregated records, change time granularity, or break out by categories or locations.
## Caching results
......
......@@ -20,6 +20,7 @@ From the **+ New** dropdown, select **Question**, then pick your starting data:
You can start a question from:
- **A model**. A [model](../../data-modeling/models.md) is a special kind of saved question meant to be used as a good starting point for questions. Sometimes these are called derived tables, as they usually pull together data from multiple raw tables.
- **A metric**. [Metrics](../../data-modeling/metrics.md) are pre-defined calculations. If you pick a metric as a starting point for a question, Metabase will create a question with the same data source as the selected metric, and apply the metric. You'll be able to add more joins, filter, and summaries.
- **Tables**. You'll need to specify the database and the table in that database as the starting point for your question.
- A **saved question**. You can use the results of any question as the starting point for a new question.
......@@ -42,13 +43,21 @@ This is the query builder's editor. It has three default steps.
- [Filtering](#filtering)
- [Summarizing and grouping by](#summarizing-and-grouping-by)
You can also add steps for [joining data](#joining-data), [custom columns](#creating-custom-columns), and [sorting results](#sorting-results).
To the right of each completed step is a **Preview** button (looks like a Play button - a triangle pointing to the right) that shows you the first 10 rows of the results of your question up to that step.
![Previewing results](../images/preview-table.png)
## Picking data
The data section is where you select the data you want to work with. Here you'll pick a [model](../../data-modeling/models.md), a table from a database, or a saved question. You can click on a table to select which columns you want to include in your results. See also [adding or removing columns in a table](#adding-or-removing-columns-in-a-table).
The data section is where you select the data you want to work with. Here you'll pick a [model](../../data-modeling/models.md), a [metric](../../data-modeling/metrics.md), a table from a database, or a saved question.
![data picker](../images/data-picker.png)
You can see the data source in a new browser tab by Cmd/Ctrl+Clicking on the data source's name in the query builder.
To choose which columns to include in your query, click on the arrow next to the data source . You'll also be able [hide columns ](#adding-or-removing-columns-in-a-table) from the table view once you visualize your results.
## Joining data
......@@ -68,7 +77,7 @@ Once you're happy with your filter, click **Add filter**, and visualize your res
If you want to edit your filter, just click the little purple filter at the top of the screen. If you click on the X, you'll remove your filter. You can add as many filters as you need.
## Filter types
### Filter types
Depending on the data type of the column, Metabase will present different filtering options.
......@@ -77,13 +86,13 @@ Depending on the data type of the column, Metabase will present different filter
- **Date columns** give you a lot of options to filter by specific date ranges, relative date ranges, and more.
- **Structured data columns**, typically JSON or XML, can only be filtered by "Is empty" or "Not empty". Some databases, however, support [JSON unfolding](../../data-modeling/json-unfolding.md), which allows you to split up JSON data into separate columns, which you can then filter on.
## Filter multiple columns
### Filter multiple columns
When viewing a table or chart, clicking on the **Filter** will bring up the filter modal.
![Bulk filter modal](../images/bulk-filter-modal.png)
Here you can add multiple filters to your question in one go (which can save you a lot of loading time). Filter options will differ depending on the [field type](../../data-modeling/field-types.md). Any tables linked by foreign keys will be displayed in the left tab of the modal.
Here you can add multiple filters to your question in one go (which can save you a lot of loading time). Filter options will differ depending on the [field type](../../data-modeling/field-types.md). Any tables linked by foreign keys will be displayed in the left tab of the modal. You can also filter your summaries.
When you're done adding filters, hit **Apply filters** to rerun the query and update its results. To remove all the filters you've applied, click on **Clear all filters** in the bottom left of the filter modal. Any filters you apply here will show up in the editor, and vice versa.
......@@ -159,9 +168,14 @@ When you click on a different grouping column than the one you currently have se
![Multiple groupings](../images/summarize-timeseries-breakout.png)
Some grouping columns will give you the option of choosing how big or small to make the groupings. So for example, if you've picked a Date column to group by, you can click on the words `by month` to change the grouping to day, week, hour, quarter, year, etc. If you're grouping by a numeric column, like age, Metabase will automatically "bin" the results, so you'll see your metric grouped in age brackets, like 0–10, 11–20, 21–30, etc. Just like with dates, you can click on the current binning option to change it to a specific number of bins. It's not currently possible to choose your own ranges for bins, though.
Some grouping columns will give you the option of choosing how big or small to make the groupings:
- For datetime columns, you can click on the words `by month` to change the grouping to day, week, hour, quarter, year, etc. You'll also be able to add multiple breakouts by the same datetime column with different time granularities (for example, group by week and day of the week).
- For numeric columns like age, Metabase will automatically "bin" the results, so you'll see your metric grouped in age brackets, like 0–10, 11–20, 21–30, etc. Just like with dates, you can click on the current binning option to change it to a specific number of bins. Currently, you can't choose your own ranges for bins.
![Multiple groupings](../images/histogram-bins.png)
![Multiple groupings](../images/histogram-bins.png)
If you select a fixed number of bins, Metabase will break the range of the data into that number of equal size intervals. Some intervals might end up having no data, and Metabase will not display them.
Once you're done setting your metrics and groupings, click **Visualize** to see your results in all their glory.
......@@ -175,7 +189,7 @@ When viewing a chart, you can also click through questions to explore the data i
![Drill-through menu](../images/drill-through-menu.png)
The drill-through menu will present different options depending on what you click on. You can then optionally save any exploration as a new question. The drill-through menu is only available for questions built using the query builder. For more on how drill-through works, check out [Creating interactive charts](https://www.metabase.com/learn/questions/drill-through).
The drill-through menu will present different options depending on what you click on. You can then optionally save any exploration as a new question. Full drill-through menu is only available for questions built using the query builder. Questions build with SQL/native queries will have only have [limited drill-through actions](../native-editor/writing-sql.md#drill-though-in-sql-questions). For more on how drill-through works, check out [Creating interactive charts](https://www.metabase.com/learn/questions/drill-through).
## Column heading drill-through
......@@ -193,7 +207,7 @@ Custom expressions allow you to use spreadsheet-like functions and simple arithm
![Custom expression](../images/aggregation-expression.png)
For example, you could do `Average(sqrt[FieldX]) + Sum([FieldY])` or `Max(floor([FieldX] - [FieldY]))`, where `FieldX` and `FieldY` are fields in the currently selected table. [Learn more about writing expressions](./expressions.md).
For example, you could do `Average(sqrt[FieldX]) + Sum([FieldY])` or `Max(floor([FieldX] - [FieldY]))`, where `FieldX` and `FieldY` are fields in the currently selected table. [Learn more about writing expressions](./expressions.md).
### Creating custom columns
......
......@@ -125,21 +125,40 @@ Here you'll find additional settings for configuring your x and y axes (as in ax
### X-axis
- Show label (the legend label for the axis).
- Show label (the label for the axis).
- Rename the axis
- Show line and marks
- Scale: Timeseries or Ordinal.
### Y-axis
- Show label (the legend label for the axis).
- Show label (the label for the axis).
- Rename the axis
- Split y-axis when necessary
- Auto y-axis range. When not toggled on, you can set the y-axis range (it's min and max values).
- Unpin from zero. Allows you to "Zoom in" on charts with values well above zero. Here's an example (note the y-axis starts at 20,000):
![y-axis unpinned from zero](../../images/unpinned-from-zero-y-axis.png)
- Scale: Linear, power, or log.
- Show lines and marks
- Unpin from zero. Allows you to "Zoom in" on charts with values well above zero. Here's an example (note the y-axis starts at 20,000):
![y-axis unpinned from zero](../../images/unpinned-from-zero-y-axis.png)
## Chart legend
For charts with multiple series or breakouts, chart legend displays the label and color of each series.
![Legend](../../images/legend.png)
You can change the color and label for each series and reorder them in [data settings](#data-settings).
You can use the legend to:
- Highlight a series, by hovering over the name of the series in the legend.
- Hide the series, by clicking on the color circle for the series.
To permanently hide the series from the chart, use the [data settings](#data-settings).
- Drill down to individual records for aggregated series, by clicking on the series name.
Currently, you can't hide the legend or change its position on the chart.
## Further reading
......
......@@ -4,7 +4,7 @@ title: Diagnostic information for troubleshooting
# Diagnostic information for troubleshooting
To download diagnostic information, hit `Cmd + F1` on Macs, `Ctrl + F1` on PCs.
To download diagnostic information, hit `Cmd + F1` on Macs, `Ctrl + F1` on PCs. Hit Cmd/Ctrl + K to bring up the command palette, search for "Diagnostic", and select "Open diagnostic error modal"
Select the info you want to include in the diagnostic JSON file. Options include:
......@@ -15,7 +15,7 @@ Select the info you want to include in the diagnostic JSON file. Options include
- Server logs from the current user only
- Metabase instance version information
What data Metabase captures depends on the page you're on when you hit `Cmd/Ctrl + F1`.
What data Metabase captures depends on the page you're on when you request diagnostic information.
> Review the downloaded file before sharing it, as the diagnostic info may contain sensitive data.
......
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