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
Kumar Sambhav
7,77519 gold badges68 silver badges89 bronze badges
-
can you run a 'show create table YOUR_TABLE_NAME;' command on your table and show the output of it?Lester Martin– Lester Martin2025年11月18日 15:30:34 +00:00Commented Nov 18, 2025 at 15:30
-
@LesterMartin updated original postKumar Sambhav– Kumar Sambhav2025年11月19日 04:37:39 +00:00Commented Nov 19, 2025 at 4:37
-
1GUESSING 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/slackLester Martin– Lester Martin2025年11月26日 19:33:08 +00:00Commented Nov 26, 2025 at 19:33