Soham Dasgupta
06/19/2025, 6:50 AMio.trino.spi.TrinoException: Incorrect timestamp precision for timestamp(6); the configured precision is MILLISECONDS; column name: bucket_start
at io.trino.plugin.hive.HiveMetadata.validateTimestampTypes(HiveMetadata.java:3890)
at io.trino.plugin.hive.HiveMetadata.validateTimestampColumns(HiveMetadata.java:3882)
at io.trino.plugin.hive.HiveMetadata.getNewTableLayout(HiveMetadata.java:3494)
at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.getNewTableLayout(ClassLoaderSafeConnectorMetadata.java:135)
at io.trino.tracing.TracingConnectorMetadata.getNewTableLayout(TracingConnectorMetadata.java:557)
at io.trino.metadata.MetadataManager.getNewTableLayout(MetadataManager.java:1098)
at io.trino.tracing.TracingMetadata.getNewTableLayout(TracingMetadata.java:581)
at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitCreateTableAsSelect(StatementAnalyzer.java:986)
at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitCreateTableAsSelect(StatementAnalyzer.java:520)
at io.trino.sql.tree.CreateTableAsSelect.accept(CreateTableAsSelect.java:96)
at io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)
at io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:539)
at io.trino.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:499)
at io.trino.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:488)
at io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:98)
at io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:87)
at io.trino.execution.SqlQueryExecution.analyze(SqlQueryExecution.java:289)
at io.trino.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:222)
at io.trino.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:892)
at io.trino.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:153)
at io.trino.$gen.Trino_457____20250328_163719_2.call(Unknown Source)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1575)kapa.ai
06/19/2025, 6:50 AMkapa.ai
06/19/2025, 6:50 AMmetadata table fails to create with dbt-trino with a Delta Lake catalog](https://github.com/elementary-data/elementary/issues/1648). - The error message and stack trace you provided match those described in the issues above. - The recommended workaround in Athena is to cast the timestamp columns to the supported precision (timestamp(3)), but there is no explicit solution documented for Trino in the knowledge sources. - This is a limitation of the underlying data warehouse, not specifically Elementary, but it affects Elementary's ability to create its models and tables. What you can do: - There is no direct fix documented in the knowledge sources for Elementary 0.18.3 and Trino. However, the general approach is to ensure that any timestamp columns in your models are cast to the supported precision (timestamp(3)) before table creation. - If you have control over the dbt models or can customize the Elementary package, you may need to modify the relevant models or macros to cast timestamp columns accordingly. - If this is a blocker, consider reaching out to the Elementary community or opening an issue, referencing the similar problems in Athena and Trino as described above. Summary: This is a known compatibility issue between Elementary and Trino (and Athena) regarding timestamp precision. The knowledge sources do not provide a ready-made solution for Trino, but the root cause and context are well-documented. You may need to adjust your models to cast timestamps to millisecond precision or wait for an upstream fix in Elementary or dbt for Trino support. If you need more detailed guidance on how to implement the casting workaround, please let me know!Soham Dasgupta
06/19/2025, 6:54 AMkapa.ai
06/19/2025, 6:54 AMkapa.ai
06/19/2025, 6:55 AM