Table helpers#
The module yt_framework.operations.table provides small orchestration-side helpers around the YT client:
get_row_count— log and return row count.read_table— load all rows into alistof dicts (use only when the table fits in memory).download_table— export a table to a local JSONL file (dev/prod via the client).
When to use helpers vs yt_client#
Approach |
Use when |
|---|---|
|
You want consistent logging and a single import in stage code. |
|
You need streaming, partial reads, or lower-level control (as in many examples). |
Both are valid; examples in Pipelines and Stages and S3 operations often use yt_client directly.
Example#
from yt_framework.operations.table import get_row_count, read_table
n = get_row_count(self.deps.yt_client, "//tmp/pipeline/data", self.logger)
rows = read_table(self.deps.yt_client, "//tmp/pipeline/data", self.logger)
API#
Autodoc: Table operations in API Reference (yt_framework.operations.table).
See also#
YQL operations for SQL-style table processing
Map operations for per-row jobs