0

I am trying to create a incremental DBT model. The output is a Iceberg format based lakehouse which I am doing CRUD using Trino.

{{
 config(
 materialized='incremental',
 incremental_strategy='append',
 on_schema_change = 'append_new_columns',
 properties={
 'format': "'PARQUET'",
 'partitioning': "ARRAY['report_date','some_id']"
 }
 )
}}
select
 CAST(reportdate AS TIMESTAMP(6)) as report_date,
 gametype as game_type,
 CAST(createddate AS TIMESTAMP(6)) as created_date,
 
 currency,
 other_cols
FROM
{{ source('src_reports','my_src_table')}}
{% if is_incremental() %}
 where
 reportdate > (SELECT CAST(MAX(report_date) AS TIMESTAMP(6)) AS report_date_max FROM {{ this }})
{% endif %}

It runs just fine for the first time ( when there is no target table created already)

PROBLEM

On subsequent runs I get the error

Timestamp precision (3) not supported for Iceberg. Use "timestamp(6)

Output of show create table..

CREATE TABLE wh04.ca01.the_table (
 report_date timestamp(6),
 col1 varchar,
 created_date timestamp(6),
 place_time timestamp(6),
 // other cols
 
)
WITH (
 data_location = 's3://wh04',
 format = 'PARQUET',
 format_version = 2,
 location = 's3://wh04/ca01/the_table__dbt_tmp_cab07180-d73a-487e-bed9-67fd68f5ea4f',
 object_store_layout_enabled = true,
 partitioning = ARRAY['report_date','user_id']
)
io.trino.spi.TrinoException: Timestamp precision (3) not supported for Iceberg. Use "timestamp(6)" instead.
 at io.trino.plugin.iceberg.TypeConverter.toIcebergTypeInternal(TypeConverter.java:183)
 at io.trino.plugin.iceberg.TypeConverter.toIcebergTypeForNewColumn(TypeConverter.java:121)
 at io.trino.plugin.iceberg.IcebergUtil.schemaFromViewColumns(IcebergUtil.java:857)
 at io.trino.plugin.iceberg.catalog.rest.TrinoRestCatalog.createView(TrinoRestCatalog.java:614)
 at io.trino.plugin.iceberg.IcebergMetadata.createView(IcebergMetadata.java:3211)
 at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.createView(ClassLoaderSafeConnectorMetadata.java:661)
 at io.trino.tracing.TracingConnectorMetadata.createView(TracingConnectorMetadata.java:790)
 at io.trino.metadata.MetadataManager.createView(MetadataManager.java:1622)
 at io.trino.tracing.TracingMetadata.createView(TracingMetadata.java:957)
 at io.trino.execution.CreateViewTask.execute(CreateViewTask.java:151)
 at io.trino.execution.CreateViewTask.execute(CreateViewTask.java:53)

Exception as seen in Trino UI

asked Nov 18, 2025 at 10:30
3
  • can you run a 'show create table YOUR_TABLE_NAME;' command on your table and show the output of it? Commented Nov 18, 2025 at 15:30
  • @LesterMartin updated original post Commented Nov 19, 2025 at 4:37
  • 1
    GUESSING it is freaking out on the place_time column as whatever is coming across MIGHT be a ts(3). Maybe time to bring this to the trino slack community; trino.io/slack Commented Nov 26, 2025 at 19:33

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.