Skip to content

Commit

Permalink
supports include null cursor_path rows for RecordBatches
Browse files Browse the repository at this point in the history
  • Loading branch information
willi-mueller committed Aug 7, 2024
1 parent 6d7d4c0 commit d4b8b68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions dlt/extract/incremental/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
from dlt.common.typing import TDataItem




class IncrementalCursorPathMissing(PipeException):
def __init__(
self, pipe_name: str, json_path: str, item: TDataItem = None, msg: str = None
Expand Down
6 changes: 5 additions & 1 deletion dlt/extract/incremental/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,11 @@ def __call__(
)
)
if self.on_cursor_value_missing == "include":
tbl = pa.concat_tables([tbl, tbl_with_null])
if isinstance(tbl, pa.RecordBatch):
assert isinstance(tbl_with_null, pa.RecordBatch)
tbl = pa.Table.from_batches([tbl, tbl_with_null])
else:
tbl = pa.concat_tables([tbl, tbl_with_null])

if len(tbl) == 0:
return None, start_out_of_range, end_out_of_range
Expand Down

0 comments on commit d4b8b68

Please sign in to comment.