Search code examples
architectureenvironmentsnowflake-cloud-data-platform

Best practices for setting up initial Snowflake environment - Multiple URLs


I'd like to know how others have setup their initial Snowflake environment with considerations for DevOps and code deployments and their experiences in doing so. Are people using multiple accounts/URLs to make DevOps and deployments easier or using one account and building out separate DEV, TEST, and PROD databases? For example:

DEV = http://mydevaccount.east-us-2.azure.snowflakecomputing.com

  • SourceSystem.Schema.Tables

TEST = http://mytestaccount.east-us-2.azure.snowflakecomputing.com

  • SourceSystem.Schema.Tables

PROD = http://myprodaccount.east-us-2.azure.snowflakecomputing.com

  • SourceSystem.Schema.Tables

Why or why not are you doing this?

In the past, I have setup environments under one account like:

Single Environment = http://mysnowflakeaccount.east-us-2.azure.snowflakecomputing.com

  • Dev_SourceSystem.Schema.Tables

  • Test_SourceSystem.Schema.Tables

  • Prod_SourceSystem.Schema.Tables


Solution

  • It's interesting that you refer to separate accounts as making DevOps easier in your question. In my experience, it's easier to have everything in one account, and here's why. If you use a nice structure in your RBAC model, there isn't a difference as far as isolating these environments (assuming you don't wish to have a separate IP Whitelist for your different environments, in which case this conversation is moot). Meanwhile, if you then make sure that your scripts for DevOps, ETL, etc. are all referencing schema only (no database references), then migrating DDL, DML, etc. is as easy as it would be in separate accounts. Meanwhile, one of the best features of Snowflake is Zero-Copy Clones for your testing lifecycle. This is only available within a single account. If you use separate accounts, you will need to copy your data from one environment to the next (duplicating or tripling your storage costs and a large time-consumer and credit-consumer). Zero-copy clones allow for a near instant snapshot of your data to a different environment.

    In my experience with many Snowflake customers, a single account is most common, but there are customers that use multiple accounts, as well. It really depends on what is important to you.