diff --git a/airflow/utils/sqlalchemy.py b/airflow/utils/sqlalchemy.py index ab0bc5dff8cc7..a6270ea0087bf 100644 --- a/airflow/utils/sqlalchemy.py +++ b/airflow/utils/sqlalchemy.py @@ -60,6 +60,8 @@ class UtcDateTime(TypeDecorator): impl = TIMESTAMP(timezone=True) + cache_ok = True + def process_bind_param(self, value, dialect): if value is not None: if not isinstance(value, datetime.datetime): @@ -110,6 +112,8 @@ class ExtendedJSON(TypeDecorator): impl = Text + cache_ok = True + def db_supports_json(self): """Checks if the database supports JSON (i.e. is NOT MSSQL)""" return not conf.get("database", "sql_alchemy_conn").startswith("mssql") @@ -212,6 +216,8 @@ class Interval(TypeDecorator): impl = Text + cache_ok = True + attr_keys = { datetime.timedelta: ('days', 'seconds', 'microseconds'), relativedelta.relativedelta: (