Skip to content

Commit

Permalink
fix: Query comment for create table statement (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanromeo authored Aug 12, 2024
1 parent d115fb0 commit fbe3bc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbt/adapters/athena/query_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def add(self, sql: str) -> str:

# alter or vacuum statements don't seem to support properly query comments
# let's just exclude them
if any(map(sql.lower().__contains__, ["alter", "drop", "optimize", "vacuum", "msck"])):
if any(sql.lower().startswith(keyword) for keyword in ["alter", "drop", "optimize", "vacuum", "msck"]):
return sql

cleaned_query_comment = self.query_comment.strip().replace("\n", " ")
Expand Down

0 comments on commit fbe3bc4

Please sign in to comment.