-
Notifications
You must be signed in to change notification settings - Fork 112
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
Bug in clear_with_dataframe() when using multiple hierarchies in dimension_mapping #1068
Comments
My Solution:
or just
As we are not using the keys of the dictionary |
Hey @MariusWirtz, There two other things a still worth to consider? There is another minimal Bug: L692
ToDo: We should check if the mapping-hierarchies match with the ones from the tm1 dimension similar with the |
Hey @MariusWirtz, we had some issues with the function lately as a cross join in the MDX statement occurred as we wanted to delete multiple periods from two different years, here is relevant part of the generated MDX:
My workaround was to just loop though the dataframe row by row and execute
I think it would be worth to integrate this kind of logic in the
It means that we have to execute the PS: It was hard debugging the data loss, so maybe we should name the process in L755? |
Describe the bug
There is a bug in the Iteration over the hierarchies here.
We initialize the mdx_selections dict and while iterating over the hierarchies we override as we can have just one key for the dimension name in the dict mdx_selections
We get a final mdx something like this: mdx_builder.to_mdx() =
Expected behavior
We would except this mdx result:
mdx_builder.to_mdx() =
Would be nice to have some more logging, like print the final mdx statement so one can see the what's going on.
There is another minimal Bug: L692
the variable dimension is not assigned yet and should write column instead:
raise ValueError(f"Value for key '{column}' in dimension_mapping must be of type str")
ToDo: We should check if the mapping-hierarchies match with the ones from the tm1 dimension similar with the
unmatched_dimension_names
Version
TM1py 2.0.0
TM1 Server Version: 11.8
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: