Skip to content

Commit

Permalink
Add inherit_cache attribute for CreateTableAs custom SA Clause (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis authored and utkarsharma2 committed Apr 22, 2024
1 parent 59b143d commit f31b735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/utils/db_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def _subquery_keep_last(*, recency_column, keep_last_filters, group_by_columns,
class CreateTableAs(Executable, ClauseElement):
"""Custom sqlalchemy clause element for CTAS operations."""

inherit_cache = False

def __init__(self, name, query):
self.name = name
self.query = query
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ filterwarnings = [
# Avoid building cartesian product which might impact performance
"error:SELECT statement has a cartesian product between FROM:sqlalchemy.exc.SAWarning:airflow",
'error:Coercing Subquery object into a select\(\) for use in IN\(\):sqlalchemy.exc.SAWarning:airflow',
'error:Class.*will not make use of SQL compilation caching',
"ignore::DeprecationWarning:flask_appbuilder.filemanager",
"ignore::DeprecationWarning:flask_appbuilder.widgets",
# FAB do not support SQLAclhemy 2
Expand Down

0 comments on commit f31b735

Please sign in to comment.