tlc.core.objects.tables.from_table.rolled_up_table#

A table that is rolled up from another table.

Module Contents#

Classes#

Class

Description

RolledUpTable

A table that is rolled up from another table.

API#

class tlc.core.objects.tables.from_table.rolled_up_table.RolledUpTable(url: tlc.core.url.Url | None = None, created: str | None = None, row_cache_url: tlc.core.url.Url | None = None, row_cache_populated: bool | None = None, override_table_rows_schema: Any = None, input_table_url: tlc.core.url.Url | tlc.core.objects.table.Table | None = None, roll_up_property: str | None = None, roll_up_columns: list[str] | None = None, init_parameters: Any = None)#

Bases: tlc.core.objects.table.Table

A table that is rolled up from another table.

The rows of the rolled-up table are created by grouping the rows of the input table by the roll-up property.

Parameters:
  • roll_up_property – The property to roll up.

  • roll_up_columns – List of top-level columns that should be rolled up alongside the roll-up property.

static set_nested_value(row_data: dict[str, Any], path: str, value: Any) None#
static get_nested_value_with_rollup_columns(row_data: dict[str, Any], roll_up_property: str, rollup_columns: list[str]) Any#

Returns the value of the roll-up property, with the roll-up columns added to the leaf node.