-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function cells.clear() can't deal with dimension hierarchies #1006
Comments
Hi @151N3, quick question. If you run the code below, does TM1py clear out the data as it should? from TM1py import TM1Service
with TM1Service(address="localhost", port=12354, user="admin", password="apple", ssl=True) as tm1:
tm1.cells.clear(
cube="Sales",
product="[Product].[10]",
year="[Year].[2023]",
month="[Month].[11]",
category="{TM1FILTERBYLEVEL({TM1SUBSETALL([category].[some_category])},0)}")
|
Hi @MariusWirtz, |
I am interested to implement a kind of |
Hi @MariusWirtz, |
Please feel free to include the |
I think, before we have to have a chat where we could use |
Hi @MariusWirtz , |
New function clear_from_df() check #1006
Describe the bug
Given the example from clearing-cube-data-with-tm1py is quite convenient to use the function
cells.clear()
but if there is the need to clear some data from a special hierarchy the function won't work and successfully clears nothing.To Reproduce
Lets say we have a cube Sales with 4 dimensions: product, year, month, age, category and the dimension category has more than one hierarchy and we want to clear the data from the some_category hiearchy.
It generates this MDX:
There is no way to manipulate
Expected behavior
I think, the function can be extended with a mapping parameter like:
mapping = {"category":"some_category"}
if the hierarchy name differs from the dimension name. In this case we can still use the generic functioncells.clear()
instead ofcells.clear_with_mdx()
and we get:Version
TM1py: 1.11.3
TM1 Server Version: 11.8
The text was updated successfully, but these errors were encountered: