Skip to content

[Bug] Model contract with bare NUMBER/NUMERIC/DECIMAL on an Iceberg table fails with opaque Snowflake error 099200 #2091

Description

@sfc-gh-nijain

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Which packages are affected?

  • dbt-snowflake

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

  1. Configure a Snowflake Iceberg model (BUILT_IN or ICEBERG_REST catalog) with contract: {enforced: true}
  2. In schema.yml, declare a column with data_type: number (no precision/scale)
  3. Run dbt run
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions