Is this a new bug?
Which packages are affected?
Current Behavior
If a model contract declares a column with a bare number, numeric, or decimal type (no precision or scale) and the model is an Iceberg table, dbt run fails deep into execution with a Snowflake error:
Database Error in model my_model (models/my_model.sql)
099200 (P0000): Iceberg does not support the type for column 'ID': numeric
Regular Snowflake (non-Iceberg) tables silently coerce bare NUMBER to NUMBER(38,0), so this error only surfaces when switching to Iceberg. The raw Snowflake error does not tell you that the fix is simply to add explicit precision and scale in the contract.
Expected Behavior
dbt should fail fast with a clear, actionable error before the CREATE statement is sent to Snowflake. The message should name the offending column(s) and tell the user to add explicit precision and scale (e.g., number(38, 0)).
Steps To Reproduce
- Configure a Snowflake Iceberg model (BUILT_IN or ICEBERG_REST catalog) with
contract: {enforced: true}
- In
schema.yml, declare a column with data_type: number (no precision/scale)
- Run
dbt run
- Observe the opaque 099200 from Snowflake
schema.yml:
models:
- name: my_model
config:
contract:
enforced: true
columns:
- name: id
data_type: number
Relevant log output
Database Error in model my_model (models/my_model.sql)
099200 (P0000): Iceberg does not support the type for column 'ID': numeric
Environment
- OS:
- Python:
- dbt-adapters: 1.10.x
- dbt-snowflake: 1.11.0 (latest stable; likely affects any version with Iceberg support)
- Snowflake Iceberg table (BUILT_IN or ICEBERG_REST catalog, format version 2 or 3)
Is this a new bug?
Which packages are affected?
Current Behavior
If a model contract declares a column with a bare
number,numeric, ordecimaltype (no precision or scale) and the model is an Iceberg table,dbt runfails deep into execution with a Snowflake error:Regular Snowflake (non-Iceberg) tables silently coerce bare
NUMBERtoNUMBER(38,0), so this error only surfaces when switching to Iceberg. The raw Snowflake error does not tell you that the fix is simply to add explicit precision and scale in the contract.Expected Behavior
dbt should fail fast with a clear, actionable error before the
CREATEstatement is sent to Snowflake. The message should name the offending column(s) and tell the user to add explicit precision and scale (e.g.,number(38, 0)).Steps To Reproduce
contract: {enforced: true}schema.yml, declare a column withdata_type: number(no precision/scale)dbt runschema.yml:
Relevant log output
Environment