[CT-3269] [Bug] dbt build with enforce.contract = True
cannot validate datatypes from dbms extensions like postgis
#8916
Labels
enforce.contract = True
cannot validate datatypes from dbms extensions like postgis
#8916
Is this a new bug in dbt-core?
Related to this enhancement : [CT-3263] [Feature] User space Jinja macro for converting DB API 2.0
type_code
s intodata_type
s #8900Current Behavior
For a very simple model with a geometry column and
contract.enforced == true
,dbt build
should be able to validate in some way the custom typegeometry
(It fails with or without Type modifiers). Instead, DBT fails with an unhandled error. For example :With a simple model named
little_geom_model
And its yaml associated contract:
the command
dbt build
fails like this:Expected Behavior
For the model above, we expect DBT to either :
Also, event if this is not possible, we expect that the exception is not "Unhandled"
Steps To Reproduce
Config: See above
Environment : POSTGIS enables Postgresql Database
command :
dbt build
Relevant log output
Environment
Which database adapter are you using with dbt?
postgres
Additional Context
I think the following will lead to the same fixes : #8720
But at the same time, the problem is not necessarily related with
dbt-codegen
. Model contract enforcing should work with any model generated or notThe text was updated successfully, but these errors were encountered: