-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mockup incremental implementation for arrow tables
- Loading branch information
Showing
5 changed files
with
317 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from dlt.extract.exceptions import PipeException | ||
from dlt.common.typing import TDataItem | ||
|
||
|
||
class IncrementalCursorPathMissing(PipeException): | ||
def __init__(self, pipe_name: str, json_path: str, item: TDataItem) -> None: | ||
self.json_path = json_path | ||
self.item = item | ||
msg = f"Cursor element with JSON path {json_path} was not found in extracted data item. All data items must contain this path. Use the same names of fields as in your JSON document - if those are different from the names you see in database." | ||
super().__init__(pipe_name, msg) | ||
|
||
|
||
class IncrementalPrimaryKeyMissing(PipeException): | ||
def __init__(self, pipe_name: str, primary_key_column: str, item: TDataItem) -> None: | ||
self.primary_key_column = primary_key_column | ||
self.item = item | ||
msg = f"Primary key column {primary_key_column} was not found in extracted data item. All data items must contain this column. Use the same names of fields as in your JSON document." | ||
super().__init__(pipe_name, msg) |
Oops, something went wrong.