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
Source freshness fails when casting loaded_at_field to the data type timestamp. In this case, the column is being cast from CHARACTER VARYING(500).
The names of files/tables will be omitted from the code snippets and error messages.
Error message
07:37:45 Database Error in source some_table(path/to/model)
07:37:45 ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Type some_column2 is not a defined system type. (243) (SQLExecDirectW)')
Running with dbt-core 1.3.4 and dbt-sqlserver 1.3.2
Attempted workarounds
Used explicit SQL statements CAST()/CONVERT() to TIMESTAMP and DATETIMEOFFSET
Used explicit SQL statements CAST()/CONVERT() to DATETIMEOFFSET, DATETIME, and DATE after using SUBSTRING() to format the column to match the casted type's format
Surrounded the column names with [] while casting/converting with explicit SQL statements
Used data_type: varchar(500)
None of which helped remedy the issue.
How to repro
Copy the provided raw.yml file to the sources directory
Ensure that tables matching the schema exist and any needed credentials are set up
Run dbt-source freshness and then observer the error
The text was updated successfully, but these errors were encountered:
General Description
Source freshness fails when casting
loaded_at_field
to the data typetimestamp
. In this case, the column is being cast fromCHARACTER VARYING(500)
.The names of files/tables will be omitted from the code snippets and error messages.
Error message
Set up used
raw.yml:
Running with dbt-core 1.3.4 and dbt-sqlserver 1.3.2
Attempted workarounds
[]
while casting/converting with explicit SQL statementsdata_type: varchar(500)
None of which helped remedy the issue.
How to repro
raw.yml
file to thesources
directorydbt-source freshness
and then observer the errorThe text was updated successfully, but these errors were encountered: