hello @noorbasha534
Unfortunately, in SQL Warehouses, you can't attach an init script that automatically runs when the warehouse starts (similar to what you can do with clusters).
However, there are a few alternatives you can consider:
Session Variables: You can set session variables like src_catalog_name and tgt_catalog_name within the current session. These variables will persist only for the duration of the session and need to be redefined when the session restarts. You can use these variables in your queries during the session. Docs
Widgets: Another option is to use widgets to parameterize your queries. Widgets allow you to create interactive elements in notebooks, which can help you define values dynamically. These are especially useful for dashboards and notebooks where user input is required. Docs
SQL Procedures (Public Preview): If your account has access to the SQL Procedures feature (currently in public preview), you can define procedural logic with variables and dynamic SQL. This feature might offer a more flexible solution, but you'll need to verify if it's available in your account. Docs
So you'll need to manage these variables and parameters manually for each session or query run.
Hope this helps, ๐
Isi