It sounds like you’re unblocked @trevor but I wanted to offer a couple of additional resources for how we do this at GitLab.
This is how we clone the database: https://gitlab.com/gitlab-data/analytics/-/blob/master/orchestration/manage_snowflake.py
Then in our CI Process, we have relevant clone jobs: https://gitlab.com/gitlab-data/analytics/-/blob/master/.gitlab-ci.yml#L65
By default, the clone_analytics
job runs on every Merge Request. This allows MRs to run on raw data on the analytics clone.
The name of the clone comes from the name of the branch. If the branch is named apple_banana
, the database name is APPLE_BANANA
. Then instead of outputting to analytics_database.analytics_schema.magical_table
, the MR outputs to apple_banana.analytics_schema.magical_table
.
Hope that is useful!