brent
is an experimental tool for running SQL migrations in snowflake, very similar in functionality to schemachange and liquibase.
Why brent
?
Snowflake -> Arctic
Refinery -> Oil
Arctic + Oil = Brent Crude
cargo install --path .
To run migrations in the /.migrations
folder w/ the vault plugin enabled:
brent --path ./migrations --enable-vault
Required environment variables:
SNOWFLAKE_ACCOUNT
SNOWFLAKE_USER
SNOWFLAKE_DATABASE
SNOWFLAKE_ROLE
SNOWFLAKE_SCHEMA
SNOWFLAKE_PASSWORD
SNOWFLAKE_WAREHOUSE
VAULT_SECRET_ID
VAULT_ADDR
VAULT_ROLE_ID
- refinery (migration framework) - https://github.com/rust-db/refinery
- minijinja (for templating) - https://github.com/mitsuhiko/minijinja
- minijinja-vault - https://github.com/wseaton/minijinja-vault
brent uses refinery under the hood for the logic that handles migrations
- support vault for snowflake credentials
- more jinja plugins? custom filters?
- distribute minimal container image