kunaljubce commented on issue #48233: URL: https://github.com/apache/airflow/issues/48233#issuecomment-2761771365
Ok @set92, I debugged this and it seems like the difference in behaviour between `SnowflakeHook` and `SnowflakeSqlApiOperator` is exactly as intended with regards to how they treat multi-sql blocks. And this is partly attributed to the way they are authenticating and communicating with Snowflake, i.e. `SnowflakeHook` allows all forms of authentication including username/password etc, whereas `SnowflakeSqlApiOperator` only supports Snowflake SQL API authentication via key/pair. Looking into the [Snowflake doc which you have referred above](https://docs.snowflake.com/en/developer-guide/sql-api/submitting-multiple-statements#specifying-multiple-sql-statements-in-the-request), it also mentions communicating with Snowflake via API for multi-sql statements to be processed as a single query block. This is where `SnowflakeHook` gets its restriction and for your usecase, it seems prudent to choose either of the operators depending on what you need the most - Single transaction debuggability (SnowflakeSqlApiOperator) or dag code simplicity (SnowflakeHook). @potiuk Please feel free to add if I am missing something or correct me if I am wrong. Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
