Skip to content

component

Module for knowledge model components.

Attribute

Bases: AttributeMetadata

Class for knowledge model record attributes.

id class-attribute instance-attribute

id = Field(alias='id')

display_name class-attribute instance-attribute

display_name = Field(alias='displayName')

short_display_name class-attribute instance-attribute

short_display_name = Field(alias='shortDisplayName')

description class-attribute instance-attribute

description = Field(alias='description')

scope class-attribute instance-attribute

scope = Field(alias='scope')

internal_note class-attribute instance-attribute

internal_note = Field(alias='internalNote')

custom_attributes class-attribute instance-attribute

custom_attributes = Field(alias='customAttributes')

auto_generated class-attribute instance-attribute

auto_generated = Field(alias='autoGenerated')

pql class-attribute instance-attribute

pql = Field(alias='pql')

filter_ids class-attribute instance-attribute

filter_ids = Field(alias='filterIds')

column_type class-attribute instance-attribute

column_type = Field(alias='columnType')

unit class-attribute instance-attribute

unit = Field(alias='unit')

format class-attribute instance-attribute

format = Field(alias='format')

type_ class-attribute instance-attribute

type_ = Field(alias='type')

get_column

get_column()

Returns query of attribute.

Returns:

  • PQLColumn

    PQLColumn with attribute query.

Examples:

Extract data based on PQLs from knowledge model:

from pycelonis.pql import PQL, PQLColumn

record = knowledge_model.get_content().records.find_by_id('ACTIVITIES')
attribute = record.attributes.find_by_id('ACTIVITY_EN')

query = PQL() + attribute.get_column()

data_query, query_environment = knowledge_model.resolve_query(query)
df = data_model.export_data_frame(data_query, query_environment)

Identifier

Bases: PqlBaseMetadata

Class for knowledge model record identifiers.

id class-attribute instance-attribute

id = Field(alias='id')

display_name class-attribute instance-attribute

display_name = Field(alias='displayName')

short_display_name class-attribute instance-attribute

short_display_name = Field(alias='shortDisplayName')

description class-attribute instance-attribute

description = Field(alias='description')

scope class-attribute instance-attribute

scope = Field(alias='scope')

internal_note class-attribute instance-attribute

internal_note = Field(alias='internalNote')

custom_attributes class-attribute instance-attribute

custom_attributes = Field(alias='customAttributes')

auto_generated class-attribute instance-attribute

auto_generated = Field(alias='autoGenerated')

pql class-attribute instance-attribute

pql = Field(alias='pql')

filter_ids class-attribute instance-attribute

filter_ids = Field(alias='filterIds')

get_column

get_column()

Returns query of identifier.

Returns:

  • PQLColumn

    PQLColumn with identifier query.

Examples:

Extract data based on PQLs from knowledge model:

from pycelonis.pql import PQL, PQLColumn

record = knowledge_model.get_content().records.find_by_id('ACTIVITIES')
identifier = record.identifier

query = PQL() + identifier.get_column()

data_query, query_environment = knowledge_model.resolve_query(query)
df = data_model.export_data_frame(data_query, query_environment)

Record

Bases: BusinessRecordMetadata

Class for knowledge model records.

attributes instance-attribute

attributes

identifier instance-attribute

identifier

id class-attribute instance-attribute

id = Field(alias='id')

display_name class-attribute instance-attribute

display_name = Field(alias='displayName')

short_display_name class-attribute instance-attribute

short_display_name = Field(alias='shortDisplayName')

description class-attribute instance-attribute

description = Field(alias='description')

scope class-attribute instance-attribute

scope = Field(alias='scope')

internal_note class-attribute instance-attribute

internal_note = Field(alias='internalNote')

custom_attributes class-attribute instance-attribute

custom_attributes = Field(alias='customAttributes')

auto_generated class-attribute instance-attribute

auto_generated = Field(alias='autoGenerated')

augmented class-attribute instance-attribute

augmented = Field(alias='augmented')

pql class-attribute instance-attribute

pql = Field(alias='pql')

filter_ids class-attribute instance-attribute

filter_ids = Field(alias='filterIds')

new_attributes class-attribute instance-attribute

new_attributes = Field(alias='newAttributes')

augmented_attributes class-attribute instance-attribute

augmented_attributes = Field(alias='augmentedAttributes')

flags class-attribute instance-attribute

flags = Field(alias='flags')

priorities class-attribute instance-attribute

priorities = Field(alias='priorities')

data_triggers class-attribute instance-attribute

data_triggers = Field(alias='dataTriggers')

type_ class-attribute instance-attribute

type_ = Field(alias='type')

Filter

Bases: FilterMetadata

Class for knowledge model filters.

id class-attribute instance-attribute

id = Field(alias='id')

display_name class-attribute instance-attribute

display_name = Field(alias='displayName')

short_display_name class-attribute instance-attribute

short_display_name = Field(alias='shortDisplayName')

description class-attribute instance-attribute

description = Field(alias='description')

scope class-attribute instance-attribute

scope = Field(alias='scope')

internal_note class-attribute instance-attribute

internal_note = Field(alias='internalNote')

custom_attributes class-attribute instance-attribute

custom_attributes = Field(alias='customAttributes')

auto_generated class-attribute instance-attribute

auto_generated = Field(alias='autoGenerated')

pql class-attribute instance-attribute

pql = Field(alias='pql')

filter_ids class-attribute instance-attribute

filter_ids = Field(alias='filterIds')

global_ class-attribute instance-attribute

global_ = Field(alias='global')

type_ class-attribute instance-attribute

type_ = Field(alias='type')

get_filter

get_filter()

Returns query of filter.

Returns:

Examples:

Extract data based on PQLs from knowledge model:

from pycelonis.pql import PQL, PQLColumn

km_filter = knowledge_model.get_content().filters.find_by_id('FILTER')

query = PQL() + PQLColumn(name="<name>", query="<query>") + km_filter.get_filter()

data_query, query_environment = knowledge_model.resolve_query(query)
df = data_model.export_data_frame(data_query, query_environment)