mstrio.project_objects.incremental_refresh_report package

Submodules

mstrio.project_objects.incremental_refresh_report.incremental_refresh_report module

class mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport(connection: Connection, id: str | None = None, name: str | None = None, show_expression_as: mstrio.modeling.expression.enums.ExpressionFormat | str = ExpressionFormat.TREE, show_filter_tokens: bool = False, show_advanced_properties: bool = False)

Bases: Entity, CopyMixin, MoveMixin, DeleteMixin, TranslationMixin, ModelVldbMixin

Python representation of MicroStrategy Incremental Refresh Report object.

name

(str) Name of the Incremental Refresh Report

id

(str) ID of the Incremental Refresh Report

description

(str) Description of the Incremental Refresh Report

destination_folder_id

(str) ID of the folder

target_cube

(SchemaObjectReference) Reference to an Intelligent Cube

refresh_type

(str) Mode the report will be refreshed in

increment_type

(str) Mode the report will be executed in

template

(Template) Template of information layout across dimensions

filter

(Expression) Filtering expression for the report

class IncrementType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

FILTER = 'filter'
REPORT = 'report'
class RefreshType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

DELETE = 'delete'
INSERT = 'insert'
REPLACE = 'replace'
UPDATE = 'update'
UPDATE_ONLY = 'update_only'
alter(name: str | None = None, target_cube: mstrio.project_objects.datasets.olap_cube.OlapCube | mstrio.modeling.schema.helpers.SchemaObjectReference | dict | None = None, increment_type: mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport.IncrementType | str | None = None, refresh_type: mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport.RefreshType | str | None = None, template: mstrio.project_objects.datasets.helpers.Template | dict | None = None, filter: mstrio.modeling.expression.expression.Expression | dict | None = None, advanced_properties: dict | None = None, description: str | None = None, primary_locale: str | None = None)

Alter the Incremental Refresh Report object’s properties.

Parameters:
  • name (str, optional) – Name of the Incremental Refresh Report.

  • target_cube (OlapCube, SchemaObjectReference, dict, optional) – Reference to an Intelligent Cube

  • increment_type (IncrementType, str, optional) – Mode the report will be executed in. Accepted values: ‘report’, ‘filter’

  • refresh_type (RefreshType, str, optional) – Mode the report will be refreshed in. Accepted values: ‘update’, ‘insert’, ‘delete’, ‘update_only’, ‘replace’

  • template (Template, dict, optional) – Template of information layout across dimensions

  • filter (Expression, dict, optional) – Filtering expression for the report. Accepted values: ‘tree’, ‘tokens’

  • advanced_properties (dict, optional) – Advanced properties of the report

  • description (str, optional) – Description of the MSTR object

  • primary_locale (str, optional) – The primary locale of the object, in the IETF BCP 47 language tag format, such as “en-US”

change_increment_type_to_filter() None

Change the Incremental Refresh Report’s type to ‘Filter’. This will reset the template to default.

classmethod create(connection: Connection, name: str, destination_folder: mstrio.object_management.folder.Folder | str | None = None, destination_folder_path: str | None = None, target_cube: mstrio.project_objects.datasets.olap_cube.OlapCube | mstrio.modeling.schema.helpers.SchemaObjectReference | dict | None = None, increment_type: mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport.IncrementType | str | None = None, refresh_type: mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport.RefreshType | str | None = None, template: mstrio.project_objects.datasets.helpers.Template | dict | None = None, filter: mstrio.modeling.expression.expression.Expression | dict | None = None, advanced_properties: dict | None = None, description: str | None = None, primary_locale: str | None = None, show_expression_as: mstrio.modeling.expression.enums.ExpressionFormat | str = ExpressionFormat.TREE, show_filter_tokens: bool = False, show_advanced_properties: bool = False) IncrementalRefreshReport

Create a new Incremental Refresh Report.

Parameters:
  • connection – MicroStrategy connection object returned by connection.Connection()

  • name (str, optional) – Name of the Incremental Refresh Report

  • destination_folder (Folder, str) – Folder object or folder ID where the new object will be saved

  • destination_folder_path (str, optional) –

    Path of the folder in which to create the report. If both folder and path parameters are provided, destination_folder is used. The path has to be provided in the following format:

    if it’s inside of a project, example:

    /MicroStrategy Tutorial/Public Objects

    if it’s a root folder, example:

    /CASTOR_SERVER_CONFIGURATION/Users

  • target_cube (OlapCube, SchemaObjectReference, dict, optional) – Reference to an Intelligent Cube

  • increment_type (IncrementType, str, optional) – Mode the report will be executed in. Accepted values: ‘report’, ‘filter’

  • refresh_type (RefreshType, str, optional) – Mode the report will be refreshed in. Accepted values: ‘update’, ‘insert’, ‘delete’, ‘update_only’, ‘replace’

  • template (Template, dict, optional) – Template of information layout across dimensions

  • filter (Expression, dict, optional) – Filtering expression for the report. Accepted values: ‘tree’, ‘tokens’

  • advanced_properties (dict, optional) – Advanced properties of the report

  • description (str, optional) – Description of the MSTR object

  • primary_locale (str, optional) – The primary locale of the object, in the IETF BCP 47 language tag format, such as “en-US”

  • show_expression_as (ExpressionFormat or str, optional) – specify how expressions should be presented Available values: - None (expression is returned in “text” format) - ExpressionFormat.TREE or tree (expression is returned in text and tree formats) - ExpressionFormat.TOKENS or tokens (expression is returned in text and tokens formats)

  • show_filter_tokens (bool, optional) – Specify whether “qualification” is returned in “tokens” format, along with text and tree formats. - If omitted or false, only text and tree formats are returned. - If true, all text, “tree” and tokens formats are returned.

classmethod create_from_cube(connection: Connection, name: str, destination_folder: mstrio.object_management.folder.Folder | str | None = None, destination_folder_path: str | None = None, target_cube: mstrio.project_objects.datasets.olap_cube.OlapCube | mstrio.modeling.schema.helpers.SchemaObjectReference | dict | None = None, refresh_type: mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport.RefreshType | str | None = None, filter: mstrio.modeling.expression.expression.Expression | dict | None = None, advanced_properties: dict | None = None, description: str | None = None, primary_locale: str | None = None, show_expression_as: mstrio.modeling.expression.enums.ExpressionFormat | str = ExpressionFormat.TREE, show_filter_tokens: bool = False, show_advanced_properties: bool = False) IncrementalRefreshReport

Create a new Incremental Refresh Report, using a data layout template from an existing Intelligent Cube.

Parameters:
  • connection – MicroStrategy connection object returned by connection.Connection()

  • name (str, optional) – Name of the Incremental Refresh Report

  • destination_folder (Folder, str) – Folder object or folder ID where the new object will be saved

  • destination_folder_path (str, optional) –

    Path of the folder in which to create the report. If both folder and path parameters are provided, destination_folder is used. The path has to be provided in the following format:

    if it’s inside of a project, example:

    /MicroStrategy Tutorial/Public Objects

    if it’s a root folder, example:

    /CASTOR_SERVER_CONFIGURATION/Users

  • target_cube (OlapCube, SchemaObjectReference, dict, optional) – Reference to an Intelligent Cube

  • refresh_type (RefreshType, str, optional) – Mode the report will be refreshed in. Accepted values: ‘update’, ‘insert’, ‘delete’, ‘update_only’, ‘replace’

  • filter (Expression, dict, optional) – Filtering expression for the report. Accepted values: ‘tree’, ‘tokens’

  • advanced_properties (dict, optional) – Advanced properties of the report

  • description (str, optional) – Description of the MSTR object

  • primary_locale (str, optional) – The primary locale of the object, in the IETF BCP 47 language tag format, such as “en-US”

  • show_expression_as (ExpressionFormat or str, optional) – specify how expressions should be presented Available values: - None (expression is returned in “text” format) - ExpressionFormat.TREE or tree (expression is returned in text and tree formats) - ExpressionFormat.TOKENS or tokens (expression is returned in text and tokens formats)

  • show_filter_tokens (bool, optional) – Specify whether “qualification” is returned in “tokens” format, along with text and tree formats. - If omitted or false, only text and tree formats are returned. - If true, all text, “tree” and tokens formats are returned.

execute(fields: str | None = None, project_id: str | None = None, project_name: str | None = None) None

Execute (run) the report.

Parameters:
  • fields (str, optional) – A comma-separated list of fields to include in the response. By default, all fields are returned.

  • project_id (str, optional) – Project ID

  • project_name (str, optional) – Project name

get_preview_data(offset: int | None = None, limit: int | None = None, fields: str | None = None) DataFrame

Get preview data for the Incremental Refresh Report.

Parameters:
  • offset (int) – Starting point within the collection of returned results. Used to control paging behavior. Default is 0.

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • fields (str, optional) – A whitelist of top-level fields separated by commas.

reset_template_to_default() None

Reset the Incremental Refresh Report’s template to default.

mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.list_incremental_refresh_reports(connection: Connection, name: str | None = None, pattern: mstrio.object_management.search_enums.SearchPattern | int = SearchPattern.CONTAINS, project_id: str | None = None, project_name: str | None = None, to_dictionary: bool = False, limit: int | None = None, folder_id: str | None = None, folder_path: str | None = None, show_expression_as: mstrio.modeling.expression.enums.ExpressionFormat | str = ExpressionFormat.TREE, show_filter_tokens: bool = False, show_advanced_properties: bool = True, **filters) list[mstrio.project_objects.incremental_refresh_report.incremental_refresh_report.IncrementalRefreshReport] | list[dict]

Get a list of Incremental Refresh Reports. Optionally filter reports by specifying ‘name’.

Optionally use to_dictionary to choose output format.

Wildcards available for ‘name’:

? - any character * - 0 or more of any characters e.g. name = ?onny will return Sonny and Tonny

Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted.

Note

When project_id is None and project_name is None, then its value is overwritten by project_id from connection object.

Parameters:
  • connection – MicroStrategy connection object returned by connection.Connection()

  • name (string, optional) – value the search pattern is set to, which will be applied to the names of reports being searched

  • pattern (SearchPattern enum or int, optional) – pattern to search for, such as Begin With or Contains. Possible values are available in ENUM mstrio.object_management.SearchPattern. Default value is BEGIN WITH (4).

  • project_id (string, optional) – Project ID

  • project_name (string, optional) – Project name

  • to_dictionary (bool, optional) – If True returns dict, by default (False) returns Report objects

  • limit (integer, optional) – limit the number of elements returned. If None all object are returned.

  • folder_id (string, optional) – ID of a folder where the search will be performed. Defaults to None.

  • folder_path (str, optional) –

    Path of the folder in which to look for reports. Can be provided as an alternative to the folder_id parameter. If both are provided, folder_id is used. The path has to be provided in the following format:

    if it’s inside of a project, example:

    /MicroStrategy Tutorial/Public Objects

    if it’s a root folder, example:

    /CASTOR_SERVER_CONFIGURATION/Users

  • show_expression_as (ExpressionFormat or str, optional) – specify how expressions should be presented Available values: - None (expression is returned in “text” format) - ExpressionFormat.TREE or tree (expression is returned in text and tree formats) - ExpressionFormat.TOKENS or tokens (expression is returned in text and tokens formats)

  • show_filter_tokens (bool, optional) – Specify whether “qualification” is returned in “tokens” format, along with text and tree formats. - If omitted or false, only text and tree formats are returned. - If true, all text, tree and tokens formats are returned.

  • show_advanced_properties (bool, optional) – Specify whether to retrieve the values of the advanced properties. If false, nothing will be returned for the advanced properties, default True.

  • filters – Available filter parameters: [‘id’, ‘name’, ‘type’, ‘subtype’, ‘date_created’, ‘date_modified’, ‘version’, ‘owner’, ‘ext_type’, ‘view_media’, ‘certified_info’]

Module contents