Snowflake-Labs / schemachange

A Database Change Management tool for Snowflake
Apache License 2.0
481 stars 219 forks source link

How to execute Package SQL in schemachange #175

Open lakshmiprasannaguntuka opened 1 year ago

lakshmiprasannaguntuka commented 1 year ago

Hi Team,

In SnowSql we have command to execute the master script to execute internal scripts using !load command. when we are trying to execute that from Schemachange its failing getting following error :

snowflake.connector.errors.ProgrammingError: 000900 (42601): SQL compilation error:

Empty SQL statement.

Could you suggest Us Ho to use Load in schemachange

romaain commented 1 year ago

I have the same problem. I tried to use the include functionality of jinja but it did not help

sfc-gh-jhansen commented 11 months ago

Hey all. The primary issue here is that !load command is a snowsql specific thing. If you have suggestions for how schemachange can be updated to support this (with Jinja) I would welcome the PR!

sfc-gh-tmathew commented 9 months ago

Hello @lakshmiprasannaguntuka, @romaain

Could you take a look at #110 and see if the approaches discussed there will help run your master script using schemachange similar to snowsql's !load command.