[Bug] renamed_relations not providing overriding hook to adapters #9681
Labels
backport 1.7.latest
bug
Something isn't working
High Severity
bug with significant impact that should be resolved in a reasonable timeframe
Is this a new bug in dbt-core?
Current Behavior
Surfaced from debugging this transaction error in this Redshift issue.
In short, pre-
dbt-adapters
renamed_relations
is defined here in core.It is used to know when a
rename
instead of aget_drop_sql
macro can be called. This was implemented without mechanisms to support for adapter overrides leading to obscure behavior in Redshift adapters and presumably Bigquery, Databricks (they've been notified via Slack), Snowflake, and so on.For verbose details, see this lovely comment from @mikealfare .
Expected Behavior
renamed_relations
should not returnnull
, but that's what it's doing. So boolean checks using it return "falsey" results.Steps To Reproduce
This test in Redshift or other relevant repos.
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
redshift
Additional Context
Per Mike
The text was updated successfully, but these errors were encountered: