Skip to content

Commit

Permalink
Add a docstring to the IncrementalTransform class (#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
burnash committed Jun 12, 2024
1 parent 3efc10b commit 23c6365
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dlt/extract/incremental/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@


class IncrementalTransform:
"""A base class for handling extraction and stateful tracking
of incremental data from input data items.
By default, the descendant classes are instantiated within the
`dlt.extract.incremental.Incremental` class.
Subclasses must implement the `__call__` method which will be called
for each data item in the extracted data.
"""
def __init__(
self,
resource_name: str,
Expand Down Expand Up @@ -100,6 +109,7 @@ def deduplication_disabled(self) -> bool:


class JsonIncremental(IncrementalTransform):
"""Extracts incremental data from JSON data items."""
def find_cursor_value(self, row: TDataItem) -> Any:
"""Finds value in row at cursor defined by self.cursor_path.
Expand Down

0 comments on commit 23c6365

Please sign in to comment.