Skip to content

content

Module for analysis content.

AnalysisSheet

Bases: PyCelonisBaseModel

Class for analysis sheet containing components such as tables or kpis.

id instance-attribute

id

Analysis sheet id.

name instance-attribute

name

Name of analysis sheet.

sheet_filter instance-attribute

sheet_filter

Sheet filter, filtering data in sheet.

components instance-attribute

components

Components (tables, kpis, etc.) of sheet.

get_filter

get_filter()

Returns sheet filter.

Returns:

Examples:

Adding sheet filter to custom query and extract data:

sheet = analysis.get_content().draft.document.sheets[0]

query = PQL() + PQLColumn(name="TEST", query="<query")
query += sheet.get_filter()

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

AnalysisDocument

Bases: PyCelonisBaseModel

Class for analysis document containing sheets.

id instance-attribute

id

Id of analysis.

name instance-attribute

name

Name of analysis.

components instance-attribute

components

Sheets of analysis.

stateless_load_script instance-attribute

stateless_load_script

Load script of analysis.

variables instance-attribute

variables

Variables of analysis.

sheets property

sheets

Returns sheets of analysis document.

Returns:

get_filter

get_filter()

Returns load script filter.

Returns:

  • Optional[PQLFilter]

    Load script PQL filter.

Examples:

Adding load script filter to custom query and extract data:

document = analysis.get_content().draft.document

query = PQL() + PQLColumn(name="TEST", query="<query")
query += document.get_filter()

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

AnalysisDraft

Bases: DraftTransport

Class for analysis draft containing document.

id class-attribute instance-attribute

id = Field(None, alias='id')

last_change_date class-attribute instance-attribute

last_change_date = Field(None, alias='lastChangeDate')

last_change_user_id class-attribute instance-attribute

last_change_user_id = Field(None, alias='lastChangeUserId')

last_change_user_name class-attribute instance-attribute

last_change_user_name = Field(
    None, alias="lastChangeUserName"
)

locked_until_date class-attribute instance-attribute

locked_until_date = Field(None, alias='lockedUntilDate')

source_id class-attribute instance-attribute

source_id = Field(None, alias='sourceId')

title instance-attribute

title

Title of analysis draft.

document instance-attribute

document

Contains sheets and components of draft.

AnalysisInfo

Bases: AnalysisTransport

Class for basic analysis metadata.

permissions class-attribute instance-attribute

permissions = Field(None, alias='permissions')

id class-attribute instance-attribute

id = Field(None, alias='id')

tenant_id class-attribute instance-attribute

tenant_id = Field(None, alias='tenantId')

name class-attribute instance-attribute

name = Field(None, alias='name')

key class-attribute instance-attribute

key = Field(None, alias='key')

description class-attribute instance-attribute

description = Field(None, alias='description')

deleted class-attribute instance-attribute

deleted = Field(None, alias='deleted')

transport_id class-attribute instance-attribute

transport_id = Field(None, alias='transportId')

last_published_draft_id class-attribute instance-attribute

last_published_draft_id = Field(
    None, alias="lastPublishedDraftId"
)

auto_save_id class-attribute instance-attribute

auto_save_id = Field(None, alias='autoSaveId')

process_id class-attribute instance-attribute

process_id = Field(None, alias='processId')

create_date class-attribute instance-attribute

create_date = Field(None, alias='createDate')

favourite class-attribute instance-attribute

favourite = Field(None, alias='favourite')

content_id class-attribute instance-attribute

content_id = Field(None, alias='contentId')

content_version class-attribute instance-attribute

content_version = Field(None, alias='contentVersion')

tags class-attribute instance-attribute

tags = Field(None, alias='tags')

application_id class-attribute instance-attribute

application_id = Field(None, alias='applicationId')

global_app class-attribute instance-attribute

global_app = Field(None, alias='globalApp')
public_link = Field(None, alias='publicLink')

last_published_date class-attribute instance-attribute

last_published_date = Field(None, alias="lastPublishedDate")

last_published_user class-attribute instance-attribute

last_published_user = Field(None, alias="lastPublishedUser")

parent_object_id class-attribute instance-attribute

parent_object_id = Field(None, alias='parentObjectId')

published_draft_id class-attribute instance-attribute

published_draft_id = Field(None, alias='publishedDraftId')

folder_id class-attribute instance-attribute

folder_id = Field(None, alias='folderId')

object_id class-attribute instance-attribute

object_id = Field(None, alias='objectId')

application class-attribute instance-attribute

application = Field(None, alias='application')

AnalysisContent

Bases: PyCelonisBaseModel

Class for analysis content to read properties from analysis.

analysis instance-attribute

analysis

Metadata of analysis.

kpis instance-attribute

kpis

KPIs defined in analysis.

draft instance-attribute

draft

Draft of analysis containing sheets and components.

data_model_id instance-attribute

data_model_id

Id of data model used for analysis.