You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/configuration.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,8 +223,21 @@ adhere to at your organization and therefore need more control over the schema n
223
223
224
224
### View Schema Override
225
225
226
-
Coming soon. Please message us on [slack](https://tobikodata.com/slack) if you are interested in this feature so we can better understand your
227
-
use case and make sure the new feature satisfies your needs.
226
+
By default SQLMesh appends the environment name to the schema name when creating new environments. This can be changed
227
+
to instead append a suffix at the end of table instead. This means that new environment views will be created in the
228
+
same schema as production but be differentiated having their names end with `__<env>`.
229
+
230
+
Config example:
231
+
232
+
```yaml linenums="1"
233
+
environment_suffix_target: table
234
+
```
235
+
236
+
If you had a model name of `db.users`, and you were creating a `dev` environment, then the view would be created as `db.users__dev` instead of the default behavior of `db__dev.users`.
237
+
238
+
The default behavior of appending the suffix to schemas is recommended because it leaves production with a single clean
239
+
interface for accessing the views. However if you are deploying SQLMesh in an environment with tight restrictions on
240
+
schema creation then this can be a useful way of reducing the number of schemas that need to be created.
0 commit comments