![]() ![]() If you’re setting up multi-tenant permissions for customers who need SQL access, you can create one database connection per customer. GRANT metabase_model_caching TO metabase Multi-tenant permissions GRANT USAGE ON "your_schema" TO metabase_model_caching GRANT INSERT, UPDATE, DELETE ON "your_model's_table" IN SCHEMA "your_schema" TO metabase_model_caching - Grant role to the metabase user. GRANT CREATE ON "database" TO metabase_model_caching - Grant write privileges to the SCHEMA used for model caching. CREATE ROLE metabase_model_caching WITH LOGIN - If you don't want to give CREATE access to your database, - add the schema manually before enabling modeling caching. ![]() ![]() Create a role to bundle database privileges for Metabase model caching. Give metabase all privileges to the database.If you don’t want to structure your database privileges yet: Remember that when you grant privileges to a role, all users with that role will get those privileges. EXECUTE privileges to use stored procedures or user-defined functions.TEMPORARY privileges to create temp tables.GRANT USAGE ON SCHEMA "your_schema" TO analytics - GRANT SELECT ON "your_table" IN SCHEMA "your_schema" TO analytics ĭepending on how you use Metabase, you can also additonally grant: GRANT USAGE ON SCHEMA "your_schema" TO analytics - GRANT SELECT ON ALL TABLES IN SCHEMA "your_schema" TO analytics - Option 3: Uncomment the line below to let users with the analytics role query anything in a specific TABLE. GRANT pg_read_all_data ON DATABASE "your_database" TO analytics - Option 2: Uncomment the line below to let users with the analytics role query anything in a specific SCHEMA. GRANT analytics TO metabase - Add query privileges to the role (options 1-3): - Option 1: Uncomment the line below to let users with the analytics role query anything in the DATABASE. CREATE USER metabase WITH PASSWORD "your_password" - Give the role to the metabase user. GRANT CONNECT ON DATABASE "your_database" TO analytics - Create a database user named "metabase". CREATE ROLE analytics WITH LOGIN - Add the CONNECT privilege to the role. Create a database user called metabase.įor example, if you’re using a Postgres database, you’d log in as an admin and run the SQL statements:.Create a database role called analytics.To organize these privileges (and make maintenance easier down the line): SELECT privileges to any schemas or tables that you want to use in Metabase.In order to view and query your tables in Metabase, you’ll have to give Metabase’s database user: ![]() Revoke the write access for metabase_model_caching without affecting the write access for metabase_actions.Use the same analytics role for other BI tools in your data stack that need read-only access to the analytics tables in your database.Optional metabase_model_caching for write access to the schema used for Metabase model caching.īundling your privileges into roles based on use cases makes it easier to manage privileges in the future (especially in multi-tenant situations).Optional metabase_actions for write access to tables used for Metabase actions.analytics for read access to any schemas or tables used for analysis.We recommend creating a metabase database user with the following database roles: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |