snowflakedb/snowflake-cli

SNOW-1641294: Allow for configurable snowflake.yml files for streamlit deployments

rorydonaldson opened this issue · 2 comments

Description

Allow the user to override all values in the snowflake.yml file when running snow streamlit deploy.
Alternatively, allow the user to point at a different project definition.

E.g.

snowflake streamlit deploy --project-definition snowflake-testing.yml
snowflake streamlit deploy --project-definition snowflake-preprod.yml
snowflake streamlit deploy --project-definition snowflake-production.yml

Context

I use a single snowflake account that has 3 separate environments.
When running a streamlit deploy, I want to able to change the name, warehouse, stage, database, role etc of the streamlit app.

@rorydonaldson have you tried using templates?

definition_version: "1.1"
env:
  schema: "test"
streamlit:
  name: "MY_APP"
  schema: <% ctx.env.schema %>
schema="staging"; snow streamlit deploy
schema="prod"; snow streamlit deploy

https://docs.snowflake.com/en/developer-guide/snowflake-cli-v2/project-definitions/about#alter-command-behavior-using-templates