Skip to content

Commit

Permalink
Update course-resources.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanctoth authored Jun 28, 2024
1 parent fed4f44 commit 5681cca
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions _course_resources/course-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you see a _Grant partially executed: privileges [REFERENCE_USAGE] not granted
USE ROLE ACCOUNTADMIN;

-- Create the `transform` role
CREATE ROLE IF NOT EXISTS transform;
CREATE ROLE IF NOT EXISTS TRANSFORM;
GRANT ROLE TRANSFORM TO ROLE ACCOUNTADMIN;

-- Create the default warehouse if necessary
Expand All @@ -23,22 +23,22 @@ CREATE USER IF NOT EXISTS dbt
LOGIN_NAME='dbt'
MUST_CHANGE_PASSWORD=FALSE
DEFAULT_WAREHOUSE='COMPUTE_WH'
DEFAULT_ROLE='transform'
DEFAULT_ROLE=TRANSFORM
DEFAULT_NAMESPACE='AIRBNB.RAW'
COMMENT='DBT user used for data transformation';
GRANT ROLE transform to USER dbt;
GRANT ROLE TRANSFORM to USER 'dbt';

-- Create our database and schemas
CREATE DATABASE IF NOT EXISTS AIRBNB;
CREATE SCHEMA IF NOT EXISTS AIRBNB.RAW;

-- Set up permissions to role `transform`
GRANT ALL ON WAREHOUSE COMPUTE_WH TO ROLE transform;
GRANT ALL ON DATABASE AIRBNB to ROLE transform;
GRANT ALL ON ALL SCHEMAS IN DATABASE AIRBNB to ROLE transform;
GRANT ALL ON FUTURE SCHEMAS IN DATABASE AIRBNB to ROLE transform;
GRANT ALL ON ALL TABLES IN SCHEMA AIRBNB.RAW to ROLE transform;
GRANT ALL ON FUTURE TABLES IN SCHEMA AIRBNB.RAW to ROLE transform;
GRANT ALL ON WAREHOUSE COMPUTE_WH TO ROLE TRANSFORM;
GRANT ALL ON DATABASE AIRBNB to ROLE TRANSFORM;
GRANT ALL ON ALL SCHEMAS IN DATABASE AIRBNB to ROLE TRANSFORM;
GRANT ALL ON FUTURE SCHEMAS IN DATABASE AIRBNB to ROLE TRANSFORM;
GRANT ALL ON ALL TABLES IN SCHEMA AIRBNB.RAW to ROLE TRANSFORM;
GRANT ALL ON FUTURE TABLES IN SCHEMA AIRBNB.RAW to ROLE TRANSFORM;
```

## Snowflake data import
Expand Down Expand Up @@ -755,7 +755,7 @@ CREATE USER IF NOT EXISTS PRESET
LOGIN_NAME='preset'
MUST_CHANGE_PASSWORD=FALSE
DEFAULT_WAREHOUSE='COMPUTE_WH'
DEFAULT_ROLE='REPORTER'
DEFAULT_ROLE=REPORTER
DEFAULT_NAMESPACE='AIRBNB.DEV'
COMMENT='Preset user for creating reports';

Expand Down

0 comments on commit 5681cca

Please sign in to comment.