component
Module for knowledge model components.
Attribute ¶
Bases: AttributeMetadata
Class for knowledge model record attributes.
short_display_name
class-attribute
instance-attribute
¶
custom_attributes
class-attribute
instance-attribute
¶
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.
short_display_name
class-attribute
instance-attribute
¶
custom_attributes
class-attribute
instance-attribute
¶
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.
Filter ¶
Bases: FilterMetadata
Class for knowledge model filters.
short_display_name
class-attribute
instance-attribute
¶
custom_attributes
class-attribute
instance-attribute
¶
get_filter ¶
Returns query of filter.
Returns:
-
PQLFilter
–PQLColumn with filter query.
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)