Skip to content

client.context.filter.components

trendminer_interface._client.context.filter.component_filter.ContextComponentFilterFacade

Facade for creating context component filters

new staticmethod

new(
    queries: list[
        tuple[
            Tag | Asset | Attribute,
            Literal["self", "ancestors", "descendants"],
        ]
    ]
    | None = None,
    mode: EmptyMode | None = None,
) -> ContextComponentFilter

Context filter on components the context items are attached to

Parameters:

Name Type Description Default
queries list[tuple[Tag | Asset | Attribute, Literal['self', 'ancestors', 'descendants']]] | None

List of components on which to filter, and whether to include ancestors or descendants. For tags, only self is valid. For attributes, only self and ancestors are possible. For assets, all options are valid.

None
mode EmptyMode | None

When not None, filter on whether the context items are attached to any component at all. Ignores the queries when not None.

None