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
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
Hello @magno32 ! Apologies on the delayed response - we didn't realize that our github triage bot wasn't working correctly so I wasn't see new tickets on this repo. That's fixed now.
I'm struggling to recreate this error so would like to ask some follow up questions:
did you create the incremental model first in base_db and then moved it to base_db_intermediate?
What is the schema that the table int_nightly_sales is trying to select from? (is it selecting tables in base_db?)
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
The text was updated successfully, but these errors were encountered: