snowflakedb/snowflake-cli

SNOW-937840: Streamlit deploy dont pass the warehouse in the command

Closed this issue · 3 comments

SnowCLI version

1.2

Python version

Python 3.10.10

Platform

No response

What happened

Running this command

snow streamlit deploy anurag1 --file=main.py -c dev --replace --warehouse ANURAG

and in the query generated its dont have Warehouse in it

CREATE OR REPLACE STREAMLIT anurag1
ROOT_LOCATION = '@STREAMLIT_APPS.PUBLIC.STREAMLIT/anurag1'
MAIN_FILE = 'main.py'

Console output

No response

How to reproduce

No response

According to the command help, it seems like the parameter you should be using is --query-warehouse

❯ snow streamlit deploy -h

 Usage: snow streamlit deploy [OPTIONS] STREAMLIT_NAME

 Uploads local files to specified stage and creates a Streamlit dashboard using the files. You must specify the main python file. By default, the command will upload environment.yml and pages/ folder  if present.
 If you don't provide any stage name then 'streamlit' stage will be used. If provided stage will be created if it does not exist. You can modify the behaviour using flags. For details check help information.

╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    streamlit_name      TEXT  Name of Streamlit to deploy. [default: None] [required]                                                                                                                             │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --file                     PATH       Path of the Streamlit app file. [default: streamlit_app.py]                                                                                                                  │
│ --stage                    TEXT       Stage name where Streamlit files will be uploaded. [default: streamlit]                                                                                                      │
│ --env-file                 FILE       Environment file to use. [default: None]                                                                                                                                     │
│ --pages-dir                DIRECTORY  Directory with Streamlit pages [default: None]                                                                                                                               │
│ --query-warehouse          TEXT       Query warehouse for this Streamlit. [default: None]                                                                                                                          │
│ --replace                             Replace the Streamlit if it already exists.                                                                                                                                  │
│ --open                                Whether to open Streamlit in a browser.                                                                                                                                      │
│ --help             -h                 Show this message and exit.                                                                                                                                                  │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Thanks . Its seems so . Still why its not picking up the warehouse from config.toml if the argument is ignored .

Thanks . Its seems so . Still why its not picking up the warehouse from config.toml if the argument is ignored .

Because those are two different warehouses. Connection warehouse is used for current operations (upload) not for future use-case. If you think the behaviour should be different please propose it 👌