mstrio.datasources package

Submodules

mstrio.datasources.database_connections module

class mstrio.datasources.database_connections.DatabaseConnections(connection: mstrio.connection.Connection)

Bases: object

Browse and manage database connections on the environment.

connection

A MicroStrategy connection object

disconnect_all_databases(force: bool = False) Optional[List[dict]]

Disconnect all database connections.

Parameters

force – if True, no additional prompt will be shown before disconnecting all connections

Returns

  • list of statuses of disconnecting all connections with their ids

    and messages from the I-Server

  • in case of error it returns None

disconnect_database(connection_id: str, force: bool = False) bool

Disconnect database connections by passing in connection_id.

Parameters
  • connection_id – Database Connection Instance Id

  • force – if True, no additional prompt will be shown before. Default False.

  • Returns – True for success. False otherwise.

list_connections(nodes: Optional[Union[str, List[str]]] = None, limit: Optional[int] = None, **filters) List[Dict[str, Any]]
Get all active database connections. Optionally filter the

connections by specifying the filters keyword arguments.

Parameters
  • nodes – Node (server) names on which databases will be disconnected.

  • limit – limit the number of elements returned. If None, all objects are returned.

  • **filters – Available filter parameters: [‘status’, ‘database_instance_name’, ‘database_instance_id’, ‘user_name’, ‘database_login_name’, ‘cluster_node’, ‘id’, ‘name’, ‘type’]

mstrio.datasources.datasource_connection module

