delta-io / delta-sharing

An open protocol for secure data sharing
https://delta.io/sharing
Apache License 2.0
753 stars 168 forks source link

load_table_changes_as_pandas with timestamps #488

Open john-grassroots opened 4 months ago

john-grassroots commented 4 months ago

I'm able to call load_table_changes_as_pandas fine when passing in version numbers but receive errors when attempting to pass timestamps (or stringified timestamp as the api seems to expect).

When passing in timestamps I see the following error message: quote_from_bytes() expected bytes


# relevant date/timestamp code....

from datetime import datetime as dtm

start = dtm(2024, 5, 17, 17, 27, 48, 0).timestamp()
end = dtm.timestamp(dtm.now())

# call load_table_changes_as_pandas
# don't set start/end versions
# do set start/end timestamp

When converting timestamps to string as api seems to expect, I receive the following...

{ 'error_code': 'BAD_REQUEST', 'message': "Invalid startingTimestamp: Text '1715988468.0' could not be " 'parsed at index 0.'}


# relevant date/timestamp code....

from datetime import datetime as dtm

start = str(dtm(2024, 5, 17, 17, 27, 48, 0).timestamp())
end = str(dtm.timestamp(dtm.now()))

# call load_table_changes_as_pandas
# don't set start/end versions
# do set start/end timestamp