Skip to content

aggregate

aggregate

DomoDataflow Aggregate Actions

Aggregation and windowing actions in Magic ETL v2. These correspond to the "Aggregate" category in the Domo ETL UI sidebar.

DomoDataflow_Action_GroupBy dataclass

DomoDataflow_Action_GroupBy(
    id: str,
    action_type: str = None,
    tile_type: str | None = None,
    name: str = None,
    depends_on: list[str] = None,
    disabled: bool = False,
    gui: dict = None,
    settings: dict = None,
    raw: dict = None,
    parent_actions: list[DomoDataflow_Action_Base] = None,
    groups: list[dict] = None,
    fields: list[dict] = None,
    all_rows: bool = False,
    add_line_number: bool = False,
    give_back_row: str = None,
    input: str = None,
    tables: list[dict] = None,
)

Bases: DomoDataflow_Action_Base

Group By action - aggregates data by grouping columns.

Attributes:

Name Type Description
groups list[dict]

List of columns to group by

fields list[dict]

List of aggregation fields with aggregation type

all_rows bool

Whether to include all rows (not just first per group)

Example

groupby_action = dataflow.get_action_objects("GroupBy")[0] print(f"Grouping by: {groupby_action.group_columns}") print(f"Aggregations: {groupby_action.aggregations}")

aggregations property

aggregations: dict[str, str]

Get mapping of output column -> aggregation type.

column_relationships property

column_relationships: set[ColumnRelationship]

Column relationships for GroupBy tile.

Group columns → DIRECT/IDENTITY (passthrough) Aggregate fields → DIRECT/AGGREGATION (source column → output column)

group_columns property

group_columns: list[str]

Get list of columns being grouped by.

DomoDataflow_Action_WindowAction dataclass

DomoDataflow_Action_WindowAction(
    id: str,
    action_type: str = None,
    tile_type: str | None = None,
    name: str = None,
    depends_on: list[str] = None,
    disabled: bool = False,
    gui: dict = None,
    settings: dict = None,
    raw: dict = None,
    parent_actions: list[DomoDataflow_Action_Base] = None,
    additions: list[dict] = None,
    group_rules: list[dict] = None,
    order_rules: list[dict] = None,
    input: str = None,
    tables: list[dict] = None,
)

Bases: DomoDataflow_Action_Base

Window action - performs window/ranking functions.

Also known as "Rank & Window" in the Magic ETL UI.

Attributes:

Name Type Description
additions list[dict]

List of window function definitions

group_rules list[dict]

Columns to partition by

order_rules list[dict]

Columns to order by within partitions

Example

window_action = dataflow.get_action_objects("WindowAction")[0] print(f"Partitioning by: {window_action.partition_columns}")

column_relationships property

column_relationships: set[ColumnRelationship]

Column relationships for WindowAction (Rank & Window) tile.

Partition columns → INDIRECT/WINDOW Order columns → INDIRECT/SORT Addition (window function) columns → DIRECT/TRANSFORMATION

order_columns property

order_columns: list[str]

Get list of columns used for ordering.

partition_columns property

partition_columns: list[str]

Get list of columns used for partitioning.