Skip to content

Commit b626d76

Browse files
committed
docs: document workaround for Standard Snowflake edition
1 parent 3bab454 commit b626d76

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,52 @@ List od code and variable (API) changes:
117117

118118
For more information about preview features, refer to the [Snowflake provider documentation](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/stage#preview-features) and [Snowflake stage resource documentation](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/stage).
119119

120+
## Known limitations
121+
122+
### Standard Snowflake Edition
123+
124+
When using "Standard" Snowflake Edition, `transformer` "default role" for schema might be failing, due to lack of support for `MATERIALIZED VIEW`. it can be easily workaround by overwriting default role definition:
125+
126+
```hcl
127+
module "project_database" {
128+
source = "getindata/database/snowflake"
129+
# version = "x.x.x"
130+
131+
create_default_roles = true
132+
133+
schemas = {
134+
test = {
135+
roles = {
136+
transformer = {
137+
schema_grants = [{
138+
privileges = [
139+
"CREATE TEMPORARY TABLE",
140+
"CREATE TAG",
141+
"CREATE PIPE",
142+
"CREATE PROCEDURE",
143+
"USAGE",
144+
"CREATE TABLE",
145+
"CREATE FILE FORMAT",
146+
"CREATE STAGE",
147+
"CREATE TASK",
148+
"CREATE FUNCTION",
149+
"CREATE EXTERNAL TABLE",
150+
"CREATE SEQUENCE",
151+
"CREATE VIEW",
152+
"CREATE STREAM"
153+
]
154+
}]
155+
schema_objects_grants = {
156+
"MATERIALIZED VIEW" = []
157+
}
158+
}
159+
}
160+
}
161+
}
162+
}
163+
164+
```
165+
120166
<!-- BEGIN_TF_DOCS -->
121167

122168

examples/complete/main.tf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module "database" {
6969
}
7070
}
7171

72+
# This configuration might be used with "Standard" Snowflake edition, where MATERIALIZED VIEWs are not supported.
7273
module "project_database" {
7374
source = "../../"
7475

@@ -90,4 +91,34 @@ module "project_database" {
9091

9192
create_default_roles = true
9293
database_ownership_grant = snowflake_account_role.admin_role.name
94+
95+
schemas = {
96+
test = {
97+
roles = {
98+
transformer = {
99+
schema_grants = [{
100+
privileges = [
101+
"CREATE TEMPORARY TABLE",
102+
"CREATE TAG",
103+
"CREATE PIPE",
104+
"CREATE PROCEDURE",
105+
"USAGE",
106+
"CREATE TABLE",
107+
"CREATE FILE FORMAT",
108+
"CREATE STAGE",
109+
"CREATE TASK",
110+
"CREATE FUNCTION",
111+
"CREATE EXTERNAL TABLE",
112+
"CREATE SEQUENCE",
113+
"CREATE VIEW",
114+
"CREATE STREAM"
115+
]
116+
}]
117+
schema_objects_grants = {
118+
"MATERIALIZED VIEW" = []
119+
}
120+
}
121+
}
122+
}
123+
}
93124
}

0 commit comments

Comments
 (0)