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(alias='id')

last_change_date class-attribute instance-attribute

last_change_date = Field(alias='lastChangeDate')

last_change_user_id class-attribute instance-attribute

last_change_user_id = Field(alias='lastChangeUserId')

last_change_user_name class-attribute instance-attribute

last_change_user_name = Field(alias='lastChangeUserName')

locked_until_date class-attribute instance-attribute

locked_until_date = Field(alias='lockedUntilDate')

source_id class-attribute instance-attribute

source_id = Field(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(alias='permissions')

id class-attribute instance-attribute

id = Field(alias='id')

tenant_id class-attribute instance-attribute

tenant_id = Field(alias='tenantId')

name class-attribute instance-attribute

name = Field(alias='name')

key class-attribute instance-attribute

key = Field(alias='key')

description class-attribute instance-attribute

description = Field(alias='description')

deleted class-attribute instance-attribute

deleted = Field(alias='deleted')

transport_id class-attribute instance-attribute

transport_id = Field(alias='transportId')

last_published_draft_id class-attribute instance-attribute

last_published_draft_id = Field(
    alias="lastPublishedDraftId"
)

auto_save_id class-attribute instance-attribute

auto_save_id = Field(alias='autoSaveId')

process_id class-attribute instance-attribute

process_id = Field(alias='processId')

create_date class-attribute instance-attribute

create_date = Field(alias='createDate')

favourite class-attribute instance-attribute

favourite = Field(alias='favourite')

content_id class-attribute instance-attribute

content_id = Field(alias='contentId')

content_version class-attribute instance-attribute

content_version = Field(alias='contentVersion')

tags class-attribute instance-attribute

tags = Field(alias='tags')

application_id class-attribute instance-attribute

application_id = Field(alias='applicationId')

global_app class-attribute instance-attribute

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

last_published_date class-attribute instance-attribute

last_published_date = Field(alias='lastPublishedDate')

last_published_user class-attribute instance-attribute

last_published_user = Field(alias='lastPublishedUser')

parent_object_id class-attribute instance-attribute

parent_object_id = Field(alias='parentObjectId')

published_draft_id class-attribute instance-attribute

published_draft_id = Field(alias='publishedDraftId')

folder_id class-attribute instance-attribute

folder_id = Field(alias='folderId')

object_id class-attribute instance-attribute

object_id = Field(alias='objectId')

application class-attribute instance-attribute

application = Field(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.