I opened an issue for this, but what is the recomm...
# singer-tap-development
s
I opened an issue for this, but what is the recommended way to handle a timestamp replication key that is
epoch
encoded? It isn't parseable with
dateutil.parser
which is what the SDK uses, but it is with
datetime.fromtimestamp
.
Copy code
>>> from datetime import datetime
>>> ts = 1634606164.000200
>>> datetime.fromtimestamp(ts)
datetime.datetime(2021, 10, 18, 21, 16, 4, 200)
https://gitlab.com/meltano/sdk/-/issues/262
v
I don't know, but if you want an example of what I did for this scenario check out https://github.com/AutoIDM/tap-clickup/blob/main/tap_clickup/streams.py#L190 I went the other way and left everything as epoch
s
gotcha, that makes sense 👍
This is what I ended up doing as well. Just have to convert the start date to time stamp and then treat the replication value as a number. One question - does it always take the “max” value for the new state?
v
SDK did release a fix that I believe does that but I'd test it. https://github.com/AutoIDM/tap-clickup/blob/main/tap_clickup/streams.py#L181 was written before the fix and handles it as well