You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally created by @stkbailey on 2021-11-02 00:33:39
Summary
From what I can tell, the SDK cannot currently parse epoch-encoded timestamps and instead pushes them through the handle_invalid_timestamp logic. This is because the timestamp parsing is done using the dateutil.parser.parse functionality. Example below:
from dateutil import parser
ts = 1634606164.000200
parser.parse(ts)
>>> ERROR: dateutil.parser._parser.ParserError: year 1634606164 is out of range: 1634606164.000200
However, if we use datetime.datetime.fromtimestamp, the value is parsed successfully.
In this scenario, I would like to be able to use ts as a date-time formatted replication key column, but the strategy for doing so is not entirely clear to me.
Proposed benefits
Enabling epoch parsing would allow more timestamp data to be treated in a "standard" way.
Proposal details
I would like to see the SDK handle this case easily, to reduce friction when developing against this type of data.
Best reasons not to build
It is not entirely clear to me whether handling the data as a timestamp is the best way to approach this problem. Should we add a new "format" -- date_epoch? The major issue I could see is that, if an epoch timestamp is used as the replication key (e.g.), it would need to remain unconverted when being pushed to the external system. (The SDK shouldn't convert epoch -> date_iso8601, and then send that timestamp in the request.)
The text was updated successfully, but these errors were encountered:
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.
Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/262
Originally created by @stkbailey on 2021-11-02 00:33:39
Summary
From what I can tell, the SDK cannot currently parse epoch-encoded timestamps and instead pushes them through the
handle_invalid_timestamp
logic. This is because the timestamp parsing is done using thedateutil.parser.parse
functionality. Example below:However, if we use
datetime.datetime.fromtimestamp
, the value is parsed successfully.In this scenario, I would like to be able to use
ts
as a date-time formatted replication key column, but the strategy for doing so is not entirely clear to me.Proposed benefits
Enabling epoch parsing would allow more timestamp data to be treated in a "standard" way.
Proposal details
I would like to see the SDK handle this case easily, to reduce friction when developing against this type of data.
Best reasons not to build
It is not entirely clear to me whether handling the data as a timestamp is the best way to approach this problem. Should we add a new "format" --
date_epoch
? The major issue I could see is that, if an epoch timestamp is used as the replication key (e.g.), it would need to remain unconverted when being pushed to the external system. (The SDK shouldn't convert epoch -> date_iso8601, and then send that timestamp in the request.)The text was updated successfully, but these errors were encountered: