delta-sharing icon indicating copy to clipboard operation
delta-sharing copied to clipboard

load_table_changes_as_pandas with timestamps

Open john-grassroots opened this issue 9 months ago • 0 comments

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

john-grassroots avatar May 20 '24 21:05 john-grassroots