-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support CTAS into Iceberg with timestamp(3) #6658
Comments
I think this discussion will be more fruitful on the #iceberg channel on Trino Slack since there is a wide audience of other Iceberg users there who might have inputs/opinions. I'd suggest closing this issue here and moving the discussion over there. |
@hashhar thanks for you comment, but I think it is better to leave this issue open, because would be nice to have fix for it. |
I have renamed this issue and started discussion in slack |
I found this issue looking for guidance on how to resolve this for my use case. Help? Answering my own question: use 'timestamp(6)' instead of 'timestamp' as the SQL type for the Trino table. I'm using a system that's converting Pandas datatypes to Trino datatypes, and that was invisible to me. |
use |
@findepi we have thousands of scripts (as well as many other companies I believe do) that we are migrating to iceberg automatically. We can't just mechanically replace all the occurrences of now() or current_timestamp() with current_timestamp(6) as it may brake other places unrelated to iceberg and requires semantical analysis of the script. It will take hundreds of hours of work for the data developers to change the scripts and validate them. |
This is my hack to the Trino python client:
|
FWIW, all the JDBC connectors allow CTAS with timestamp precision other than supported by remote database's storage, including reducing the precision. This was a conscious choice, that we have debated about. For JDBC connectors this was easy by the virtue of
For Iceberg it's not as simple, because we don't have |
@findepi, @bitsondatadev, any update on this? We're getting more reports about it and would love to have it fixed somehow. |
Looks like this was broken down into multiple PRs. Checking with @mdesmet on the status. |
Trino uses 3 digits of subsecond precision in Date and time functions, but Iceberg expects timestamp with 3 digits of subsecond precision.
As a result we can't create Iceberg table from Trino
Exception:
Timestamp precision (3) not supported for Iceberg. Use "timestamp(6) with time zone" instead.
Is it possible to make default precision configurable or allow use of Timestamp with precision (3) for Iceberg tables?
The text was updated successfully, but these errors were encountered: