Skip to main content
Version: 1.3.0 (latest)

extract.incremental.transform

IncrementalTransform Objects

class IncrementalTransform()

[view_source]

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.

deduplication_disabled

@property
def deduplication_disabled() -> bool

[view_source]

Skip deduplication when length of the key is 0

JsonIncremental Objects

class JsonIncremental(IncrementalTransform)

[view_source]

Extracts incremental data from JSON data items.

find_cursor_value

def find_cursor_value(row: TDataItem) -> Any

[view_source]

Finds value in row at cursor defined by self.cursor_path.

Will use compiled JSONPath if present. Otherwise, reverts to field access if row is dict, Pydantic model, or of other class.

__call__

def __call__(row: TDataItem) -> Tuple[Optional[TDataItem], bool, bool]

[view_source]

Returns:

Tuple (row, start_out_of_range, end_out_of_range) where row is either the data item or None if it is completely filtered out

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.