-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
185bed8
commit 94636d5
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
config-version: 1 | ||
|
||
root-folder: synapse_raw | ||
# modules-folder: modules | ||
# The name of the default database to use. Can be overridden in the change scripts. | ||
snowflake-database: {{env_var('SNOWFLAKE_SYNAPSE_DATA_WAREHOUSE_DATABASE', 'SYNAPSE_DATA_WAREHOUSE')}} | ||
# Create the change history schema and table, if they do not exist (the default is False) | ||
create-change-history-table: True | ||
# Used to override the default name of the change history table (the default is METADATA.SCHEMACHANGE.CHANGE_HISTORY) | ||
change-history-table: {{env_var('SNOWFLAKE_SYNAPSE_DATA_WAREHOUSE_DATABASE', 'SYNAPSE_DATA_WAREHOUSE')}}.SCHEMACHANGE.CHANGE_HISTORY | ||
vars: | ||
database_name: {{env_var('SNOWFLAKE_SYNAPSE_DATA_WAREHOUSE_DATABASE', 'SYNAPSE_DATA_WAREHOUSE')}} | ||
# secrets: | ||
# # not a good example of secrets, just here to demo the secret filtering | ||
# trips_s3_bucket: s3://snowflake-workshop-lab/citibike-trips | ||
# weather_s3_bucket: s3://snowflake-workshop-lab/weather-nyc |
7 changes: 7 additions & 0 deletions
7
synapse_data_warehouse/synapse_raw/V1.0.0__create_schemas.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
USE ROLE SYSADMIN; | ||
CREATE DATABASE IF NOT EXISTS {{database_name}}; --noqa: PRS,TMP | ||
USE DATABASE {{database_name}}; --noqa: TMP | ||
CREATE SCHEMA IF NOT EXISTS synapse_raw | ||
WITH MANAGED ACCESS; | ||
CREATE SCHEMA IF NOT EXISTS synapse | ||
WITH MANAGED ACCESS; |