Skip to content
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

Configure timestamp downcast programmatically #960

Closed
devinrsmith opened this issue Jul 24, 2024 · 3 comments
Closed

Configure timestamp downcast programmatically #960

devinrsmith opened this issue Jul 24, 2024 · 3 comments
Assignees
Labels

Comments

@devinrsmith
Copy link

Feature Request / Improvement

During testing of 0.7.0rc1, I noticed timestamp downcast errors, introduced as part of #848.

I'd like to have a way to programmatically configure timestamp downcast in the python API without relying on environment variables or a yaml configuration file.

I would have assumed that something like

from pyiceberg.table import DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE

catalog = ...

table = catalog.create_table(
    ...
    properties={DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE: True},
)

or

from pyiceberg.table import DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE

catalog = load_catalog(
    ...,
    **{
        DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE: "True",
    }
)

would have been the proper way to configure it, but it doesn't seem to take in either case.

@sungwy
Copy link
Collaborator

sungwy commented Aug 1, 2024

Hi @devinrsmith thank you again for raising this suggestion. I'm working on a similar property driven feature in #986 where I'm proposing that we load the pyarrow file IO config property into the table property as you suggest in the bottom proposal

For example, it will look like:

from pyiceberg.io import PYARROW_DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE

catalog = load_catalog(
    ...,
    **{
        PYARROW_DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE: "True",
    }
)

When the proposed approach is accepted and merged, I will open a PR to suggest a similar configuration.

@sungwy sungwy self-assigned this Aug 1, 2024
Copy link

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

@github-actions github-actions bot added the stale label Jan 29, 2025
Copy link

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants