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
Deprecate/remove/rename {{ drop_relation() }}, either by calling dispatch directly in the adapter method or renaming this macro so that it is more clearly returning adapter.dispatch(DROP_RELATION_MACRO_NAME) and not a macro that should be called directly
The text was updated successfully, but these errors were encountered:
Adapter maintainers and users should always call either:
adapter.drop_relation
drop_relation_if_exists
(syntactic sugar that checks cache first, and then callsadapter.drop_relation
)Why? Calling
{{ drop_relation() }}
directly does not update the cache!! That happens within the adapterdrop_relation
method here:dbt-adapters/dbt/adapters/sql/impl.py
Lines 140 to 145 in a2292c8
Even though this method ultimately shells out to a macro called
{{ drop_relation() }}
:dbt-adapters/dbt/include/global_project/macros/relations/drop.sql
Lines 26 to 34 in a2292c8
Proposals
{{ drop_relation() }}
, either by callingdispatch
directly in the adapter method or renaming this macro so that it is more clearly returningadapter.dispatch(DROP_RELATION_MACRO_NAME)
and not a macro that should be called directlyThe text was updated successfully, but these errors were encountered: