You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When snowflake.yml cannot be parsed because of an error or env variable not set,
it is not possible to run snow sql because snowflake.yml must be read at the beginning.
This may not be a bug, but rather a design decision. I would expect that snow sql command is independent from a current project and it should not be using local files impllicitly to run, while snow app is the command that could use local project files.
If this is expected behaviour, I would suggest to give more descriptive error message saying explicitly that snowflake.yml cannot be read.
It is also worth considering an option to run sql query without touching files in local directory like snowflake.yml project file. The question is what the default should be.
Console output
% snow --config-file="./deployment/config.toml" sql -q "select 1" --connection cd
╭─ Error ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Could not find template variable ctx.env.PACKAGE_NAME │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
How to reproduce
Include some template code in snowflake.yml file that requires variable to be set, for example
and try to run simple query while snowflake.yml is in a current directory.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Invalid snowflake.yml file makes it impossible to run snow app sql
SNOW-1726409: Invalid snowflake.yml file makes it impossible to run snow app sql
Oct 7, 2024
sfc-gh-rzukowski
changed the title
SNOW-1726409: Invalid snowflake.yml file makes it impossible to run snow app sql
SNOW-1726409: Invalid snowflake.yml file makes it impossible to run snow sql
Oct 7, 2024
sfc-gh-rzukowski
changed the title
SNOW-1726409: Invalid snowflake.yml file makes it impossible to run snow sql
SNOW-1726409: Invalid/templated snowflake.yml file makes it impossible to run snow sql
Oct 7, 2024
SnowCLI version
2.8.0
Python version
3.9.18
Platform
macOS-14.6.1-arm64-arm-64bit
What happened
When snowflake.yml cannot be parsed because of an error or env variable not set,
it is not possible to run
snow sql
because snowflake.yml must be read at the beginning.This may not be a bug, but rather a design decision. I would expect that
snow sql
command is independent from a current project and it should not be using local files impllicitly to run, whilesnow app
is the command that could use local project files.If this is expected behaviour, I would suggest to give more descriptive error message saying explicitly that snowflake.yml cannot be read.
It is also worth considering an option to run sql query without touching files in local directory like snowflake.yml project file. The question is what the default should be.
Console output
How to reproduce
Include some template code in snowflake.yml file that requires variable to be set, for example
and try to run simple query while snowflake.yml is in a current directory.
The text was updated successfully, but these errors were encountered: