Skip to content
Snippets Groups Projects
Commit 4d7d0bd9 authored by Ryan Senior's avatar Ryan Senior
Browse files

Merge remote-tracking branch 'upstream/master' into snowflake-support

parents a81e69ac 3681bc2f
No related branches found
No related tags found
No related merge requests found
Showing
with 198 additions and 30 deletions
......@@ -15,11 +15,16 @@ fi
POT_NAME="locales/metabase.pot"
POT_BACKEND_NAME="locales/metabase-backend.pot"
# NOTE: hardcoded in .babelrc
POT_FRONTEND_NAME="locales/metabase-frontend.pot"
# NOTE: hardcoded in src/metabase/automagic_dashboards/rules.clj
POT_AUTODASH_NAME="locales/metabase-automatic-dashboards.pot"
mkdir -p "locales"
# update frontend pot
#######################
# update frontend pot #
#######################
# NOTE: about twice as fast to call babel directly rather than a full webpack build
BABEL_ENV=extract ./node_modules/.bin/babel -q -x .js,.jsx -o /dev/null frontend/src
......@@ -29,7 +34,9 @@ BABEL_ENV=extract ./node_modules/.bin/babel -q -x .js,.jsx -o /dev/null frontend
sed -i".bak" -E 's/\$\{ *([0-9]+) *\}/{\1}/g' "$POT_FRONTEND_NAME"
rm "$POT_FRONTEND_NAME.bak"
# update backend pot
######################
# update backend pot #
######################
# xgettext before 0.19 does not understand --add-location=file. Even CentOS
# 7 ships with an older gettext. We will therefore generate full location
......@@ -55,5 +62,14 @@ find src -name "*.clj" | xgettext \
sed -i".bak" 's/charset=CHARSET/charset=UTF-8/' "$POT_BACKEND_NAME"
rm "$POT_BACKEND_NAME.bak"
# merge frontend and backend pots
msgcat "$POT_FRONTEND_NAME" "$POT_BACKEND_NAME" > "$POT_NAME"
########################
# update auto dash pot #
########################
lein generate-automagic-dashboards-pot
##################
# merge all pots #
##################
msgcat "$POT_FRONTEND_NAME" "$POT_BACKEND_NAME" "$POT_AUTODASH_NAME" > "$POT_NAME"
......@@ -64,11 +64,12 @@ Common detailed types include:
* Longitude
* Entity Name
* Number
* Currency
* State
* URL
* Zip Code
This is also where you set mark special fields in a table:
This is also where you set special fields in a table:
* Entity Key — the field in this table that uniquely identifies each row. Could be a product ID, serial number, etc.
* Entity Name — different from the entity key, this is the field whose heading represents what each row in the table *is*. For example, in a Users table, the User column might be the entity name.
......
......@@ -13,6 +13,9 @@ The **report timezone** sets the default time zone for displaying times. The tim
*Setting the default timezone will not change the timezone of any data in your database*. If the underlying times in your database aren't assigned to a timezone, Metabase will use the report timezone as the default timezone.
### Enable X-rays
[X-rays](../users-guide/14-x-rays.md) are a great way to allow your users to quickly explore your data or interesting parts of charts, or to see a comparison of different things. But if you're dealing with data sources where allowing users to run x-rays on them would incur burdonsome performance or monetary costs, you can turn them off here.
### Anonymous Tracking
This option turns determines whether or not you allow anonymous data about your usage of Metabase to be sent back to us to help us improve the product. *Your database’s data is never tracked or sent*.
......@@ -23,5 +26,5 @@ To manually fix field or table names if they still look wrong, you can go to the
---
## Next: caching query results
Metabase makes it easy to [automatically cache results](14-caching.md) for queries that take a long time to run.
## Next: setting formatting defaults for dates and numbers
Easily customize how numbers, dates, times, and currencies should be displayed in Metabase with [formatting settings](19-formatting-settings.md).
......@@ -4,7 +4,6 @@
Say you have users who you want to be able to log into your Metabase instance, but who should only be able to view data that pertains to them. For example, you might have some customers or partners who you want to let view your Orders table, but you only want them to see their orders. Metabase has a feature called sandboxing that lets you do just that.
The way it works is that you pick a table that you want to sandbox for users in a certain group, then customize how exactly you want to filter that table for those users. For this to work in most cases you’ll first need to add attributes to your users so that Metabase will know how to filter things for them specifically.
### Getting user attributes
......@@ -105,6 +104,9 @@ Now, when I log in as this user and look at the `Orders` table, I only see the c
![Results](images/sandboxing/advanced-example-2-results.png)
#### Current limitations
Currently, a user can only have one sandbox per table. I.e., if a user belongs to two user groups, both of which have been given sandboxed access to the same table, that user will not be able to access data from that table. You will either need to remove that user from one of those groups, or remove the sandboxed access from one of those groups.
---
## Next: sharing and embedding with public links
......
## Setting default formatting
There are lots of Metabase users around the world, each with different preferences for how dates, times, numbers, and currencies should be formatted and displayed. Metabase allows you to customize these formatting options at three different levels:
1. Global formatting defaults in the Admin Panel
2. Field-level formatting overrides in the Data Model section
3. Question-level overrides in visualization settings
### Global formatting defaults
Here are the formatting options available to you from the `Formatting` tab of the `Settings` section in the Admin Panel:
**Dates and Times**
* `Date style:` the way dates should be displayed in tables, axis labels, and tooltips.
* `Date separators:` you can choose between slashes, dashes, and dots here.
* `Abbreviate names of days and months:` whenever a date is displayed with the day of the week and/or the month written out, turning this setting on will display e.g. `January` as `Jan` or `Monday` as `Mon`.
* `Time style:` this lets you choose between a 12-hour or 24-hour clock to display the time by default where applicable.
**Numbers**
* `Separator style:` some folks use commas to separate thousands places, and others use periods. Here's where you can indicate which camp you belong to.
**Currency**
* `Unit of currency:` if you do most of your business in a particular currency, you can specify that here.
* `Currency label style:` whether you want to have your currencies labeled with a symbol, a code (like `USD`), or its full name.
* `Where to display the unit of currency:` this pertains specifically to tables, and lets you choose if you want the currency labels to appear only in the column heading, or next to each value in the column.
### Field-level formatting
You can override the global defaults for a specific field by going to the `Data Model` section of the Admin Panel, selecting the database and table of the field in question, and clicking the gear icon on the far right of the screen next to that field to go to its options page, then clicking on the `Formatting` tab.
The options you'll see here will depend on the field's type. They're generally the same options as in the global formatting settings, with a few additions:
**Dates and Times**
* `Show the time:` this lets you choose if this time field should be displayed by default without the time; with hours and minutes; with hours, minutes, and seconds; or additionally with milliseconds.
**Numbers**
* `Show a mini bar chart:` this only applies to situations where this number is displayed in a table, and if it's on it will show a bar next to each value in this column to show how large or small it is relative to the other values in the column.
* `Style:` lets you choose to display the number as a plain number, a percent, in scientific notation, or as a currency.
* `Separator style:` this gives you various options for how commas and periods are used to separate the number.
* `Minimum number of decimal places:` forces the number to be displayed with exactly this many decimal places.
* `Multiply by a number:` multiplies this number by whatever you type here.
* `Add a prefix/suffix:` lets you put a symbol, word, etc. before or after this number.
**Currency**
Currency field formatting settings include all the same options as in the global formatting section, as well as all the options that Number fields have.
### Question-level formatting
Lastly, you can override all formatting settings in any specific saved question or dashboard card by clicking on the gear to open up the visualization options. To reset any overridden setting to the default, just click on the rotating arrow icon next to the setting's label. This will reset the setting to the field-level setting if there is one; otherwise it will be reset to the global default.
---
## Next: caching query results
Metabase makes it easy to [automatically cache results](14-caching.md) for queries that take a long time to run.
......@@ -7,6 +7,7 @@ Are you in charge of managing Metabase for your organization? Then you're in the
* [Enabling features that send email (SMTP)](02-setting-up-email.md)
* [Setting up Slack integration](09-setting-up-slack.md)
* [Configuring settings](08-configuration-settings.md)
* [Setting formatting defaults for dates and numbers](19-formatting-settings.md)
* [Caching query results](14-caching.md)
* [Customizing how Metabase looks with white labeling<sup>*</sup>](15-whitelabeling.md)
......
This diff is collapsed.
......@@ -41,7 +41,7 @@ You can add multiple filters to your dashboard following the same steps. We just
### Editing a filter
To edit a filter, enter dashboard editing mode, then click the `Edit` button on the filter you want to change. You an also click `Remove` to get rid of a filter. If you do this by accident, just click `Cancel` in the top-right to exit dashboard editing mode without saving your changes.
To edit a filter, enter dashboard editing mode, then click the `Edit` button on the filter you want to change. You an also click `Remove` to get rid of a filter. If you do this by accident, just click `Cancel` in the top-right to exit dashboard editing mode without saving your changes. To reorder your filters, just click on the grabber handle on the left side of a filter and drag it where you'd like it to go.
![Edit or remove a filter](images/dashboard-filters/06-edit-and-remove.png)
......
......@@ -10,7 +10,7 @@ Options and settings for your variables will appear in the `Variables` side pane
![Variables](images/sql-parameters/01-variables.png)
### Defining Variables
Typing `{% raw %}{{variable_name}}{% endraw %}` in your native query creates a variable called `variable_name`. Variables can be given types in the side panel, which changes their behavior. All variable types other than `field filter` will cause a filter widget to be placed on this question corresponding to the chosen variable type. When a value is selected via a filter widget, that value replaces the corresponding variable in the SQL template, wherever it appears.
Typing `{% raw %}{{variable_name}}{% endraw %}` in your native query creates a variable called `variable_name`. Variables can be given types in the side panel, which changes their behavior. All variable types other than `field filter` will cause a filter widget to be placed on this question corresponding to the chosen variable type. When a value is selected via a filter widget, that value replaces the corresponding variable in the SQL template, wherever it appears. If you have multiple filter widgets, you can click and drag on any of them to move and reorder them.
This example defines a variable called `cat`, allowing you to dynamically change the `WHERE` clause in this query:
......@@ -64,6 +64,16 @@ Filter widgets **can't** be displayed if the variable is mapped to a field marke
##### Setting a default value
If you input a default value for your field filter, this value will be selected in the filter whenever you come back to this question. If you clear out the filter, though, no value will be passed (i.e., not even the default value). The default value has no effect on the behavior of your SQL question when viewed in a dashboard.
###### Default value in the query
You can also define default value directly in your query, useful for complex default value.
Current date example:
```
SELECT p.*
FROM products p
WHERE p.createdAt = [[ {{dateOfCreation}} #]]CURRENT_DATE()
```
##### Connecting a SQL question to a dashboard filter
In order for a saved SQL question to be usable with a dashboard filter, it must contain at least one field filter. The kind of dashboard filter that can be used with the SQL question depends on the field that you map to the question's field filter(s). For example, if you have a field filter called `{% raw %}{{var}}{% endraw %}` and you map it to a State field, you can map a Location dashboard filter to your SQL question. In this example, you'd create a new dashboard or go to an existing one, click the Edit button, and the SQL question that contains your State field filter, add a new dashboard filter or edit an existing Location filter, then click the dropdown on the SQL question card to see the State field filter. [Learn more about dashboard filters here](08-dashboard-filters.md).
......
......@@ -63,6 +63,10 @@ You can see more suggested x-rays over on the right-hand side of the screen. Bro
If you come across an x-ray that's particularly interesting, you can save it as a dashboard by clicking the green Save button. Metabase will create a new dashboard and put it and all of its charts in a new collection, and will save this new collection wherever you choose.
### Disabling x-rays
If for some reason x-rays aren't a good fit for your team or your data, administrators can turn them off completely in the general settings area of the Admin Panel.
### Where did the old x-rays go?
We're reworking the way we do things like time series growth analysis, which was present in past versions of x-rays. In the meantime, we've removed those previous x-rays, and will bring those features back in a more elegant and streamlined way in a future version of Metabase.
......
docs/users-guide/images/dashboard-filters/06-edit-and-remove.png

13.1 KiB | W: | H:

docs/users-guide/images/dashboard-filters/06-edit-and-remove.png

7.02 KiB | W: | H:

docs/users-guide/images/dashboard-filters/06-edit-and-remove.png
docs/users-guide/images/dashboard-filters/06-edit-and-remove.png
docs/users-guide/images/dashboard-filters/06-edit-and-remove.png
docs/users-guide/images/dashboard-filters/06-edit-and-remove.png
  • 2-up
  • Swipe
  • Onion skin
docs/users-guide/images/visualizations/chart-formatting-options.png

274 KiB

docs/users-guide/images/visualizations/chart-formatting.png

233 KiB

docs/users-guide/images/visualizations/column-header-formatting.png

81.8 KiB

docs/users-guide/images/visualizations/combo-chart-data-1.png

74.5 KiB

docs/users-guide/images/visualizations/combo-chart-data-2.png

88.6 KiB

docs/users-guide/images/visualizations/combo-chart-settings.png

89.2 KiB

docs/users-guide/images/visualizations/combo-chart.png

72.4 KiB

docs/users-guide/images/visualizations/gauge-settings.png

86.1 KiB

docs/users-guide/images/visualizations/gauge.png

58.1 KiB

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