From fbe3bc406ab366a91bf82672b452b293941c95ec Mon Sep 17 00:00:00 2001 From: Roman Korsun <44975602+sanromeo@users.noreply.github.com> Date: Mon, 12 Aug 2024 18:02:09 +0300 Subject: [PATCH] fix: Query comment for create table statement (#702) --- dbt/adapters/athena/query_headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/adapters/athena/query_headers.py b/dbt/adapters/athena/query_headers.py index ab3d1a61..8fbc1885 100644 --- a/dbt/adapters/athena/query_headers.py +++ b/dbt/adapters/athena/query_headers.py @@ -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", " ")