Skip to content

[Bug] Iceberg timestamp-precision error (091385) gives no guidance on how to fix it #2090

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

When you create an Iceberg table that includes a TIMESTAMP_NTZ(9) column, Snowflake rejects the CREATE with error 091385:

Database Error in model my_model (models/my_model.sql)
  091385 (42601): Invalid time type scale specified for column 'TS'
  with data type 'TIMESTAMP_NTZ(9)'.

The error message gives no indication of what the valid range is or how to fix it.

Expected Behavior

The error should explain that Iceberg (format version 2) only supports timestamps up to microsecond precision (scale 6), and tell the user what they can do: cast to TIMESTAMP_NTZ(6) / TIMESTAMP_LTZ(6), or use a format-version 3 table with nanosecond support enabled.

Steps To Reproduce

  1. Configure a Snowflake Iceberg model (BUILT_IN or ICEBERG_REST catalog)
  2. Write a model that selects a TIMESTAMP_NTZ(9) expression
  3. Run dbt run
  4. Observe the raw 091385 with no actionable guidance

Relevant log output

Database Error in model my_model (models/my_model.sql)
  091385 (42601): Invalid time type scale specified for column 'TS'
  with data type 'TIMESTAMP_NTZ(9)'.

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)

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