You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was searching around the samples folder but was successful. Is there a way to (1) get all the view from a TM1 cube (2) get a list of TM1 cube from a server?
Attempting to get a list of views in a cube as coded:
with TM1Service(address="XX.XX.XX.X", port=XXXX, ssl=True, namespace="XXX", gateway="http://xxxxx:x0/xxxx/xx/xx/disp") as tm1:
print(TM1py.ViewService.get_all('CubeName'))
Error received:
TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_22792/967449712.py in
1 with TM1Service(address="XX.XX.XX.X", port=XXXX, ssl=True, namespace="XXX", gateway="http://xxxxx:x0/xxxx/xx/xx/disp") as tm1:
----> 2 print(TM1py.ViewService.get_all('CubeName))
3
marmar1020
changed the title
Saving TM1 Cube data to dataframe output - column headers/values all in one row
Getting all the views from a TM1 cube
Jan 9, 2022
The problem is the way you're accessing the ViewService. It should be accessed through the TM1Service e.g tm1.cubes.views.get_all(cube_name) or tm1.views.get_all(cube_name)
Depending on the information you're after, you can either use the get_all_names functions or get_all. Some examples below.
withTM1Service(...) astm1:
# Get all cube namescube_names=tm1.cubes.get_all_names()
# Get all view names for the Revenue cuberevenue_view_names=tm1.cubes.views.get_all_names('Revenue')
# Get all cubes, along with their rules and dimensions cubes=tm1.cubes.get_all()
# Get all views for the Revenue cube, along with their dimension arrangement if `NativeView` or MDX statement if `MDXView`revenue_views=tm1.cubes.views.get_all('Revenue')
Hello All,
I was searching around the samples folder but was successful. Is there a way to (1) get all the view from a TM1 cube (2) get a list of TM1 cube from a server?
Attempting to get a list of views in a cube as coded:
with TM1Service(address="XX.XX.XX.X", port=XXXX, ssl=True, namespace="XXX", gateway="http://xxxxx:x0/xxxx/xx/xx/disp") as tm1:
print(TM1py.ViewService.get_all('CubeName'))
Error received:
TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_22792/967449712.py in
1 with TM1Service(address="XX.XX.XX.X", port=XXXX, ssl=True, namespace="XXX", gateway="http://xxxxx:x0/xxxx/xx/xx/disp") as tm1:
----> 2 print(TM1py.ViewService.get_all('CubeName))
3
TypeError: get_all() missing 1 required positional argument: 'cube_name'
Thanks
The text was updated successfully, but these errors were encountered: