I have define the variables inside the SQL script for database and schema. So is there any way to run that SQL script in different databases and schema at the same time?
my SQL script looks like this,
use database &{db};
use schema &{sc};
create table a_multi_test
(
id int
, name varchar
);
here what I run in powershell,
snowsql -c my_conn -f ...\multi_test.sql -D db=dev -D sc=schm -D sc=schm2;
I was successfully able to create table but only in second(schm2) schema. It selected second schema not the both. Also, how can I define variable for warehouse as well? or I only can do that in config file by setting up connection parameters? Please help me through this and feel free to suggest any good documentation about Snowsql variables.
Thanks!