mstrio.server package¶
Submodules¶
mstrio.server.cluster module¶
- class mstrio.server.cluster.Cluster(connection: Connection)¶
Bases:
object
Manage, list nodes (servers) on a cluster.
Manage Services on nodes. Manage node settings. Load and Unload projects. A “service” is a product developed by MicroStrategy or a third-party product distributed by MicroStrategy i.e. “MicroStrategy Intelligence Server” or “Apache ZooKeeper”.
- add_node(node: str | mstrio.server.node.Node) None ¶
Add server (node) to the cluster.
- Parameters:
node – name or object of node to be added
- check_dependency(service: str) list[str] ¶
Check all dependencies for the given service.
- Raises:
ValueError – If incorrect service name is provided.
- list_node_settings(node: str | mstrio.server.node.Node) dict ¶
List server (nodes) settings.
- Parameters:
node – name or object of node which settings will be listed
- Returns:
dictionary with the settings of node returned from I-Server.
- list_nodes(project: Optional[str | Project] = None, node: str | mstrio.server.node.Node | None = None, to_dictionary: bool = False) list[mstrio.server.node.Node | dict] ¶
Return a list of nodes and their properties within the cluster.
Optionally filter by project_id or node_name.
- Parameters:
project – Project ID or object
node – Node name or object
- list_projects(to_dictionary: bool = False, limit: int | None = None, **filters) list['Project'] ¶
Return list of project objects or if to_dictionary=True project dicts. Optionally filter the Projects by specifying the filters keyword arguments.
- Parameters:
to_dictionary – If True returns list of project dicts
limit – limit the number of elements returned. If None, all objects are returned.
**filters – Available filter parameters: [‘name’, ‘id’, ‘description’, ‘date_created’, ‘date_modified’, ‘owner’]
- list_services(group_by: mstrio.server.cluster.GroupBy | str = GroupBy.NODES) list ¶
List services in the cluster grouped by nodes or services.
When group_by is set to nodes then in the list for each node there is given a list of services which are available within. When group_by is set to services then in the list for each services there is given a list of nodes on which current service is available.
- Parameters:
group_by – determine by what the list will be grouped. Either nodes or services.
- Returns:
list of nodes with services in case of group_by set to nodes or list of services with nodes in case of group_by set to services.
- Raises:
ValueError if group_by is neither equal to nodes nor services. –
- load_project(project: str | Project, on_nodes: str | list[str] | None = None) None ¶
Request to load the project onto the chosen cluster nodes. If nodes are not specified, the project will be loaded on all nodes.
- Parameters:
project – name or object of project which will be loaded
on_nodes – name of node or nodes, if not passed, project will be loaded on all of the nodes
- nodes_topology(styled=False) pd.DataFrame | Styler ¶
Return cluster node topology as Pandas DataFrame or Styler object.
- DataFrame columns:
- displayName -> it shows the name with which service is displayed
in Workstation
id -> name of the service within nodes
- for each node in the cluster there is given a column which name is
name of a node and its content is information with the status of the given service in this node. Available values of status are: ‘Running’ (green color), ‘Stopped’ (red color), ‘Not Available (service unavailable on the node)
- Returns:
Pandas DataFrame or Styler object if styled is True.
- remove_node(node: str | mstrio.server.node.Node) None ¶
Remove server (node) from the cluster.
- Parameters:
node – name or object of node to be removed
- reset_node_settings(node: str | mstrio.server.node.Node) None ¶
Remove I-Server configuration settings for given node within a cluster. Default values will be applied after execution of this method.
- Parameters:
node – name of the node for which default settings will be applied.
- services_topology(styled=False) pd.DataFrame | Styler ¶
Return cluster service topology as Pandas DataFrame or Styler object.
- DataFrame columns:
service -> name of the service
- node -> name on which service appears (each service can appear in
more than one service and then name of the service is provided only once for the group of nodes in which it appears)
- status -> status which a given service has on a given node.
Available values of statuses are: ‘Running’ (green color), ‘Stopped’ (red color), ‘Not Available (service unavailable on the node)
- Returns:
Pandas DataFrame or Styler object if styled is True.
- set_primary_node(node: str | mstrio.server.node.Node) None ¶
Set default/primary server (node) for the cluster.
- Parameters:
name – name or object of the node which will be set as default for this cluster
- start(service: str, nodes: list[str], login: str | None = None, passwd: str | None = None)¶
Start up a service on selected nodes.
- Parameters:
service – name of the service which will be started
nodes – list of names of nodes on which service will be started
login – login for SSH operation. If not provided, the user will be prompted.
passwd – password for SSH operation. If not provided, the user will be prompted.
- Raises:
ValueError – If incorrect node/service name is provided
- stop(service: str, nodes: list[str], login: str | None = None, passwd: str | None = None, force: bool = False)¶
Stop a service on selected nodes. Provided service and node names are checked for correctness.
- Parameters:
service – name of the service which will be started
nodes – list of names of nodes on which service will be started
login – login for SSH operation. If not provided, the user will be prompted.
passwd – password for SSH operation. If not provided, the user will be prompted.
force – if True, no additional prompt will be shown before
- Raises:
ValueError – If incorrect node/service name is provided
- unload_project(project: str | Project, on_nodes: str | list[str] | None = None) None ¶
Request to unload the project from the chosen cluster nodes. If nodes are not specified, the project will be unloaded on all nodes. The unload action cannot be performed until all jobs and connections for project are completed. Once these processes have finished, pending project will be automatically unloaded.
- Parameters:
project – name or object of project which will be unloaded
on_nodes – name of node or nodes, if not passed, project will be unloaded on all of the nodes
- update_node_settings(node: str | mstrio.server.node.Node, load_balance_factor: int, initial_pool_size: int, max_pool_size: int) None ¶
Update I-Server configuration settings for a given server node within a cluster.
- Parameters:
load_balance_factor – This setting becomes relevant in an environment that has a MicroStrategy Intelligence Server cluster. By default, the load balance factor is 1. The value can be increased on more powerful servers in a cluster to provide an appropriate balance. A larger load balance factor means the current server consumes a greater load in the server cluster in which it resides.
initial_pool_size – Initial number of connections available.
max_pool_size – Maximum number of connections available.
mstrio.server.environment module¶
- class mstrio.server.environment.Environment(connection)¶
Bases:
object
Browse and manage Projects on the environment. List loaded projects, nodes (servers) and compare project settings on the environment. Browse and modify I-Server settings.
- connection¶
A MicroStrategy connection object.
- server_settings¶
Intelligence Server settings object.
- nodes¶
List of I-Server nodes and their properties.
- node_names¶
List of I-Server node names.
- compare_settings(projects: list[str] | list[mstrio.server.project.Project] = None, show_diff_only: bool = False) DataFrame ¶
Compare project’ settings to the first project in the provided list.
- Parameters:
projects (list of names or project objects, optional) – List of project objects or names to be compared. First element of list is the one to which the rest is compared. If None, all projects on the environment will be compared.
show_diff_only (bool, optional) – Whether to display all settings or only different from first project in list.
- Returns:
Dataframe with values of selected project’ settings.
- create_project(name: str, description: str | None = None, force: bool = False) mstrio.server.project.Project | None ¶
Create a new project on the environment.
- Parameters:
name – Name of Project.
description – Description of Application.
force – If True, overrides the prompt.
- delete_server_element_cache() None ¶
Delete element cache for all projects on the environment.
- delete_server_object_cache() None ¶
Delete object cache for all projects on the environment.
- fetch_settings() None ¶
Fetch the current server settings from the environment.
- fetch_storage_service() None ¶
Fetch the current configuration for Storage Service from the environment.
- is_cluster()¶
- is_loaded(project_id: str | None = None, project_name: str | None = None) bool ¶
Check if project is loaded, by passing project ID or name, returns True or False.
- Parameters:
project_id – Project ID
project_name – Project name
- list_loaded_projects(to_dictionary: bool = False, **filters) list[mstrio.server.project.Project] | list[dict] ¶
Return list of all loaded project objects or project dicts if to_dictionary=True that the user has access to. Optionally filter the Projects by specifying the filters keyword arguments.
- Parameters:
to_dictionary – If True, returns list of project dicts
**filters – Available filter parameters: [‘acg’, ‘id’, ‘name’, ‘status’, ‘alias’, ‘description’, ‘date_created’, ‘date_modified’, ‘owner’]
- list_nodes(project: mstrio.server.project.Project | str | None = None, node_name: str | None = None) list[dict] ¶
Return a list of I-Server nodes and their properties. Optionally filter by project or node_name.
- Parameters:
project – ID of project or Project object
node_name – Name of node
- list_projects(to_dictionary: bool = False, limit: int | None = None, **filters) list[mstrio.server.project.Project] | list[dict] ¶
Return list of project objects or project dicts if to_dictionary=True. Optionally filter the Projects by specifying the filters keyword arguments.
- Parameters:
to_dictionary – If True returns list of project dicts.
limit – limit the number of elements returned. If None, all objects are returned.
**filters – Available filter parameters: [‘name’, ‘id’, ‘description’, ‘date_created’, ‘date_modified’, ‘owner’].
- update_settings()¶
Update the current server settings saved in the ServerSettings object.
- update_storage_service(storage_type: mstrio.server.storage.StorageType | None = None, alias: str | None = None, location: str | None = None, s3_region: str | None = None, aws_access_id: str | None = None, aws_secret_key: str | None = None, azure_storage_account_name: str | None = None, azure_secret_key: str | None = None, gcs_service_account_key: str | None = None, skip_validation: bool = False, validate_only: bool = False) None ¶
Update the storage service configuration on the environment. If new values aren’t provided for any parameter, the config stored in the object will be used.
- Parameters:
storage_type (StorageType, optional) – Type of storage service.
alias (str, optional) – Alias of the storage configuration,
location (str, optional) – Storage location, e.g. bucket name for S3, absolute path of folder for File System
s3_region (str, optional) – S3 bucket region
aws_access_id (str, optional) – Access ID for AWS S3
aws_secret_key (str, optional) – Access key for AWS S3
azure_storage_account_name (str, optional) – Account name for Azure
azure_secret_key (str, optional) – Access key for Azure
skip_validation – Whether to skip validation of the storage service configuration prior to updating.
validate_only – If True, validate the configuration without updating.
mstrio.server.job_monitor module¶
- class mstrio.server.job_monitor.DeliveryType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
- ALL_INCLUDING_SNAPSHOT = 'all_including_snapshot'¶
- ANDROID = 'android'¶
- BLACKBERRY = 'blackberry'¶
- CACHE = 'cache'¶
- CAMPAIGN = 'campaign'¶
- CLIENT = 'client'¶
- COUNT = 'count'¶
- CUSTOM = 'custom'¶
- EMAIL = 'email'¶
- FILE = 'file'¶
- FTP = 'ftp'¶
- INBOX = 'inbox'¶
- IPAD = 'ipad'¶
- IPHONE = 'iphone'¶
- LAST_ONE = 'last_one'¶
- MOBILE = 'mobile'¶
- PRINTER = 'printer'¶
- RESERVED = 'reserved'¶
- SNAPSHOT = 'snapshot'¶
- class mstrio.server.job_monitor.Job(connection: Connection, id: str)¶
Bases:
EntityBase
Python representation of a Job object. Note: Some functionality is missing when working with 11.3.2 I-Server
versions. To use all functionality 11.3.3 and up will be required. There are also some differences between 11.3.2 and 11.3.3+ Job attributes values.
- connection¶
A MicroStrategy connection object
- id¶
Job information id
- description¶
Description of the job
- status¶
Status of the job
- type¶
Type of the job
- object_id¶
Id of object
- object_type¶
Type of object
- parent_id¶
Parent ID
- childs_ids¶
Array of children IDs
- subscription_recipient¶
Subscription recipient of the job
- subscription_type¶
Subscription delivery type of the job
- processing_unit_priority¶
Job Processing Unit Priority
- step_id¶
Step ID of the job
- user¶
Full name of the job initiator
- project_name¶
Name of the project in which the job is active
- project_id¶
Id of the project in which the job is active
- pu_name¶
Processing Unit name
- creation_time¶
Creation time of the job
- elapsed_time¶
Time elapsed since the creation of the job in milliseconds (11.3.3+) or seconds (11.3.2)
- step_elapsed_time¶
Time elapsed since the creation of the step in milliseconds
- memory_usage¶
Memory usage of the job in bytes
- client_machine¶
Client machine running the job
- total_tasks¶
Total tasks of the job
- completed_tasks¶
Completed tasks of the job
- error_message¶
Error message for the job
- error_time¶
Error time of the job
- filter_name¶
Name of the filter for the job
- sql¶
SQL of the job
- subscription_owner¶
Subscription owner
- template_name¶
Name of the template for the job
- step_statistics¶
Step statistics for the job
- kill() bool ¶
Kill the job.
- Returns:
True if successfully killed job, False otherwise.
- list_properties() dict ¶
List Job object properties.
- class mstrio.server.job_monitor.JobStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
- CACHE_READY = 'cache_ready'¶
- CANCELING = 'canceling'¶
- COMPLETED = 'completed'¶
- DELIVERING = 'delivering'¶
- ERROR = 'error'¶
- EXECUTING = 'executing'¶
- EXPORTING = 'exporting'¶
- LOADING_PROMPT = 'loading_prompt'¶
- READY = 'ready'¶
- RESOLVING_DESTINATION = 'resolving_destination'¶
- STEP_PAUSING = 'step_pausing'¶
- STOPPED = 'stopped'¶
- WAITING = 'waiting'¶
- WAITING_FOR_AUTOPROMPT = 'waiting_for_autoprompt'¶
- WAITING_FOR_CACHE = 'waiting_for_cache'¶
- WAITING_FOR_CHILDREN = 'waiting_for_children'¶
- WAITING_FOR_CONFLICT_RESOLVE = 'waiting_for_conflict_resolve'¶
- WAITING_FOR_DI_FILE = 'waiting_for_di_file'¶
- WAITING_FOR_PROJECT = 'waiting_for_project'¶
- WAITING_FOR_RESULTS = 'waiting_for_results'¶
- WAITING_ON_GOVERNOR = 'waiting_on_governor'¶
- class mstrio.server.job_monitor.JobType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
- INTERACTIVE = 'interactive'¶
- PREDICTIVE_CACHE = 'predictive_cache'¶
- SUBSCRIPTION = 'subscription'¶
- class mstrio.server.job_monitor.ObjectType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
- CUBE = 'cube'¶
- DASHBOARD = 'dossier'¶
- DOCUMENT = 'document'¶
- DOSSIER = 'dossier'¶
- OTHERS = 'others'¶
- REPORT = 'report'¶
- class mstrio.server.job_monitor.PUName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
- ANALYTICAL = 'analytical'¶
- BROWSING = 'browsing'¶
- DATA_FORMATTING = 'data_formatting'¶
- NCS = 'ncs'¶
- QUERY_EXECUTIONS = 'query_execution'¶
- RESOLUTION = 'resolution'¶
- REST_ASYNCHRONOUS = 'rest_asynchronous'¶
- SQL_ENGINE = 'sql_engine'¶
- class mstrio.server.job_monitor.SortBy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- COMPLETED_TASKS_ASC = '+completedTasks'¶
- COMPLETED_TASKS_DESC = '-completedTasks'¶
- CREATION_TIME_ASC = '+creationTime'¶
- CREATION_TIME_DESC = '-creationTime'¶
- DESCRIPTION_ASC = '+description'¶
- DESCRIPTION_DESC = '-description'¶
- ELAPSED_TIME_ASC = '+elapsedTime'¶
- ELAPSED_TIME_DESC = '-elapsedTime'¶
- ID_ASC = '+id'¶
- ID_DESC = '-id'¶
- MEMORY_USAGE_ASC = '+memoryUsage'¶
- MEMORY_USAGE_DESC = '-memoryUsage'¶
- OBJECT_ID_ASC = '+objectId'¶
- OBJECT_ID_DESC = '-objectId'¶
- OBJECT_TYPE_ASC = '+objectType'¶
- OBJECT_TYPE_DESC = '-objectType'¶
- PROCESSING_UNIT_PRIORITY_ASC = '+processingUnitPriority'¶
- PROCESSING_UNIT_PRIORITY_DESC = '-processingUnitPriority'¶
- PROJECT_ID_ASC = '+projectId'¶
- PROJECT_ID_DESC = '-projectId'¶
- PROJECT_NAME_ASC = '+projectName'¶
- PROJECT_NAME_DESC = '-projectName'¶
- STATUS_ASC = '+status'¶
- STATUS_DESC = '-status'¶
- SUBSCRIPTION_RECIPIENT_ASC = '+subscriptionRecipient'¶
- SUBSCRIPTION_RECIPIENT_DESC = '-subscriptionRecipient'¶
- SUBSCRIPTION_TYPE_ASC = '+subscriptionType'¶
- SUBSCRIPTION_TYPE_DESC = '-subscriptionType'¶
- TYPE_ASC = '+type'¶
- TYPE_DESC = '-type'¶
- USER_ASC = '+user'¶
- USER_DESC = '-user'¶
- class mstrio.server.job_monitor.SortByV1(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- CREATION_TIME = 'creationTime'¶
- DESCRIPTION = 'description'¶
- JOB_ID = 'jobId'¶
- JOB_TYPE = 'jobType'¶
- OBJECT_ID = 'objectId'¶
- PROJECT_ID = 'projectId'¶
- PROJECT_NAME = 'projectName'¶
- STATUS = 'status'¶
- USER_FULL_NAME = 'userFullName'¶
- class mstrio.server.job_monitor.SubscriptionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
- ALL = 'all'¶
- ALL_INCLUDING_SNAPSHOT = 'all_including_snapshot'¶
- CACHE = 'cache'¶
- CAMPAIGN = 'campaign'¶
- CLIENT = 'client'¶
- COUNT = 'count'¶
- CUSTOM = 'custom'¶
- EMAIL = 'email'¶
- FTP = 'ftp'¶
- INBOX = 'inbox'¶
- LAST_ONE = 'last_one'¶
- MOBILE = 'mobile'¶
- MOBILE_ANDROID = 'mobile_android'¶
- MOBILE_BLACKBERRY = 'mobile_blackberry'¶
- MOBILE_IPAD = 'mobile_ipad'¶
- MOBILE_IPHONE = 'mobile_iphone'¶
- PRINTER = 'printer'¶
- RESERVED = 'reserved'¶
- SNAPSHOT = 'snapshot'¶
- mstrio.server.job_monitor.kill_all_jobs(connection: Connection, user: Optional[Union[User, str]] = None, description: str | None = None, type: mstrio.server.job_monitor.JobType | str | None = None, status: mstrio.server.job_monitor.JobStatus | str | None = None, object_id: str | None = None, object_type: mstrio.server.job_monitor.ObjectType | str | None = None, project: mstrio.server.project.Project | str | None = None, pu_name: mstrio.server.job_monitor.PUName | str | None = None, subscription_type: mstrio.server.job_monitor.SubscriptionType | str | None = None, subscription_recipient: Optional[Union[User, str]] = None, memory_usage: str | None = None, elapsed_time: str | None = None, force: bool = False, **filters) mstrio.helpers.Success | mstrio.helpers.PartialSuccess | mstrio.helpers.MstrException ¶
Kill jobs filtered by passed fields
- Parameters:
connection (object) –
- MicroStrategy connection object returned by
connection.Connection()
- node(Node, str, optional): Node object or name, if not passed kill jobs
on all nodes
user (User, str, optional) – Field to filter on job owner’s full name
match) ((exact) –
description (str, optional) – Field to filter on job description (partial match)
type (subscription) – Field to filter on job type (exact match),
status (JobStatus, optional) – Field to filter on job status (exact match)
object_id (str, optional) – Field to filter on object id (exact match)
object_type (ObjectType, optional) – Field to filter on object type (exact match)
project (Project, str, optional) – Field to filter on project name (exact match)
pu_name (PUName, optional) – Field to filter on processing unit name (exact match)
subscription_type (SubscriptionType, optional) – Field to filter on
type –
subscription_recipient (User, str, optional) – Field to filter on subscription recipient’s full name (exact match)
memory_usage (str, optional) – Field to filter on the job elapsed time, for example ‘gt:100’ means filtering jobs with memory usage greater than to 100 MB. Valid operators are: gt - greater than lt - less than
elapsed_time (str, optional) – Field to filter on the job elapsed time, for example ‘gt:100’ means filtering jobs with elapsed time greater than 100 milliseconds(11.3.3+) or seconds(11.3.2). Valid operators: gt - greater than lt - less than
force (bool, optional) – Force flag
- Returns:
object if all jobs were killed PartialSuccess: if not all jobs were killed MstrException: otherwise
- Return type:
- mstrio.server.job_monitor.kill_jobs(connection: Connection, jobs: list[Union[mstrio.server.job_monitor.Job, str]]) mstrio.helpers.Success | mstrio.helpers.PartialSuccess | mstrio.helpers.MstrException ¶
Kill existing jobs by Job objects or job ids.
- Parameters:
connection (object) – MicroStrategy connection object returned by ‘connection.Connection()’
jobs – List of Job objects or job ids to kill
- Returns:
object if all jobs were killed PartialSuccess: if not all jobs were killed MstrException: otherwise
- Return type:
- mstrio.server.job_monitor.list_jobs(connection: Connection, node: mstrio.server.node.Node | str | None = None, user: Optional[Union[User, str]] = None, description: str | None = None, type: mstrio.server.job_monitor.JobType | str | None = None, status: mstrio.server.job_monitor.JobStatus | str | None = None, object_id: str | None = None, object_type: mstrio.server.job_monitor.ObjectType | None = None, project: mstrio.server.project.Project | str | None = None, pu_name: mstrio.server.job_monitor.PUName | str | None = None, subscription_type: mstrio.server.job_monitor.SubscriptionType | str | None = None, subscription_recipient: Optional[Union[User, str]] = None, memory_usage: str | None = None, elapsed_time: str | None = None, sort_by: mstrio.server.job_monitor.SortBy | str | None = None, to_dictionary: bool = False, limit: int | None = None, **filters) list['Job'] | list[dict] ¶
List jobs objects or job dictionaires. :param connection: MicroStrategy connection object returned by
connection.Connection()
- Parameters:
node (Node, str, optional) – Node object or name, if not passed list jobs on all nodes
user (User, str, optional) – Field to filter on job owner’s full name
match) ((exact) –
description (str, optional) – Field to filter on job description (partial match)
type (subscription) – Field to filter on job type (exact match),
status (JobStatus, optional) – Field to filter on job status (exact match)
object_id (str, optional) – Field to filter on object type (exact match)
object_type (ObjectType, optional) – Field to filter on object type (exact match)
project (Project, str, optional) – Field to filter on project name (exact match)
pu_name (PUName, optional) – Field to filter on processing unit name (exact match)
subscription_type (SubscriptionType, optional) – Field to filter on
type –
subscription_recipient (User, str, optional) – Field to filter on subscription recipient’s full name (exact match)
memory_usage (str, optional) – Field to filter on the job elapsed time, for example ‘gt:100’ means filtering jobs with memory usage greater than to 100 MB. Valid operators are: gt - greater than lt - less than
elapsed_time (str, optional) – Field to filter on the job elapsed time, for example ‘gt:100’ means filtering jobs with elapsed time greater than 100 milliseconds(11.3.3+) or seconds(11.3.2). Valid operators: gt - greater than lt - less than
sort_by (SortBy, optional) – Specify sorting criteria, for example SortBy.STATUS_ASC means sorting status is ascending order or SortBy.USER_DESC means sorting user in descending order. Currently, the server supports sorting only by single field.
to_dictionary (bool, optional) – if True, return Schedules as list of dicts
limit (int, optional) – maximum number of schedules returned
**filters (optional) – Local filter parameters
Examples
>>> list_jobs_v1(connection, duration='gt:100')
- Returns:
list of Job objects or dictionaries.
- Return type:
List[Job] | List[dict]
- mstrio.server.job_monitor.list_jobs_v1(connection: Connection, node: mstrio.server.node.Node | str | None = None, project: mstrio.server.project.Project | str | None = None, status: mstrio.server.job_monitor.JobStatus | str | None = None, job_type: mstrio.server.job_monitor.JobType | str | None = None, user: Optional[Union[User, str]] = None, object_id: str | None = None, sort_by: mstrio.server.job_monitor.SortBy | str | None = None, to_dictionary: bool = False, limit: int | None = None, **filters) list['Job'] | list[dict] ¶
List job objects or job dictionaries. Optionally filter list. NOTE: list_jobs can return up to 1024 jobs per request.
- Parameters:
connection (object) – MicroStrategy connection object returned by ‘connection.Connection()’
node (Node, str, optional) – Node object or name, if not passed list jobs on all nodes
project (str, Project, optional) – Project id or object to filter by
status (JobStatus, optional) – Job status to filter by
job_type (JobType, optional) – Job type to filter by
user (User, str, optional) – User object or full name to filter by
object_id (str, optional) – Object id to filter by
sort_by (SortBy, optional) – Specifies sorting criteria to sort by
to_dictionary (bool, optional) – if True, return Schedules as list of dicts
limit (int, optional) – maximum number of schedules returned.
**filters –
Available filter parameters:[id, description, status, jobType, duration, jobId, objectd] - duration(str, optional): Field to filter on the job elapsed time,
for example ‘gt:100’ means filtering jobs with elapsed time greater than to 100 seconds. Valid operators: gt - greater than lt - less than
Examples
>>> list_jobs_v1(connection, duration='gt:100')
- Returns:
list of Job objects or dictionaries.
- Return type:
List[Job] | List[dict]
mstrio.server.language module¶
- class mstrio.server.language.Language(connection: Connection, id: str | None = None, name: str | None = None)¶
Bases:
Entity
,DeleteMixin
,TranslationMixin
Python representation of a Microstrategy Language object.
- id¶
language’s ID
- Type:
str
- name¶
language’s name
- Type:
str
- base_language_lcid¶
LC ID of the language serving as a base for the language
- Type:
int
- lcid¶
LC ID of the language
- Type:
int
- last_modified¶
date of when language was last modified
- Type:
datetime
- formatting_settings¶
formatting settings of the language
- Type:
- interface_language¶
details of the language’s interface language
- Type:
whether the language is hidden
- Type:
bool
- is_language_supported¶
whether the language is supported
- Type:
bool
- class InterfaceLanguage(name: str, id: str, sub_type: mstrio.types.ObjectSubTypes | None = None)¶
Bases:
Dictable
Object that stores the interface language of the Language.
- name¶
name of the interface language
- Type:
str
- id¶
id of the interface language
- Type:
str
- sub_type¶
subtype of the interface language, defaults to None
- Type:
- id: str¶
- name: str¶
- sub_type: ObjectSubTypes | None = None¶
- class TimeInterval(minutes15: str, minutes30: str, hour: str, day: str, week: str, hour_of_day: str, month: str, quarter: str, year: str)¶
Bases:
Dictable
Object that stores formatting settings of the Language.
- minutes15¶
formatting settings for 15 minutes
- Type:
str
- minutes30¶
formatting settings for 30 minutes
- Type:
str
- hour¶
formatting settings for an hour
- Type:
str
- day¶
formatting settings for a day
- Type:
str
- week¶
formatting settings for a week
- Type:
str
- hour_of_day¶
formatting settings for the hour of the day
- Type:
str
- month¶
formatting settings for a month
- Type:
str
- quarter¶
formatting settings for a quarter
- Type:
str
- year¶
formatting settings for a year
- Type:
str
- Formatting settings instructions:
- To specify formatting for:
hours: use the letter h minutes: use the letter m days: use the letter d months: use the capital letter M quarters: use the letter q years: use the letter y
To specify 12 hour clock use AM/PM afterwards, example: h:mm AM/PM
- Default formatting settings examples:
minutes15: h:mm AM/PM -> 9:44 AM minutes30: h:mm AM/PM -> 9:44 AM hour: h:mm AM/PM -> 9:44 AM day: M/d -> 7/26 week: M/d -> 7/26 hour_of_day: h:mm AM/PM -> 9:44 AM month: MMM -> Jul quarter: qqq -> Q3 year: yyyy -> 2023
- day: str¶
- hour: str¶
- hour_of_day: str¶
- minutes15: str¶
- minutes30: str¶
- month: str¶
- quarter: str¶
- week: str¶
- year: str¶
- alter(name: str | None = None, formatting_settings: TimeInterval | None = None) None ¶
Alter the language’s specified properties.
- Parameters:
connection (Connection) – MicroStrategy connection object returned by connection.Connection()
name (str, Optional) – new name for the Language
formatting_settings (TimeInverval, Optional) – new formatting settings for the Language
- classmethod create(connection: Connection, name: str, base_language: Language | str | int, interface_language_id: str | None = None, formatting_settings: TimeInterval | None = None) Language ¶
Create a new language with specified properties.
- Parameters:
connection (Connection) – MicroStrategy connection object returned by connection.Connection()
name (str) – the name for the new Language
base_language (Language | str | int) –
one of the following: - lcid attribute of the language that will be used as a base
language for the new Language
- ID of the language that will be used as a base language for
the new Language
- Language class object that will be used as a base language for
the new Language
interface_language_id (str, Optional) – id of the new Language’s interface language
formatting_settings (TimeInterval, Optional) – formatting settings for the new Language
- Returns:
Language class object.
- mstrio.server.language.list_interface_languages(connection: Connection, to_dictionary: bool = False) list[mstrio.server.language.Language.InterfaceLanguage] | list[dict] ¶
List all available interface languages.
- Parameters:
connection (Connection) – MicroStrategy connection object returned by connection.Connection()
to_dictionary – if True returns a list of InterfaceLanguage dicts, otherwise returns a list of InterfaceLanguage objects
Returns: A list of interface languages as dictionaries.
- mstrio.server.language.list_languages(connection: Connection, to_dictionary: bool = False, limit: int | None = None, **filters) list[mstrio.server.language.Language] | list[dict] ¶
Get all languages as a list of Language objects or dictionaries. Optionally filter the languages by specifying filters.
- Parameters:
connection – MicroStrategy connection object
to_dictionary – if True returns a list of Language dicts, otherwise returns a list of Language objects
limit – limit the number of elements returned. If None (default), all objects are returned.
**filters – Available filter parameters: [‘name’, ‘base_language_lcid’, ‘lcid’, ‘interface_language’, ‘last_modified’, ‘hidden’, ‘is_language_supported’]
mstrio.server.node module¶
- class mstrio.server.node.Node(name: str | None = None, address: str | None = None, service_control: bool | None = None)¶
Bases:
Dictable
- address: str | None = None¶
- classmethod from_dict(source: dict)¶
Creates an object from a dictionary. The dictionary’s keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in _FROM_DICT_MAP.
- Parameters:
cls (T) – Class (type) of an object that should be created.
source (Dict[str, Any]) – A dictionary from which an object will be constructed.
connection (Connection, optional) – A MSTR Connection object. Defaults to None.
to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.
with_missing_value – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.
- Returns:
An object of type T.
- Return type:
T
- name: str | None = None¶
- service_control: bool | None = None¶
- class mstrio.server.node.Service(id: str, service: str, port: int, status: str, tags: dict | None = None, output: str | None = None)¶
Bases:
Dictable
- id: str¶
- output: str | None = None¶
- port: int¶
- service: str¶
- status: str¶
- tags: dict | None = None¶
- class mstrio.server.node.ServiceWithNode(node: str, address: str, id: str, service_control: bool, port: int, status: str, service_address: str, tags: dict | None = None, output: str | None = None)¶
Bases:
Dictable
- address: str¶
- id: str¶
- node: str¶
- output: str | None = None¶
- port: int¶
- service_address: str¶
- service_control: bool¶
- status: str¶
- tags: dict | None = None¶
mstrio.server.project module¶
- class mstrio.server.project.IdleMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Used to specify the exact behaviour of idle request.
- REQUEST (Request Idle): all executing and queued jobs finish executing
and any newly submitted jobs are rejected.
- EXECUTION (Execution Idle for All Jobs): all executing, queued, and
newly submitted jobs are placed in the queue, to be executed when the project resumes.
- WAREHOUSEEXEC (Execution Idle for Warehouse jobs): all executing,
queued, and newly submitted jobs that require SQL to be submitted to the data warehouse are placed in the queue, to be executed when the project resumes. Any jobs that do not require SQL to be executed against the data warehouse are executed.
- FULL (Request Idle and Execution Idle for All jobs): all executing and
queued jobs are canceled, and any newly submitted jobs are rejected.
- PARTIAL (Request Idle and Execution Idle for Warehouse jobs): all
executing and queued jobs that do not submit SQL against the data warehouse are canceled, and any newly submitted jobs are rejected. Any currently executing and queued jobs that do not require SQL to be executed against the data warehouse are executed.
- EXECUTION = 'exec_idle'¶
- FULL = 'partial_idle'¶
- PARTIAL = 'full_idle'¶
- REQUEST = 'request_idle'¶
- WAREHOUSEEXEC = 'wh_exec_idle'¶
- class mstrio.server.project.LockType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
Enum representing the type of lock applied to a project.
- TEMPORAL_INDIVIDUAL: A temporary lock that restricts all other sessions
except the current user’s session from editing the project. This lock disappears when the user’s session expires.
- TEMPORAL_CONSTITUENT: A temporary lock that restricts all other sessions
except the current user’s session from editing the project and all objects in the project. This lock disappears when the user’s session expires.
- PERMANENT_INDIVIDUAL: A permanent lock that prevents all users from
editing the project. This lock does not expire and must be removed before the project can be edited again.
- PERMANENT_CONSTITUENT: A permanent lock that prevents all users from
editing the project and all objects in the project. This lock does not expire and must be removed before the project and its objects can be edited again.
- NOT_LOCKED: Represents the state where the project is not locked
and can be edited by users.
- NOT_LOCKED = 'not_locked'¶
- PERMANENT_CONSTITUENT = 'permanent_constituent'¶
- PERMANENT_INDIVIDUAL = 'permanent_individual'¶
- TEMPORAL_CONSTITUENT = 'temporal_constituent'¶
- TEMPORAL_INDIVIDUAL = 'temporal_individual'¶
- class mstrio.server.project.Project(connection: Connection, name: str | None = None, id: str | None = None)¶
Bases:
Entity
,ModelVldbMixin
,DeleteMixin
,TranslationMixin
Object representation of MicroStrategy Project (Project) object.
- connection¶
A MicroStrategy connection object
- settings¶
Project settings object
- id¶
Project ID
- name¶
Project name
- description¶
Project description
- alias¶
Project alias
- type¶
Object type
- subtype¶
Object subtype
- ext_type¶
Object extended type
- nodes¶
List of nodes on which project is loaded
- date_created¶
Creation time, “yyyy-MM-dd HH:mm:ss” in UTC
- date_modified¶
Last modification time, “yyyy-MM-dd
- version¶
Version ID
- owner¶
owner ID and name
- acg¶
Access rights (See EnumDSSXMLAccessRightFlags for possible values)
- acl¶
Object access control list
- status¶
Project
- ancestors¶
List of ancestor folders
- data_language_settings¶
Project data language settings
- metadata_language_settings¶
Project metadata language settings
- class LockStatus(lock_type: LockType, lock_time: datetime.datetime | None = None, comment: str | None = None, machine_name: str | None = None, owner: User | None = None)¶
Bases:
Dictable
Object representation of Project Lock Status.
- lock_type¶
Lock type
- lock_time¶
Lock time
- Type:
datetime.datetime | None
- comment¶
Lock comment
- Type:
str | None
- machine_name¶
Machine name
- Type:
str | None
- comment: str | None = None¶
- lock_time: datetime.datetime | None = None¶
- machine_name: str | None = None¶
- add_datasource(datasources: list['DatasourceInstance | str']) list['DatasourceInstance'] ¶
Add datasources to the project.
- Parameters:
datasources (list["DatasourceInstance", str]) – List of datasource objects or datasource IDs to be added to the project.
- Returns:
List of datasource objects for the project.
- alter(name: str | None = None, description: str | None = None, comments: str | None = None)¶
Alter project name or/and description.
- Parameters:
name – new name of the project.
description – new description of the project.
comments – long description of the project.
- delete() bool ¶
Delete project.
- Returns:
True if project was deleted, False otherwise.
- delete_element_cache() None ¶
Delete element cache for the current project on the I-Server.
- delete_object_cache() None ¶
Delete object cache for the current project on the I-Server.
- disable_caching() None ¶
Disable caching settings for the current project on the I-Server.
- enable_caching() None ¶
Enable caching settings for the current project on the I-Server.
- fetch_settings() None ¶
Fetch the current project settings from the I-Server.
- get_current_engine_version()¶
- get_data_engine_versions() dict ¶
Fetch the currently available data engine versions for project.
- idle(on_nodes: str | list[str] | None = None, mode: mstrio.server.project.IdleMode | str = IdleMode.REQUEST) None ¶
Request to idle a specific cluster node. Idle project with mode options.
- Parameters:
on_nodes – Name of node, if not passed, project will be idled on all of the nodes.
mode – One of: IdleMode values.
- is_loaded() bool ¶
Check if the project is loaded on any node (server).
- list_caching_settings() dict ¶
Fetch current project settings connected with caching from I-Server
- list_properties(excluded_properties: list[str] | None = None) dict ¶
Fetches all attributes from the server and converts all properties of the object to a dictionary.
- Parameters:
excluded_properties (list[str], optional) – A list of object properties that should be excluded from the dict. Defaults to None.
- Returns:
- A dictionary which keys are object’s attribute names, and
which values are object’s attribute values.
- Return type:
dict
- load(on_nodes: str | list[str] | None = None) None ¶
Request to load the project onto the chosen cluster nodes. If nodes are not specified, the project will be loaded on all nodes.
- Parameters:
on_nodes – Name of node, if not passed, project will be loaded on all of the nodes.
- lock(lock_type: str | mstrio.server.project.LockType, lock_id: str | None = None) None ¶
—————— WORK IN PROGRESS ——————
This functionality is a work-in-progress. Use it only if you understand the underlying code. It may change in future updates. It is currently scheduled for 11.4.1200 release.
Lock the project.
- Args:
lock_type (str, LockType): Lock type. lock_id (str, optional): Lock ID.
- register(on_nodes: str | list | None = None) None ¶
Register project on nodes.
A registered project will load on node (server) startup.
- Parameters:
on_nodes – Name of node, if not passed, project will be loaded on all available nodes on startup.
- remove_datasource(datasources: list['DatasourceInstance | str']) None ¶
Remove datasources from the project.
- Parameters:
datasources (list["DatasourceInstance", str]) – List of datasource objects or datasource IDs to be removed from the project.
- resume(on_nodes: str | list[str] | None = None) None ¶
Request to resume the project on the chosen cluster nodes. If nodes are not specified, the project will be loaded on all nodes.
- Parameters:
on_nodes – Name of node, if not passed, project will be resumed on all of the nodes.
- unload(on_nodes: str | list[str] | None = None) None ¶
Request to unload the project from the chosen cluster nodes. If nodes are not specified, the project will be unloaded on all nodes. The unload action cannot be performed until all jobs and connections for project are completed. Once these processes have finished, pending project will be automatically unloaded.
- Parameters:
on_nodes – Name of node, if not passed, project will be unloaded on all of the nodes.
- unlock(lock_type: str | mstrio.server.project.LockType, lock_id: str | None = None, force: bool = False) None ¶
—————— WORK IN PROGRESS ——————
This functionality is a work-in-progress. Use it only if you understand the underlying code. It may change in future updates. It is currently scheduled for 11.4.1200 release.
Unlock the project.
- Args:
lock_type (str, LockType): Lock type. lock_id (str, optional): Lock ID. force (bool, optional): Whether to force unlock the project.
- unregister(on_nodes: str | list | None = None) None ¶
Unregister project on nodes.
An unregistered project will not load on node (server) startup.
- Parameters:
on_nodes (str or list, optional) – Name of node, if not passed, project will not be loaded on any nodes on startup.
- update_data_engine_version(new_version: str) None ¶
Update data engine version for project.
- update_settings() None ¶
Update the current project settings on the I-Server.
- class mstrio.server.project.ProjectSettings(connection: Connection, project_id: str | None = None)¶
Bases:
BaseSettings
Object representation of MicroStrategy Project (Project) Settings.
Used to fetch, view, modify, update, export to file, import from file and validate Project settings.
The object can be optionally initialized with connection and project_id, which will automatically fetch the current settings for the specified project. If not specified, settings can be loaded from file using import_from() method. Object attributes (representing settings) can be modified manually. Lastly, the object can be applied to any project using the update() method.
- connection¶
A MicroStrategy connection object
- disable_caching() None ¶
—————— WORK IN PROGRESS ——————
This functionality is a work-in-progress. Use it only if you understand the underlying code. It may change in future updates.
Disable caching settings for the current project on I-Server using this Settings object
- enable_caching() None ¶
—————— WORK IN PROGRESS ——————
This functionality is a work-in-progress. Use it only if you understand the underlying code. It may change in future updates.
Enable caching settings for the current project on I-Server using this Settings object
- fetch(project_id: str | None = None) None ¶
Fetch current project settings from I-Server and update this ProjectSettings object.
- Parameters:
project_id – Project ID
- list_caching_properties(show_description: bool = False) dict ¶
—————— WORK IN PROGRESS ——————
This functionality is a work-in-progress. Use it only if you understand the underlying code. It may change in future updates.
Fetch current project settings connected with caching from I-Server
- Args:
- show_description (bool): if True return, description and value
for each setting, else, return values only
- update(project_id: str | None = None) None ¶
Update the current project settings on I-Server using this Settings object.
- Parameters:
project_id – Project ID
- class mstrio.server.project.ProjectStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
IntEnum
- ACTIVE = 0¶
- ERRORSTATE = -3¶
- EXECIDLE = 1¶
- FULLIDLE = 7¶
- OFFLINE = -1¶
- OFFLINEPENDING = -2¶
- ONLINEPENDING = -4¶
- REQUESTIDLE = 2¶
- WHEXECIDLE = 4¶
- mstrio.server.project.compare_project_settings(projects: list[mstrio.server.project.Project], show_diff_only: bool = False) DataFrame ¶
Compares settings of project objects.
- Parameters:
projects (List[Project]) – List of project objects to compare.
show_diff_only (bool, optional) – Whether to display all settings or only different from first project in list.
mstrio.server.project_languages module¶
- class mstrio.server.project_languages.CurrentMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
AutoName
Enum that specify a Current Mode for Data Internationalization.
- CONNECTION = 'connection'¶
- NONE = 'none'¶
- SQL = 'sql'¶
- class mstrio.server.project_languages.DataLanguageSettings(default_language: DataLocalizationLanguage, current_mode: CurrentMode, languages: list[mstrio.server.project_languages.DataLocalizationLanguage])¶
Bases:
Dictable
Object that specify a Data Language Settings for a Project.
- default_language¶
Default language for the Project.
- Type:
- current_mode¶
Current mode for data internationalization.
- Type:
- languages¶
List of languages for the Project.
- Type:
list[DataLocalizationLanguage]
- add_language(languages: list[mstrio.server.project_languages.DataLocalizationLanguage]) None ¶
Adds languages to the Project.
- Parameters:
languages (list[DataLocalizationLanguage]) – list of languages to be added to the Project
- alter_current_mode(mode: str | mstrio.server.project_languages.CurrentMode) None ¶
Alters the current mode for data internationalization
- Parameters:
mode (str | CurrentMode) –
mode for data internationalization Available values:
none | CurrentMode.NONE
sql | CurrentMode.SQL
connection | CurrentMode.CONNECTION
- alter_default_language(language: str | mstrio.server.project_languages.DataLocalizationLanguage) None ¶
Alters the default language used by data internationalization
- Parameters:
language (str | DataLocalizationLanguage) – Language or it’s ID to be set as default.
- alter_language(languages: list[mstrio.server.project_languages.DataLocalizationLanguage], path: str) None ¶
Alters languages for the Project.
- Parameters:
languages (list[DataLocalizationLanguage]) – list of languages to be altered for the Project
path (str) – path to target where operation will be performed
values (Available) –
column
table
connectionId
- current_mode: CurrentMode¶
- default_language: DataLocalizationLanguage¶
- languages: list[mstrio.server.project_languages.DataLocalizationLanguage]¶
- remove_language(languages: list[mstrio.server.project_languages.DataLocalizationLanguage]) None ¶
Removes languages from the Project.
- Parameters:
languages (list[DataLocalizationLanguage]) – list of languages to be removed from the Project
- to_dict(camel_case: bool = True) dict ¶
Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.
- Parameters:
camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.
- Returns:
- A dictionary representation of object’s attributes and values.
By default, the dictionary keys are in camel case.
- Return type:
dict
- class mstrio.server.project_languages.DataLocalizationLanguage(id: str, name: str | None = None, column: str | None = None, table: str | None = None, connection_id: str | None = None)¶
Bases:
SimpleLanguage
Object that specify a Data Localization Language.
- id¶
ID of the language.
- Type:
str
- name¶
Name of the language.
- Type:
str, optional
- column¶
Column name for the language.
- Type:
str, optional
- table¶
Table name for the language.
- Type:
str, optional
- connection_id¶
Connection ID for the language.
- Type:
str, optional
- column: str | None = None¶
- connection_id: str | None = None¶
- table: str | None = None¶
- class mstrio.server.project_languages.MetadataLanguageSettings(default: SimpleLanguage, languages: list[mstrio.server.project_languages.SimpleLanguage])¶
Bases:
Dictable
Object that specify a Metadata Language Settings for a Project.
- default¶
Default language for the Project.
- Type:
- languages¶
List of languages for the Project.
- Type:
list[SimpleLanguage]
- add_language(languages: list[mstrio.server.project_languages.SimpleLanguage]) None ¶
Adds languages to the Project.
- Parameters:
languages (list[SimpleLanguage]) – list of languages to be added to the Project
- default: SimpleLanguage¶
- languages: list[mstrio.server.project_languages.SimpleLanguage]¶
- remove_language(languages: list[mstrio.server.project_languages.SimpleLanguage]) None ¶
Removes languages from the Project.
- Parameters:
languages (list[SimpleLanguage]) – list of languages to be removed from the Project
- to_dict(camel_case: bool = True) dict ¶
Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.
- Parameters:
camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.
- Returns:
- A dictionary representation of object’s attributes and values.
By default, the dictionary keys are in camel case.
- Return type:
dict
mstrio.server.server module¶
- class mstrio.server.server.ServerSettings(connection: Connection)¶
Bases:
BaseSettings
Object representation of MicroStrategy I-Server Settings.
Used to fetch, view, modify, update, export to file, import from file and validate Server settings.
The object can be optionally initialized with connection, which will automatically fetch the current I-Server settings. If not specified, settings can be loaded from file using import_from() method. Object attributes (representing settings) can be modified manually. Lastly, the object can be applied to any project using the update() method.
- settings¶
settings_value
- fetch() None ¶
Fetch current I-Server settings and update this ServerSettings object.
- update() None ¶
Update the current I-Server settings using this ServerSettings object.
mstrio.server.setting_types module¶
- class mstrio.server.setting_types.CacheEncryptionLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Cache encryption level on disk
- HIGH = 2¶
- LOW = 1¶
- NONE = 0¶
- class mstrio.server.setting_types.CompressionLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Level of File | Email | FTP delivery compression
- HIGH = 9¶
- LOW = 3¶
- MEDIUM = 6¶
- OFF = 0¶
- class mstrio.server.setting_types.DisplayEmptyReportMessageInRWD(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Display mode for empty Grid/Graphs in documents
- DISPLAY_MESSAGE_IN_DOCUMENT_GRIDS = -1¶
- HIDE_DOCUMENT_GRID = 0¶
- class mstrio.server.setting_types.FailedCacheCreation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.FailedEmailDelivery(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_EMAIL_ADDRESS = 'email_address'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.FailedFTPDelivery(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- FILE_LOCATION = 'file_location'¶
- LINK_TO_FILE = 'link_to_file'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.FailedFileDelivery(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- FILE_LOCATION = 'file_location'¶
- LINK_TO_FILE = 'link_to_file'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.FailedHistoryListDelivery(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- LINK_TO_HISTORY_LIST = 'link_to_history_list'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.FailedMobileDelivery(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.FailedPrinterDelivery(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- DELIVERY_DATE = 'date'¶
- DELIVERY_ERROR_MESSAGE = 'error_message'¶
- DELIVERY_STATUS = 'delivery_status'¶
- DELIVERY_TIME = 'time'¶
- PRINTER_NAME = 'printer_name'¶
- SUBSCRIPTION_DELIVERY_METHOD = 'delivery_method'¶
- SUBSCRIPTION_NAME = 'subscription_name'¶
- SUBSCRIPTION_OWNER_NAME = 'owner_name'¶
- SUBSCRIPTION_PROJECT_NAME = 'project_name'¶
- SUBSCRIPTION_RECIPIENT_NAME = 'recipient_name'¶
- SUBSCRIPTION_REPORT_OR_DOCUMENT_NAME = 'report_document_name'¶
- SUBSCRIPTION_SCHEDULE = 'schedule'¶
- class mstrio.server.setting_types.MergeSecurityFilters(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Rules to merge multiple Security Filters across user groups and users
- INTERSECT = 3¶
- UNION = 0¶
- class mstrio.server.setting_types.OrderMultiSourceDBI(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Rules to order multi-source Database Instances
- MULTISOURCE_DEFAULT_ORDERING = 0¶
- PROJECT_LEVEL_DATABASE_ORDERING = 1¶
- class mstrio.server.setting_types.ShowBaseViewInLibrary(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Always open dashboards/dossiers/documents with the last saved view in Library
- DEFAULT = 'use_inherited_value'¶
- NO = 'no'¶
- YES = 'yes'¶
- class mstrio.server.setting_types.SmartMemoryUsageForIntelligenceServer(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Smart Memory Usage for Intelligence Server
- APPLY_BEST_STRATEGY = 0¶
- DISABLE_THE_CAPABILITY = 2¶
- ENABLE_THE_CAPABILITY = 3¶
- TURN_OFF_THE_CAPABILITY_WITHOUT_EXCEPTIONS = 1¶
- USE_INHERITED_VALUE = -1¶
mstrio.server.storage module¶
- class mstrio.server.storage.StorageService(type: StorageType = StorageType.UNSET, alias: str | None = None, location: str | None = None, s3_region: str | None = None, aws_access_id: str | None = None, aws_secret_key: str | None = None, azure_storage_account_name: str | None = None, azure_secret_key: str | None = None, gcs_service_account_key: str | None = None, configured: bool = False)¶
Bases:
Dictable
StorageService configuration of environment. .. attribute:: type
Type of storage (e.g. file system, S3)
- type:
StorageType
- alias¶
Alias of the storage configuration,
- Type:
str, optional
- location¶
Storage location, e.g. bucket name for S3, absolute path of folder for File System
- Type:
str, optional
- s3_region¶
S3 bucket region
- Type:
str, optional
- aws_access_id¶
Access ID for AWS S3
- Type:
str, optional
- aws_secret_key¶
Access key for AWS S3
- Type:
str, optional
- azure_storage_account_name¶
Account name for Azure
- Type:
str, optional
- azure_secret_key¶
Access key for Azure
- Type:
str, optional
- configured¶
whether Storage Service is configured
- Type:
bool
- alias: str | None = None¶
- aws_access_id: str | None = None¶
- aws_secret_key: str | None = None¶
- azure_secret_key: str | None = None¶
- azure_storage_account_name: str | None = None¶
- configured: bool = False¶
- gcs_service_account_key: str | None = None¶
- location: str | None = None¶
- s3_region: str | None = None¶
- type: StorageType = 'unset'¶