class mstrio.datasources.datasource_connection.CharEncoding(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

NON_UTF8 = 'multibyte'
UTF8 = 'utf8'
class mstrio.datasources.datasource_connection.DatasourceConnection(connection: Connection, name: Optional[str] = None, id: Optional[str] = None)

Bases: mstrio.utils.entity.Entity, mstrio.utils.entity.CopyMixin, mstrio.utils.entity.DeleteMixin

Datasource connection configuration object that represents a connection to the datasource.

connection

A MicroStrategy connection object.

id

Unique datasource connection ID.

name

Unique datasource connection name.

description

Datasource connection description.

execution_mode

ExecutionMode Enum specifying how SQL statements will be executed on a physical database connection made.

max_cancel_attempt_time

Number of seconds before being timed out when attempting to make a connection.

max_query_exe_time

Number of seconds during which a query must be executed before being timed out.

max_connection_attempt_time

Number of seconds connection attempts to be made before timing out.

connection_lifetime

Number of seconds of the connection lifetime.

connection_idle_timeout

Number of seconds before being timed out when the connection is idle.

char_encoding_windows

CharEncoding Enum specifying the encoding across connection for Windows drivers.

char_encoding_unix

CharEncoding Enum specifying the encoding across connection for Unix drivers.

table_prefix

String prefixed to the names of all temporary tables created by the Query Engine for this connection during report execution with this string.

connection_string

Database connection string.

parameterized_queries

Specifies whether parameterized queries are enabled.

extended_fetch

Specifies whether or not to use the extended fetch ODBC call to retrieve data from the database connection.

datasource_login

DatasourceLogin object or ID

database_type

Database type

database_version

Database version

driver_type

DriverType Enum specifying Driver used for database connection.

oauth_parameter

Used for authentication with oAuth.

type

Object type

subtype

Object subtype

date_created

Creation time, DateTime object

date_modified

Last modification time, DateTime object

owner

User object that is the owner

acg

Object access rights. It a bit vector where bits are defined at [EnumDSSXMLAccessRightFlags].

acl

Object access control list

alter(name: Optional[str] = None, description: Optional[str] = None, execution_mode: Optional[Union[str, mstrio.datasources.datasource_connection.ExecutionMode]] = None, max_cancel_attempt_time: Optional[int] = None, max_query_exe_time: Optional[int] = None, max_connection_attempt_time: Optional[int] = None, connection_lifetime: Optional[int] = None, connection_idle_timeout: Optional[int] = None, char_encoding_windows: Optional[Union[str, mstrio.datasources.datasource_connection.CharEncoding]] = None, char_encoding_unix: Optional[Union[str, mstrio.datasources.datasource_connection.CharEncoding]] = None, table_prefix: Optional[str] = None, connection_string: Optional[str] = None, parameterized_queries: Optional[bool] = None, extended_fetch: Optional[bool] = None, driver_type: Optional[Union[str, mstrio.datasources.datasource_connection.DriverType]] = None, database_type: Optional[str] = None, database_version: Optional[str] = None, datasource_login: Optional[Union[str, mstrio.datasources.datasource_login.DatasourceLogin]] = None) None

Alter the datasource connection properties.

Parameters
  • name – Unique datasource connection name.

  • description – Datasource connection description.

  • execution_mode – ExecutionMode Enum specifying how SQL statements will be executed on a physical database connection made.

  • max_cancel_attempt_time – Number of seconds before being timed out when attempting to make a connection.

  • max_query_exe_time – Number of seconds during which a query must be executed before being timed out.

  • max_connection_attempt_time – Number of seconds connection attempts to be made before timing out.

  • connection_lifetime – Number of seconds of the connection lifetime.

  • connection_idle_timeout – Number of seconds before being timed out when the connection is idle.

  • char_encoding_windows – CharEncoding Enum specifying the encoding across connection for Windows drivers.

  • char_encoding_unix – CharEncoding Enum specifying the encoding across connection for Unix drivers.

  • table_prefix – String prefixed to the names of all temporary tables created by the Query Engine for this connection during report execution with this string.

  • connection_string – Database connection string.

  • parameterized_queries – Specifies whether parameterized queries are enabled.

  • extended_fetch – Specifies whether or not to use the extended fetch ODBC call to retrieve data from the database connection.

  • driver_type – DriverType Enum specifying Driver used for database connection.

  • datasource_loginDatasourceLogin object or ID

  • driver_type – ENUM Drivers used for database connection.

  • database_type – Database type

  • database_version – Database version

classmethod create(connection: Connection, name: str, description: Optional[str] = None, acg: Optional[int] = None, execution_mode: Union[str, mstrio.datasources.datasource_connection.ExecutionMode] = None, max_cancel_attempt_time: Optional[int] = None, max_query_exe_time: Optional[int] = None, max_connection_attempt_time: Optional[int] = None, connection_lifetime: Optional[int] = None, connection_idle_timeout: Optional[int] = None, char_encoding_windows: Union[str, mstrio.datasources.datasource_connection.CharEncoding] = None, char_encoding_unix: Union[str, mstrio.datasources.datasource_connection.CharEncoding] = None, table_prefix: Optional[str] = None, connection_string: Optional[str] = None, parameterized_queries: Optional[bool] = None, extended_fetch: Optional[bool] = None, datasource_login: Optional[Union[mstrio.datasources.datasource_login.DatasourceLogin, str]] = None, database_type: Optional[str] = None, database_version: Optional[str] = None, driver_type: Union[str, mstrio.datasources.datasource_connection.DriverType] = None, oauth_parameter: Optional[str] = None) DatasourceConnection

Create a new datasource connection on the I-Server.

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

  • name – Unique datasource connection name.

  • description – Datasource connection description.

  • acg – Object access rights. It’s a bit vector where bits are defined at [EnumDSSXMLAccessRightFlags].

  • execution_mode – ExecutionMode Enum specifying how SQL statements will be executed on a physical database connection made.

  • max_cancel_attempt_time – Number of seconds before being timed out when attempting to make a connection.

  • max_query_exe_time – Number of seconds during which a query must be executed before being timed out.

  • max_connection_attempt_time – Number of seconds connection attempts to be made before timing out.

  • connection_lifetime – Number of seconds of the connection lifetime.

  • connection_idle_timeout – Number of seconds before being timed out when the connection is idle.

  • char_encoding_windows – CharEncoding Enum specifying the encoding across connection for Windows drivers.

  • char_encoding_unix – CharEncoding Enum specifying the encoding across connection for Unix drivers.

  • table_prefix – String prefixed to the names of all temporary tables created by the Query Engine for this connection during report execution with this string.

  • connection_string – Database connection string.

  • parameterized_queries – Specifies whether parameterized queries are enabled.

  • extended_fetch – Specifies whether or not to use the extended fetch ODBC call to retrieve data from the database connection.

  • driver_type – DriverType Enum specifying Driver used for database connection.

  • oauth_parameter – Used for authentication with oAuth.

  • datasource_loginDatasourceLogin object or ID

  • database_type – Database type

  • database_version – Database version

Returns

DatasourceConnection object.

test_connection() bool

Test datasource connection object.

Returns

True if connection can be established, else False.

class mstrio.datasources.datasource_connection.DriverType(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

NATIVE = 'native'
ODBC = 'odbc'
RESERVED = 'reserved'
class mstrio.datasources.datasource_connection.ExecutionMode(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

ASYNC_CONNECTION = 'async_connection'
ASYNC_STATEMENT = 'async_statement'
RESERVED = 'reserved'
SYNCHRONOUS = 'synchronous'
mstrio.datasources.datasource_connection.list_datasource_connections(connection: Connection, to_dictionary: bool = False, limit: Optional[int] = None, **filters) Union[List[DatasourceConnection], List[dict]]

Get list of DatasourceConnection objects or dicts. Optionally filter the connections by specifying filters.

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

  • to_dictionary – If True returns dict, by default (False) returns User objects.

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

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘acg’]

Examples

>>> list_datasource_connections(connection, name='db_conn_name')

mstrio.datasources.datasource_instance module

class mstrio.datasources.datasource_instance.DatasourceInstance(connection: Connection, name: Optional[str] = None, id: Optional[str] = None)

Bases: mstrio.utils.entity.Entity, mstrio.utils.entity.CopyMixin, mstrio.utils.entity.DeleteMixin

Object representation of MicroStrategy DataSource Instance object.

connection

A MicroStrategy connection object

id

Datasource Instance ID

name

Datasource Instance name

description

Datasource Instance description

dbms

The database management system (DBMS) object

database

Database object

datasource_type

DatasourceType Enum (reserved, normal, data_import, data_import_primary)

table_prefix

Table prefix

odbc_version

Odbc version ENUM

intermediate_store_db_name

Intermediate store DBName

intermediate_store_table_space_name

intermediate store table space name

type

Object type

subtype

Object subtype

date_created

Creation time, DateTime object

date_modified

Last modification time, DateTime object

owner

User object that is the owner

acg

Access rights (See EnumDSSXMLAccessRightFlags for possible values)

acl

Object access control list

alter(name: Optional[str] = None, description: Optional[str] = None, datasource_type: Optional[Union[str, mstrio.datasources.datasource_instance.DatasourceType]] = None, table_prefix: Optional[str] = None, odbc_version: Optional[str] = None, intermediate_store_db_name: Optional[str] = None, intermediate_store_table_space_name: Optional[str] = None, dbms: Optional[Union[str, mstrio.datasources.dbms.Dbms]] = None, datasource_connection: Optional[Union[str, mstrio.datasources.datasource_connection.DatasourceConnection]] = None, primary_datasource: Optional[Union[str, mstrio.datasources.datasource_instance.DatasourceInstance]] = None, data_mart_datasource: Optional[Union[str, mstrio.datasources.datasource_instance.DatasourceInstance]] = None) None

Alter DatasourceInstance properties.

Parameters
  • name – Datasource name

  • description – Datasource description

  • datasource_type – DatasourceType Enum (reserved, normal, data_import, data_import_primary)

  • table_prefix – Table prefix

  • odbc_version – Odbc version ENUM (version3x, version2x)

  • intermediate_store_db_name – Intermediate store DBName

  • intermediate_store_table_space_name – intermediate store table space name

  • dbms – The database management system (DBMS) object or ID

  • datasource_connectionDatasourceConnection object or ID

  • primary_datasourceDatasourceInstance object or ID

  • data_mart_datasourceDatasourceInstance object or ID

classmethod create(connection: Connection, name: str, dbms: Union[mstrio.datasources.dbms.Dbms, str], description: Optional[str] = None, datasource_type: Optional[Union[str, mstrio.datasources.datasource_instance.DatasourceType]] = None, table_prefix: Optional[str] = None, odbc_version: Optional[str] = None, intermediate_store_db_name: Optional[str] = None, intermediate_store_table_space_name: Optional[str] = None, datasource_connection: Optional[Union[str, mstrio.datasources.datasource_connection.DatasourceConnection]] = None, database_type: str = None, database_version: str = None, primary_datasource: Optional[Union[str, DatasourceInstance]] = None, data_mart_datasource: Optional[Union[str, DatasourceInstance]] = None) Optional[DatasourceInstance]

Create a new DatasourceInstance object on I-Server.

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

  • name – Datasource name

  • dbms – The database management system (DBMS) object or id

  • description – Datasource description

  • datasource_type – DatasourceType Enum (reserved, normal, data_import, data_import_primary)

  • table_prefix – Table prefix

  • odbc_version – Odbc version ENUM (version3x, version2x)

  • intermediate_store_db_name – Intermediate store DBName

  • intermediate_store_table_space_name – intermediate store table space name

  • datasource_connectionDatasourceConnection object or ID

  • database_type – Database type

  • database_version – Database version

  • primary_datasourceDatasourceInstance object or ID

  • data_mart_datasourceDatasourceInstance object or ID

Returns

DatasourceInstance object.

class mstrio.datasources.datasource_instance.DatasourceType(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

DATA_IMPORT = 'data_import'
DATA_IMPORT_PRIMARY = 'data_import_primary'
NORMAL = 'normal'
RESERVED = 'reserved'
mstrio.datasources.datasource_instance.list_connected_datasource_instances(connection: Connection, to_dictionary: bool = False) Union[list['DatasourceInstance'], list[dict]]

List all datasource instances for which there is an associated Database Login and are connected to a project mapped to a Connection object.

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

  • to_dictionary (bool, optional) – If True returns a list of dictionaries representing datasource instances

Returns

A list of connected

datasource instances.

Return type

Union[list[“DatasourceInstance”], list[dict]]

mstrio.datasources.datasource_instance.list_datasource_instances(connection: Connection, to_dictionary: bool = False, limit: Optional[int] = None, ids: Optional[List[str]] = None, database_types: Optional[List[str]] = None, project: Optional[Union[Project, str]] = None, **filters) Union[List[DatasourceInstance], List[dict]]

Get list of DatasourceInstance objects or dicts. Optionally filter the datasource instances by specifying filters.

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

  • to_dictionary – If True returns dict, by default (False) returns User objects.

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

  • ids – list of datasources ids as strings. By default None.

  • database_types – list of strings representing database types. By default None. Available values: [‘reserved’, ‘access’, ‘altibase’, ‘amazon_athena’, ‘amazon_aurora’, ‘amazon_redshift’, ‘arcadia_platform’, ‘aster’, ‘big_data_engine’, ‘cassandra’, ‘cirro’, ‘cloud_element’, ‘cloud_gateway’, ‘cloud_gateway_aws_s3’, ‘cloud_gateway_azure_adls_2’, ‘cloud_gateway_google_cloud_storage’, ‘composite’, ‘concur’, ‘connection_cloud’, ‘data_direct_cloud’, ‘datallegro’, ‘db2’, ‘denodo’, ‘drill’, ‘dropbox’, ‘eloqua’, ‘enterprise_db’, ‘ess_base’, ‘exa_solution’, ‘excel’, ‘facebook’, ‘gbase_8a’, ‘generic’, ‘generic_data_connector’, ‘google_analytics’, ‘google_big_query’, ‘google_big_query_ff_sql’, ‘google_drive’, ‘hive’, ‘hive_thrift’, ‘hubspot’, ‘impala’, ‘informatica’, ‘informix’, ‘kognitiowx2’, ‘kyvos_mdx’, ‘mapd’, ‘marketo’, ‘mark_logic’, ‘mem_sql’, ‘metamatrix’, ‘microsoft_as’, ‘mongo_db’, ‘my_sql’, ‘neoview’, ‘netezza’, ‘open_access’, ‘oracle’, ‘par_accel’, ‘par_stream’, ‘paypal’, ‘phoenix’, ‘pig’, ‘pivotal_hawq’, ‘postgre_sql’, ‘presto’, ‘red_brick’, ‘salesforce’, ‘sand’, ‘sap’, ‘sap_hana’, ‘sap_hana_mdx’, ‘search_engine’, ‘servicenow’, ‘shopify’, ‘snow_flake’, ‘spark_config’, ‘spark_sql’, ‘splunk’, ‘sql_server’, ‘square’, ‘sybase’, ‘sybase_iq’, ‘sybase_sql_any’, ‘tandem’, ‘teradata’, ‘tm1’, ‘twitter’, ‘unknown’, ‘url_auth’, ‘vectorwise’, ‘vertica’, ‘xquery’]

  • project – id (str) of a project or instance of an Project class to search for the datasource instances in. When provided, both ids and database_types are ignored. By default None.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘datasource_type’, table_prefix, ‘odbc_version’, ‘intermediate_store_db_name’, ‘intermediate_store_table_space_name’, ‘dbms’, ‘owner’, ‘acg’]

Examples

>>> list_datasource_instances(connection, name='ds_instance_name')

mstrio.datasources.datasource_login module

class mstrio.datasources.datasource_login.DatasourceLogin(connection: Connection, name: str = None, id: str = None)

Bases: mstrio.utils.entity.Entity, mstrio.utils.entity.CopyMixin, mstrio.utils.entity.DeleteMixin

A user login configuration object to access a particular datasource. Also formerly known as database login.

name

name of the database login

id

database login ID

description

Description of the database login

username

database user to be used by the database login

version

Object version ID

ancestors

List of ancestor folders

type

Object type. Enum

subtype

Object subtype

ext_type

Object extended type.

date_created

Creation time, DateTime object

date_modified

Last modification time, DateTime object

owner

User object that is the owner

acg

Access rights (See EnumDSSXMLAccessRightFlags for possible values)

acl

Object access control list

alter(name: Optional[str] = None, username: Optional[str] = None, description: Optional[str] = None, password: Optional[str] = None) None

Alter the datasource login properties.

Parameters
  • name – login object name

  • username – username

  • description – login object description

  • password – database password to be used by the database login

classmethod create(connection: Connection, name: str, username: str, password: str, description: str = None) DatasourceLogin

Create a new datasource login.

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

  • name – login object name

  • username – username

  • description – login object description

  • password – database password to be used by the database login

Returns

DatasourceConnection object.

mstrio.datasources.datasource_login.list_datasource_logins(connection: Connection, to_dictionary: bool = False, limit: int = None, **filters) Union[List[DatasourceLogin], List[dict]]

Get list of DatasourceLogin objects or dicts. Optionally filter the logins by specifying filters.

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

  • to_dictionary – If True returns dict, by default (False) returns User objects.

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

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Examples

>>> list_db_logins(connection, name='db_login_name')

mstrio.datasources.datasource_map module

class mstrio.datasources.datasource_map.DatasourceMap(connection: mstrio.connection.Connection, id: Optional[str] = None, project: Optional[Union[mstrio.server.project.Project, str]] = None, default_connection_map: bool = False, ds_connection: Optional[mstrio.datasources.datasource_connection.DatasourceConnection] = None, datasource: Optional[mstrio.datasources.datasource_instance.DatasourceInstance] = None, user: Optional[mstrio.users_and_groups.user.User] = None, login: Optional[mstrio.datasources.datasource_login.DatasourceLogin] = None, locale: Optional[mstrio.datasources.datasource_map.Locale] = None)

Bases: mstrio.utils.entity.EntityBase

Object representation of MicroStrategy Datasource Map Object

The Datasource Map provides mapping between a user and a datasource login for the given datasource and datasource connection.

connection

A MicroStrategy connection object

id

The Map’s ID.

project

The project the Map is assigned to.

default_connection_map

Whether the Map is the default for the project.

ds_connection

The mapped Datasource Connection

datasource

The mapped Datasource Instance

user

The mapped User

login

The mapped Datasource Login

locale

The Map’s locale

classmethod create(connection: mstrio.connection.Connection, project: Union[mstrio.server.project.Project, str], user: Union[mstrio.users_and_groups.user.User, str], ds_connection: Union[mstrio.datasources.datasource_connection.DatasourceConnection, str], datasource: Union[mstrio.datasources.datasource_instance.DatasourceInstance, str], login: Union[mstrio.datasources.datasource_login.DatasourceLogin, str], locale: Optional[mstrio.datasources.datasource_map.Locale] = None, locale_id: Optional[str] = None, locale_name: Optional[str] = None) mstrio.datasources.datasource_map.DatasourceMap

Create a new Datasource Map object on the server. If more than one locale related parameters are provided, locale has priority, then locale_id.

Parameters
  • connection – A MicroStrategy connection object

  • project – The project the Map is to be assigned to

  • user – The User to be mapped

  • ds_connection – The Datasource Connection to be mapped

  • datasource – The Datasource Instance to be mapped

  • login – The Datasource Login to be mapped

  • locale – The locale to be mapped.

  • locale_id – The id of locale to be mapped.

  • locale_name – The name of locale to be mapped.

Returns

DatasourceMap object

delete(force: bool = False) bool

Deletes the DatasourceMap.

Note: Default connection maps cannot be deleted.

Parameters

force – If True, no additional prompt will be shown before deleting. Default False.

Returns

True for success. False otherwise.

classmethod from_dict(source: Dict[str, Any], connection: mstrio.connection.Connection) mstrio.datasources.datasource_map.DatasourceMap
Overrides Dictable.from_dict() to instantiate an object from

a dictionary without calling any additional getters.

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) – A MicroStrategy Connection object.

  • to_snake_case (bool, optional) – Set to True if attribute names

  • True. (should be converted from camel case to snake case. Defaults to) –

Returns

An object of type T.

Return type

T

to_dict(camel_case)

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.datasources.datasource_map.Locale(connection: mstrio.connection.Connection, id: str)

Bases: mstrio.utils.entity.Entity

mstrio.datasources.datasource_map.list_datasource_mappings(connection: mstrio.connection.Connection, default_connection_map: bool = False, project: Optional[Union[mstrio.server.project.Project, str]] = None, to_dictionary: bool = False, limit: Optional[int] = None, **filters) Optional[Union[mstrio.datasources.datasource_map.DatasourceMap, List[mstrio.datasources.datasource_map.DatasourceMap], dict, List[dict]]]

Get list of DatasourceLogin objects or dicts. Optionally filter the logins by specifying filters.

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

  • default_connection_map – True if connection map is default Connection Map. Default False

  • project – The project (or its id) which maps are to be fetched. Optional unless requesting the default map.

  • to_dictionary – If True returns dict, by default (False) returns User objects.

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

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Returns

List[“DatasourceMap”] by default List[dict] if to_dict is True DatasourceMap if default map was requested dict if default map was requested and to_dict is True None if default map was requested but doesn’t exist.

Examples

>>> list_datasource_mappings(connection, name='db_login_name')

mstrio.datasources.dbms module

class mstrio.datasources.dbms.Dbms(connection: Connection, name: str = None, id: str = None, type: str = None, version: str = None)

Bases: mstrio.utils.entity.EntityBase

Object representation of MicroStrategy Database management system (DBMS)

name

Database management system (DBMS) name.

id

Database management system (DBMS) ID.

type

Database management system (DBMS) type.

version

Database management system (DBMS) version.

mstrio.datasources.dbms.list_available_dbms(connection: Connection, to_dictionary: bool = False, limit: int = None, **filters) Union[List[Dbms], List[dict]]

List all available database management systems (DBMSs) objects or dicts. Optionally filter the DBMS by specifying filters.

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

  • to_dictionary – If True returns dict, by default (False) returns User objects.

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

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘type’, ‘version’]

Examples

>>> list_available_dbms(connection)

Module contents