[X] I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
I have an incremental table int_nightly_sales, that is an intermediate table in our workflow.
When attempting to add a column to this table, I get a failure:
16:17:13 dbt.adapters.athena.constants adapter: Error running SQL: alter table `base_db_intermediate`.`int_nightly_sales`
replace columns (<columns>)
16:17:13 On model.daily_sales_sync.int_nightly_sales: Close
16:17:13 Runtime Error in model int_nightly_sales (models/intermediate/upload/int_nightly_sales.sql)
FAILED: SemanticException [Error 10072]: Database does not exist: base_db
The table should actually exist on: base_db_intermediate as called out in the config:
I dug through the adapter source and could not find a culprit on this, but the odd thing is the first message references the correct db, where the semantic error thrown references the base_db (which does not actually contain anything at all).
Expected Behavior
The table exists on the proper database in athena, the adapter should reference the correct database instead of the base database for on_schema_change.
Steps To Reproduce
Create an athena dbt project with a base schema (base)
Create an incremental model with a different schema (sub) -> base_sub
Is this a new bug in dbt-athena?
Current Behavior
I have an incremental table
int_nightly_sales
, that is an intermediate table in our workflow.When attempting to add a column to this table, I get a failure:
The table should actually exist on:
base_db_intermediate
as called out in the config:I dug through the adapter source and could not find a culprit on this, but the odd thing is the first message references the correct db, where the semantic error thrown references the base_db (which does not actually contain anything at all).
Expected Behavior
The table exists on the proper database in athena, the adapter should reference the correct database instead of the base database for
on_schema_change
.Steps To Reproduce
schema
(base
)schema
(sub
) ->base_sub
dbt build
dbt build
This should fail as described.
Environment
Additional Context
No response