Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more warehouses to database permissions #3943

Merged
merged 52 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
32396db
Add more warehouses to database permissions
agnessnowplow Aug 17, 2023
081512e
Fix broken links
agnessnowplow Aug 17, 2023
a05aa94
Merge branch 'current' into database_permissions
mirnawong1 Aug 30, 2023
ea1fab2
Merge branch 'current' into database_permissions
mirnawong1 Aug 30, 2023
d0c8aaf
Update website/docs/reference/database-permissions/databricks-permiss…
mirnawong1 Sep 25, 2023
350c8c4
Merge branch 'current' into database_permissions
mirnawong1 Sep 25, 2023
2fd5835
Update website/docs/reference/database-permissions/redshift-permissio…
mirnawong1 Sep 25, 2023
92392ff
Update website/docs/reference/database-permissions/postgres-permissio…
mirnawong1 Sep 25, 2023
0ba6076
Update website/docs/reference/references-overview.md
mirnawong1 Sep 25, 2023
d5b0f09
Update website/docs/reference/references-overview.md
mirnawong1 Sep 25, 2023
327f3e9
Update website/docs/reference/references-overview.md
mirnawong1 Sep 25, 2023
a8718ee
Update website/docs/reference/references-overview.md
mirnawong1 Sep 25, 2023
c9f9b87
Merge branch 'current' into database_permissions
runleonarun Sep 28, 2023
ae794e0
Merge branch 'current' into database_permissions
mirnawong1 Oct 23, 2023
60c2d98
Merge branch 'current' into database_permissions
mirnawong1 Oct 24, 2023
ab020ef
Merge branch 'current' into database_permissions
mirnawong1 Oct 26, 2023
90a09bc
Merge branch 'current' into database_permissions
mirnawong1 Oct 31, 2023
b295d43
Merge branch 'current' into database_permissions
mirnawong1 Oct 31, 2023
864d215
Create about-database-permissions.md
mirnawong1 Oct 31, 2023
385bcdb
Update about-database-permissions.md
mirnawong1 Oct 31, 2023
14691d8
Update snowflake-permissions.md
mirnawong1 Oct 31, 2023
9ef7714
Update databricks-permissions.md
mirnawong1 Oct 31, 2023
6ff0cd3
Update databricks-permissions.md
mirnawong1 Oct 31, 2023
bcd6cc1
Update snowflake-permissions.md
mirnawong1 Oct 31, 2023
8c8140d
Update postgres-permissions.md
mirnawong1 Oct 31, 2023
e900d23
Update redshift-permissions.md
mirnawong1 Oct 31, 2023
425cd0f
Update redshift-permissions.md
mirnawong1 Oct 31, 2023
8441614
Update postgres-permissions.md
mirnawong1 Oct 31, 2023
6cd7589
Update databricks-permissions.md
mirnawong1 Oct 31, 2023
9142147
Merge branch 'current' into database_permissions
mirnawong1 Nov 1, 2023
7196b37
Update website/docs/reference/database-permissions/about-database-per…
mirnawong1 Nov 1, 2023
77beb97
Update website/docs/reference/database-permissions/about-database-per…
mirnawong1 Nov 1, 2023
5b75635
Update website/docs/reference/database-permissions/about-database-per…
mirnawong1 Nov 1, 2023
0bd0d32
Update sidebars.js
mirnawong1 Nov 1, 2023
3258937
Update about-database-permissions.md
mirnawong1 Nov 1, 2023
caa0c5d
Update sidebars.js
mirnawong1 Nov 1, 2023
e212d17
Update website/docs/reference/database-permissions/postgres-permissio…
mirnawong1 Nov 1, 2023
03ddf3e
Update snowflake-permissions.md
mirnawong1 Nov 1, 2023
dace850
Update sidebars.js
mirnawong1 Nov 1, 2023
b08a9af
Update website/docs/faqs/Warehouse/database-privileges.md
mirnawong1 Nov 1, 2023
b5b4795
Update connect-databricks.md
mirnawong1 Nov 1, 2023
1246101
Update connect-redshift-postgresql-alloydb.md
mirnawong1 Nov 1, 2023
3a20b9f
Merge branch 'current' into database_permissions
mirnawong1 Nov 1, 2023
4ec7ff6
Update sidebars.js
mirnawong1 Nov 1, 2023
28f376d
Update sidebars.js
mirnawong1 Nov 1, 2023
1a7ecd7
Merge branch 'current' into database_permissions
mirnawong1 Nov 1, 2023
d7fd7d4
Update website/docs/reference/database-permissions/snowflake-permissi…
mirnawong1 Nov 1, 2023
356c281
Update website/docs/reference/database-permissions/snowflake-permissi…
mirnawong1 Nov 1, 2023
a44a9c4
Update website/docs/reference/database-permissions/snowflake-permissi…
mirnawong1 Nov 1, 2023
f373cbe
Update website/docs/reference/database-permissions/about-database-per…
mirnawong1 Nov 1, 2023
6768a72
Update about-database-permissions.md
mirnawong1 Nov 1, 2023
14aa364
Update website/docs/reference/database-permissions/about-database-per…
mirnawong1 Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following fields are required when creating a Snowflake connection
| Warehouse | The virtual warehouse to use for running queries. | `transforming` |


**Note:** A crucial part of working with dbt atop Snowflake is ensuring that users (in development environments) and/or service accounts (in deployment to production environments) have the correct permissions to take actions on Snowflake! Here is documentation of some [example permissions to configure Snowflake access](/reference/snowflake-permissions).
**Note:** A crucial part of working with dbt atop Snowflake is ensuring that users (in development environments) and/or service accounts (in deployment to production environments) have the correct permissions to take actions on Snowflake! Here is documentation of some [example permissions to configure Snowflake access](/reference/database-permissions/snowflake-permissions).

### Username / Password

Expand Down
4 changes: 2 additions & 2 deletions website/docs/faqs/Warehouse/database-privileges.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ schema¹
* read system <Term id="view">views</Term> to generate documentation (i.e. views in
`information_schema`)

On Postgres, Redshift, and Snowflake, use a series of `grants` to ensure that
your user has the correct privileges.
On Postgres, Redshift, Databricks, and Snowflake, use a series of `grants` to ensure that
your user has the correct privileges. Check out [example permissions](/reference/database-permissions/snowflake-permissions) for these warehouses.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

On BigQuery, use the "BigQuery User" role to assign these privileges.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Databricks Permissions"
---

## Example Databricks permissions

```
-- NOTE: in general permissions can be granted on securable_objects to
principals (can be user, service principal, or group)
-- e.g.: grant privilege_type on securable_object to principal

grant all privileges on schema schema_name to principal;
grant create table on schema schema_name to principal;
grant create view on schema schema_name to principal;
```

Check out the [official documentation](https://docs.databricks.com/en/data-governance/unity-catalog/manage-privileges/privileges.html#privilege-types-by-securable-object-in-unity-catalog) for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "Postgres Permissions"
---

## Example Postgres permissions

```
grant usage on database database_name to user_name;
grant create schema on database database_name to user_name;
grant usage on schema database.schema_name to user_name;
grant create table on schema database.schema_name to user_name;
grant create view on schema database.schema_name to user_name;
grant usage on all schemas in database database_name to user_name;
grant select on all tables in database database_name to user_name;
grant select on all views in database database_name to user_name;
```

Check out the [official documentation](https://www.postgresql.org/docs/current/sql-grant.html) for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "Redshift Permissions"
---

## Example Redshift permissions

```
grant usage on database database_name to user_name;
grant create schema on database database_name to user_name;
grant usage on schema database.schema_name to user_name;
grant create table on schema database.schema_name to user_name;
grant create view on schema database.schema_name to user_name;
grant usage on all schemas in database database_name to user_name;
grant select on all tables in database database_name to user_name;
grant select on all views in database database_name to user_name;
```

Check out the [official documentation](https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) for more information.
22 changes: 20 additions & 2 deletions website/docs/reference/references-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,27 @@ Learn how to add more configurations to your dbt project or adapter, use propert
icon="computer"/>

<Card
title="Snowflake Permissions Artifacts"
title="Snowflake permissions artifacts"
body="Provides an example Snowflake database role permissions."
link="/reference/snowflake-permissions"
link="/reference/database-permissions/snowflake-permissions"
icon="computer"/>

<Card
title="Databricks Permissions Artifacts"
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
body="Provides an example Databricks database role permissions."
link="/reference/database-permissions/databricks-permissions"
icon="computer"/>

<Card
title="Redshift Permissions Artifacts"
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
body="Provides an example Redshift database role permissions."
link="/reference/database-permissions/redshift-permissions"
icon="computer"/>

<Card
title="Postgres Permissions Artifacts"
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
body="Provides an example Postgres database role permissions."
link="/reference/database-permissions/postgres-permissions"
icon="computer"/>

</div>
7 changes: 6 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,12 @@ const sidebarSettings = {
{
type: "category",
label: "Database Permissions",
items: ["reference/snowflake-permissions"],
items: [
"reference/database-permissions/snowflake-permissions",
"reference/database-permissions/databricks-permissions",
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
"reference/database-permissions/redshift-permissions",
"reference/database-permissions/postgres-permissions",
],
},
],
guides: [
Expand Down