Skip to content

Commit

Permalink
Implementing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-tmathew committed Oct 29, 2024
1 parent 2c553e8 commit 11bdee7
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions demo/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,24 @@ not break any existing functionality.
- [setup_schemachange_schema.sql](provision/setup_schemachange_schema.sql): Contains the SQL variables to track the
individual demo scenarios in its own change history table.

### Contributors

As a contributor, you will have to set up schemachange demo database and schemachange schema (See Initialize and Setup
scripts below). Along with that you will also set up the following Secrets in your forked repository so that the GitHub
actions can set up, test and teardown the temporary schema it creates to test the changes to your code in the master and
dev branches respectively.

- SCHEMACHANGE_SNOWFLAKE_PASSWORD
- SCHEMACHANGE_SNOWFLAKE_USER
- SCHEMACHANGE_SNOWFLAKE_ACCOUNT

### Consumers

- If you are consumer who is installing schemachange and wants to test-run the demo, then you will have to set the
following environment variables.
- SNOWFLAKE_ACCOUNT: This will be the account identifier for your Snowflake account.
- SNOWFLAKE_USER: This will be the user that will connect to your Snowflake account (`SNOWFLAKE_ACCOUNT`).
- SNOWFLAKE_PASSWORD: This is the password for the user (`SNOWFLAKE_USER`) that will connect to your Snowflake account (`SNOWFLAKE_ACCOUNT`).
- SNOWFLAKE_PASSWORD: This is the password for the user (`SNOWFLAKE_USER`) that will connect to your Snowflake
account (`SNOWFLAKE_ACCOUNT`).
- SCENARIO_NAME: This will be demo folder you intend to experiment with. For
starters, `basics_demo`, `citibike_demo` or `citibike_demo_jinja` are included with the repo that will set the
root folder value in the respective schemachange-config.yml file.
- SNOWFLAKE_WAREHOUSE: This will be the warehouse you set up for the demo. Default setup is SCHEMACHANGE_DEMO_WH. You can update this to your warehouse in your Snowflake account (`SNOWFLAKE_ACCOUNT`).
- SNOWFLAKE_DATABASE Keyed to SCHEMACHANGE_DEMO. You can update this to the database in your snowflake account (`SNOWFLAKE_ACCOUNT`)
- SNOWFLAKE_ROLE Keyed to SCHEMACHANGE_DEMO-DEPLOY. This particular role name was chosen to test hyphenated roles in schemachange. You can update this value to match the role you have setup in your snowflake account (`SNOWFLAKE_ACCOUNT`).

Either you setup Warehouse, Database and role to match the demo defaults and run the demo as is pointing to your account (`SNOWFLAKE_ACCOUNT`) or update the schemachange-config.yml file keys to match values you have setup in your local snowflake account and run the demo scenarios to get a feel for how schemachange works.
- SNOWFLAKE_WAREHOUSE: This will be the warehouse you set up for the demo in your Snowflake
account (`SNOWFLAKE_ACCOUNT`). Default setup is SCHEMACHANGE_DEMO_WH.
- SNOWFLAKE_DATABASE Keyed to SCHEMACHANGE_DEMO. You can update this to the database in your snowflake account
(`SNOWFLAKE_ACCOUNT`). You will also need to update the provision scripts accordingly.
- SNOWFLAKE_ROLE Keyed to SCHEMACHANGE_DEMO-DEPLOY. This particular role name was chosen to test hyphenated roles
in schemachange. You can update this value to match the role you have setup in your snowflake
account (`SNOWFLAKE_ACCOUNT`).

The scripts in the `provision` folder can be used to set up up your demo database along with a schema in that database
that will house the change tracking tables needed to set up and teardown the schemas used to test a working version of
Expand All @@ -49,6 +41,17 @@ the demo DDL scripts.
- The [setup](provision/setup_schemachange_schema.sql) script creates the `SCHEMACHANGE` schema in the database that you
created in the initialize step.

### Contributors

As a contributor, you will have to set up schemachange demo database and schemachange schema (See Initialize and Setup
scripts below). Along with that you will also set up the following Secrets in your forked repository so that the GitHub
actions can set up, test and teardown the temporary schema it creates to test the changes to your code in the master and
dev branches respectively.

- SCHEMACHANGE_SNOWFLAKE_PASSWORD
- SCHEMACHANGE_SNOWFLAKE_USER
- SCHEMACHANGE_SNOWFLAKE_ACCOUNT

# Setup

The setup scripts are included to build the schema needed by the GitHub Actions Workflow to avoid conflict across jobs
Expand Down

0 comments on commit 11bdee7

Please sign in to comment.