@@ -17,7 +17,7 @@ All Metabase plugins live in the plugins directory, which defaults to `./plugins
These are the currently known 3rd-party database drivers for Metabase. Some versions of Metabase introduces changes, which requires drivers to be updated, so make sure you are using a driver that is compatible with your version of Metabase.
@@ -65,7 +65,7 @@ Another great thing about sandboxing is that this user can still use all of the
As we mentioned above, the second way you can create a sandbox is by using a saved question to define a customized view of a table to display. When a user with sandboxed access to a table queries that table, behind the scenes they'll really be using that saved question as the source data for their query.
#### Example 1: hiding specific columns**
#### Example 1: hiding specific columns
In this example I have a table called `People` that I want users in my Marketing team to be able to see, but I don't want them to see most of these sensitive columns that have personal information in them:
...
...
@@ -86,6 +86,7 @@ To verify things are working correctly, I'll log in as a test user in the Market
**Note:** this filtering will also happen when a user with sandboxed access goes to look at a chart that uses data from the sandboxed table. If the chart uses any columns that aren't included in the sandboxed version of the table, the chart will not load for that user.
#### Example 2: using variables in a saved question
To create even more powerful and nuanced filters, you can use variables in a filtering question in conjunction with user attributes.
In this example, I'm going to give users in a specific group access to my `Orders` table, but I'll filter out which columns they can see, and I'll also make it so that they only see rows where the "Customer ID" column equals the user's `customer_id` attribute.
@@ -33,6 +33,7 @@ Setting a variable to the "Field Filter" type allows you to map it to a field in
A field filter variable inserts SQL similar to that generated by the GUI query builder when adding filters on existing columns. This is useful because it lets you do things like insert dynamic date range filters into your native query. When adding a field filter, you should link that variable to a specific column. Field filter variables should be used inside of a `WHERE` clause in SQL, or a `$match` clause in MongoDB.
**Note:**
- Table aliases are not supported. This is because field filters generate SQL based on the mapped field.
- Some databases require the schema in the `FROM` clause. An example for Oracle would be `FROM "schema"."table"`. In BigQuery, back ticks are needed, like `` FROM `dataset_name.table` ``.