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

Fix/incremental with timezone naive datetime #330

Merged
merged 2 commits into from
May 11, 2023

Conversation

steinitzu
Copy link
Collaborator

Cast all datetimes to pendulum before doing incremental comparison. Fixes error when the row value is a timezone naive python datetime.
The state value always deserializes to tz aware pendulum datetime. But sql db resources return python datetimes with or without timezone.

Second commit with the json fix is unrelated, spotted it when testing :)

@netlify
Copy link

netlify bot commented May 11, 2023

Deploy Preview for dlt-hub-docs canceled.

Name Link
🔨 Latest commit ad39213
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/645c3e7703007b0008e05f09

@steinitzu steinitzu force-pushed the fix/incremental-tz-naive-datetime branch from 6edbd9b to ad39213 Compare May 11, 2023 01:01
@steinitzu steinitzu requested a review from rudolfix May 11, 2023 01:09
dlt/extract/incremental.py Show resolved Hide resolved
dlt/common/json/__init__.py Show resolved Hide resolved
@rudolfix rudolfix merged commit e1b5f06 into devel May 11, 2023
@rudolfix rudolfix deleted the fix/incremental-tz-naive-datetime branch May 11, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants