I am using SnowSQL to run a SQL script. I have command line parameters which needs to also be passed to the SQL script during my SnowSQL call. Here is what I have:
SQL script (file.sql):
select * from table where cli_id = '$1' and store_id = '$2';
Shell script (run.sh):
snowsql -c credentials -f file.sql
I run this in my terminal with the following command:
sh run.sh 123 555
This isn't working - how can I fix it to pass the parameters to the SQL file correctly?
And in the SQL file:
See: Using SnowSQL — Snowflake Documentation / Using Variables / Defining While Connecting