-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-642] Schema change detected for bigint columns (expected long) #357
Comments
@francescomucio Thanks for opening! Context from Slack thread here. It looks like bigint and long are aliases for one another in Databricks SQL: https://docs.databricks.com/sql/language-manual/data-types/bigint-type.html There's a specific fix we can make here: Add a mapping between those types within dbt-spark/dbt/adapters/spark/column.py Lines 21 to 23 in f03d217
On other databases, we use that the fixI think this might be as simple as:
class SparkColumn(dbtClassMixin, Column):
TYPE_LABELS: ClassVar[Dict[str, str]] = {
"LONG": "BIGINT",
} Plus a test case, for exactly the experience you're having. We have existing integration tests for Is that a fix you'd be interested in contributing? larger contextIn v1.2, we are looking to move away from using |
I can contribute with a quick fix, let me try :) |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Describe the bug
Incremental model doesn't run with bigint column.
Steps To Reproduce
Create an incremental model on a table with a bigint column, run it.
Expected behavior
It should fail with a schema change error.
Screenshots and log output
System information
dbt-core 1.1.0
dbt-databricks 1.1.0
The operating system you're using:
The output of
python --version
:Additional context
It looks like the relations cache is using
show table extended
while for the temp view dbt usesdescribe table
they return different data types for the Biging columns.The text was updated successfully, but these errors were encountered: