You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Hey there @praneeth1987, thanks for bringing this up. I'm not sure what the right fix is here. If we add remove_comments=True to the execute_string() call then all comments in the script will be removed. Some customers rely on comments in their queries for various reasons.
I would suggest just removing that from the script. Are you using source control? In general it's a best practice to not check in/commit code with comments and source control would help you keep the version history in case you needed to revert at some point. Just a thought.
This caught me for a while too as I was using a comment at the end of my scripts: --End
to signify the end of the script. I removed the final comment and the tool works as expected running from inside Azure DevOps.
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?
The text was updated successfully, but these errors were encountered: