Can Caret-qualified MDX elements in views be stripped? #1168
Closed
IcanMorris
started this conversation in
General
Replies: 1 comment 1 reply
-
Interesting question. I think you could make the view retrieval more robust with some custom logic. The first solution that comes to mind is: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The TM1 Views users generate often contain the fully qualified path in the raw MDX, for example:
[_test].[_test].[C^D]
When tm1py tries to execute a view that contains an element with a full path that is no longer valid, it immediately stops with an error
TM1: 11.8.01700.1
tm1py: 1.11.3
(in my case called via TM1Service.power_bi.execute_view)
I can see this in the tm1 message log occurring as well.
When PAfE executes the same view, I still see the attempt to resolve the bad-pathed element in the message log, but it manages to strip the broken path and silently continue. When PAfE (well, technically PAW?) modifies a broken path, only the broken path is removed. Other elements containing their path are left alone.
Thus a PAfE user doesn't even notice many structural changes, but a tm1py user notices them immediately.
Except for having them log on with PAfE and save their tm1py processed view, is there already something available that emulates the PAfE behavior?
It looks like the returned error message isn't really great and needs quite some text parsing to automate that implicit dropping of the path qualifier. I can probably just grab all the path-parts with regexp and drop all of them preventative, but that would be different from how PAfE handles it.
Note: For me it was rather hard to produce a path-containing element, this seems to happen when you work on the right half of the subset editor, open your consolidations and shift-select what you like from there. If you did the same on the left, this would not add the unique pathed names. I told them to let me know when they managed to break it on the left part of the window, but every so often someone will accidentally use the right half to sub-select and years from now when something is restructured, this will hit again.
Beta Was this translation helpful? Give feedback.
All reactions