1.6.0
Highlights
- support for IntegratedSecurityMode3
tm1 = TM1Service(address=servername, port=instanceport, ssl=True, integrated_login=True)
- faster write function
with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
cells = dict()
cells["e1", "e1"] = 1
cells["e2", "e2"] = 2
tm1.cells.write("c1", cells, use_ti=True)
- new
write_dataframe
function 82a39bd
with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
df = pd.DataFrame({
'd1': ['e1', 'e2'],
'd2': ['e1', 'e2'],
'Value': [1, 2]})
tm1.cells.write_dataframe('c1', df)
- support for sandboxes
with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
sandbox = Sandbox(name="My Sandbox")
tm1.sandboxes.create(sandbox)
with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
cube_name = 'c1'
cells = {
("e1", "e1"): 1,
("e2", "e2"): 2
}
tm1.cells.write(cube_name, cells, sandbox_name="My Sandbox")
with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
mdx = """
SELECT
{[d1].[e1], [d1].[e2]} ON ROWS,
{[d2].[e1], [d2].[e2]} ON COLUMNS
FROM [c1]
"""
df = tm1.cells.execute_mdx_dataframe(mdx, sandbox_name="My Sandbox")
- impersonation #353
with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple", impersonate="Marius") as tm1:
print(tm1.whoami)
New Features
- new query options on
filter_message_log
function:level
,msg_contains
e9c2715 - new direct functions to add elements, edges or element attributes quickly:
add_elements
,add_edges
,add_element_attributes
- new security functions:
get_read_only_users
,get_custom_security_groups
,update_user_password
#393 - functions to start and stop performance monitor:
start_performance_monitor
,stop_performance_monitor
- new
cube_lock
,cube_unlock
functions 8ea0096 - new
remove_edges_under_consolidation
function e5d2876 - new
get_elements_by_wildcard
function e4837dc - add
remove_all_elements
,remove_all_edges
function to hierarchy class - optional
increment
argument inwrite
function - Add
add_component
function to Hierarchy class - support for changesets in write operations #454
Fixes
- improved test suite #301
- fix
get_number_of_elements
function - fix
get_members_under_consolidation
#381 - make
get_attribute_of_elements
work with numeric attributes 39d61fe - avoid execute_dataframe method to fail over 0 cell 7450911
- implement
__sub__
function inCaseAndSpaceInsensitiveSet
8c807e7 - issue in
get_last_data_update
function 9bc898e - Fix single-axis selection issue in execute_mdx #416
- work around TM1 REST issue with RuleDerived cell property b5d4bd8
- Fix chore reschedule issue cubewise-code/tm1py-samples#82
Compatibility Notes
- requires Python 3.7 or higher
execute_mdx_values
now returns a list object instead of a generator- the
MDXUtils
module has been removed. Use mdxpy instead write_values
now returns thechangeset_id
instead of a response object
Acknowledgments
Big thanks to @rkvinoth, @scrambldchannel, @andreyea, @adscheevel, @rclapp, @wimgielis for contributing code to this release, and many others for reporting bugs and requesting features.
How to upgrade TM1py
To upgrade TM1py, just use the following command:
pip install TM1py --upgrade