Skip to content
Compare
Choose a tag to compare
@MariusWirtz MariusWirtz released this 31 Jan 17:40
· 122 commits to master since this release

Highlights

1. Support for TM1 v12

TM1py now works with TM1 v12.

with TM1Service(
        address="us-east-2.aws.planninganalytics.ibm.com",
        api_key="AB4VfG7T8wPM-912uFKeYG5PGh0XbS80MVBAt7SEG6xn",
        iam_url="https://iam.cloud.ibm.com/identity/token",
        tenant="YA9A2T8BS2ZU",
        database="Database") as tm1:
    print(tm1.server.get_product_Version())

by @rclapp in #1000

2. CRUD operations to manage servers on v12

with ManageService(domain=domain, root_client=root_client, root_secret=root_secret) as manager:
   manager.create_database(instance_name="instance name",
                          database_name="database_name",
                          product_version="12.0.0",
                          number_replicas=1,
                          cpu_requests="1000m",
                          cpu_limits="2000m",
                          memory_limits="2G",
                          memory_requests="1G",
                          storage_size="20Gi")

   manager.scale_database(instance_name="instance name", database_name="database name", replicas=2)

   manager.create_database_backup(instance_name="instance name", 
                                 database_name="database name", 
                                 backup_set_name="my backup")

by @rclapp

3. Asynchronous execute_mdx functions

Speed up your MDX executions by assigning more than one worker-thread in TM1.

mdx = """
SELECT
{TM1SubsetAll([Big Dimension])} ON ROWS,
{TM1SubsetAll([Small Dimension])} ON COLUMNS
FROM [Big Cube]
"""

with TM1Service(**tm1params) as tm1:
    cells = tm1.cells.execute_mdx(
        mdx=mdx,
        # leverage 4 worker threads in TM1 for the extraction
        max_workers=4,
        # parallelization on rows axis
        async_axis=1)

by @vmitsenko in #935 and #1030

4. Hierarchy updates from data frames

Create and update TM1 hierarchies directly from pandas dataframes.

Stores ElementType Alias:a City:s Square Footage:n level001 level000 level001_weight level000_weight
S151 Numeric Boardwalk Games New York City 120 USA World 1 1
S143 Numeric Strategy Vault Zurich 250 Switzerland World 1 1
S811 Numeric Cardboard Castle Sydney 80 Sydney World 1 1
columns = ["Stores", "ElementType", "Alias:a", "City:s", "Square Footage:n", "level001",
           "level000", "level001_weight", "level000_weight"]
data = [
    ['S151', "Numeric", "Boardwalk Games", "New York City", 120, "USA", "World", 1, 1],
    ['S143', 'Numeric', "Strategy Vault", "Zurich", 250, "Switzerland", "World", 1, 1],
    ['S811', 'Numeric', "Cardboard Castle", "Sydney", 80, "Sydney", "World", 1, 1],
]

with TM1Service(**tm1params) as tm1:
    tm1.hierarchies.update_or_create_hierarchy_from_dataframe(
        dimension_name="Stores",
        hierarchy_name="Stores",
        df=DataFrame(data=data, columns=columns)
    )
image

by @MariusWirtz in #944 and #1011

New Features, Improvements, and Bugfixes

Stats

  • Contributors: 15
  • Commits: 178
  • Changed Files: 72
  • Added Lines: 7,205
  • Deleted Lines: 1,643

How to upgrade TM1py

pip install tm1py --upgrade

New Contributors

Full Changelog: 1.11.1...2.0