-
Notifications
You must be signed in to change notification settings - Fork 198
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
Pipeline crashes when single record has None value at incremental cursor path #1571
Comments
@willi-mueller how IMO we need nice exception message here explaining what happen, now I bet |
We already have a nice exception: See this error report: https://dlthub-community.slack.com/archives/C04DQA7JJN6/p1720531715761139 Proposal: The user can pass a callable that gets the row and returns a value for the cursor path if the value at the cursor path is dlt.sources.incremental(
cursor_path="created_at",
default_cursor_value=lambda row: row["created_at"] if row.get("updated_at", None) is None else row["updated_at"]
) |
@willi-mueller OK so it seems we need another setting in the incremental: so it is user's conscious decision what to do with such values. btw. this is possible even now by defining own also should work on object and arrow tables |
@willi-mueller idea of the callable is also good but I'm not sure if it does exactly what the user wants |
from what I observed, it crashes in This, a custom last_value_func does not seem to solve this problem. |
Wonderful! I forgot about the |
@rudolfix I am afraid that neither the I am afraid that we need to touch the incremental object. I like the idea of the parameter I am not sure if the |
Another problem with the
|
@rudolfix @sh-rp Yes, you are right: However, this issue is still open because of two reasons:
Please check out my implementation: #1576 |
dlt version
0.5.1
Describe the problem
The following data crashes when trying to load it incrementally with the
cursor_path="created_at"
I could not isolate it yet, but in version 0.4.12 the second row where the
created_at is None
was under some unknown conditions skipped over and not loaded into the destination.Expected behavior
None
.None
.Steps to reproduce
See test suite in #1576
Operating system
macOS
Runtime environment
Local
Python version
3.11
The text was updated successfully, but these errors were encountered: