schemachange icon indicating copy to clipboard operation
schemachange copied to clipboard

Schemachange is failing when we have any comments in the code

Open praneeth1987 opened this issue 2 years ago • 0 comments

I have below sql file which needs to be deployed

create table --------; //alter table

After testing in DEV, I no longer need alter table command. I have commented out alter table command while promoting to TEST & PROD , but it is failing with below error

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

As per this https://community.snowflake.com/s/article/Empty-SQL-Statement-When-Through-Python-Code-When-We-Have-Commented-Lines-In-the-Code-File We need to use the set remove_comments=True, Do you have any alternative for this or is this known issue?

praneeth1987 avatar Sep 27 '22 12:09 praneeth1987