TabularEditor / TabularEditor3

Bug reports, feature requests, discussion and documentation for Tabular Editor 3 (commercial version).
64 stars 7 forks source link

Enable Metadata Sort Order in TOM Explorer #505

Open ruve1k opened 2 years ago

ruve1k commented 2 years ago

Feature Request: Enable Metadata Sort Order in TOM Explorer. TE2 has a button to toggle between alphabetical/metadata ordering of items. I would expect to have the same (or better) functionality in TE3.

otykier commented 2 years ago

May I ask what benefit you expect from being able to show items by metadata order? To my knowledge, the metadata order does not have any semantic meaning.

ruve1k commented 2 years ago

In many industries or businesses the financial measures (or tables or columns) have a logical order in which they are generally presented. When developing a solution these objects are approached in a similar order and the expectation is to see them presented in that same order (metadata order or data source order). I understand that client tools are currently limited to displaying objects in alphabetical order (which is a shame and completely baffles me) but at least in the development phase it would be helpful to be able to see objects in a more intuitive order (as dictated by the metadata order).

otykier commented 2 years ago

@ruve1k thanks for clarifying.

Are you aware that Analysis Services may change the order of any object within the JSON at any time? For example, when deploying a model to Analysis Services and then extracting the TMSL/JSON at a later time, there is no guarantee that objects appear within the JSON in the original order - this has been a common cause for source control merge conflicts for years, which is why Tabular Editor provides an option for splitting model objects into individual files. For objects where ordinality matters, the objects themselves have an "Ordinal" property (i.e. hierarchy levels, calculation items, etc.), which can be set through Tabular Editor, and in that case, the objects are displayed by ordinal rather than alphabetical within the tool. As such, applications or users should never rely on other types of objects appearing in a particular order within the metadata.

For this reason, we are hesitant to add the metadata ordering feature within TE, as it could lead developers to think that the order of objects within the metadata conveys some kind of meaning, and is always fixed. Of course, if we get multiple requests for this feature, we will certainly reconsider.

I understand the request for being able to order objects in a certain way, e.g. for development/housekeeping purposes. Personally, when I need to guide end-users through a large number of measures in a certain way, I typically group them into Display Folders with a numbered prefix, but there are other ways to solve this issue as well. For example, you could add an otherwise unused culture to the model, and then apply numbered prefixes to the translated objects names, whereby you can control the order in which the objects appear in Tabular Editor, when selecting that specific translation from the dropdown in the TOM Explorer.

ruve1k commented 2 years ago

I was not aware that AS may change the order of objects in the JSON. Good to know for future code comparisons/merges. But if the code base is maintained outside of AS then nothing will change the object order so it should be safe..

Perhaps you could provide a configuration setting to enable this feature for those used to utilizing it in TE2 but not showcase it so as not to mislead others to rely on it in an unintended way.

I'll explore utilizing a translation with numbered prefixes to use during development.