Skip to content
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

Inconsistency between SQL denormalizer and browser with flat dimensions #14

Closed
Stiivi opened this issue Nov 9, 2011 · 5 comments
Closed

Comments

@Stiivi
Copy link
Member

Stiivi commented Nov 9, 2011

Situation: physical model contains column year and a dimension is called date. Dimension is currently flat, containing only attribute year. Rected cube changes allow to browse flat dimensions just by dimension name, that would be date in this case. However, we want to browse is as no-flat dimension, that is as date.year.

@Stiivi
Copy link
Member Author

Stiivi commented Nov 9, 2011

Quick fix in backends.sql.browser.CubeQuery.column(): if dimension name is not the same as attribute name, then construct full name as if the dimension was not flat. This should be considered as temporary hack, until attribute naming is sorted out.

@Stiivi
Copy link
Member Author

Stiivi commented Mar 1, 2012

Explanation of reason why date.year instead of year in this case: Imagine a dimension that wants to be expanded in the future with more levels. What should be used?

Options with reasons:

  • Dimension is flat, therefore dimension name only
  • The attribute is named explicitly, therefore the attribute name should be used

Suggewsted solution:

  • use dimension name, to be consistent with all flat dimensions
  • allow physical-to-logical attribute mapping to override

One more note: if the original SQL denormalizer is used, then it creates this kind of logical name - explicitly naming dimension name.

@Stiivi
Copy link
Member Author

Stiivi commented Mar 2, 2012

New star-schema browser will contain attribute simplify_dimension_references, default will be True. When True then the logical attribute name for flat dimension without details will be just dimension name, otherwise it will be dimension.attribute even if that would mean to have type.type-like attributes.

@Stiivi
Copy link
Member Author

Stiivi commented Mar 10, 2012

#27 will fix this. Originally the denormalized browser was to be replaced, but there is use for it, so fix is a good thing.

@Stiivi
Copy link
Member Author

Stiivi commented Apr 26, 2012

This will be not fixed. Old browser will be replaced by StarBrowser.

@Stiivi Stiivi closed this as completed Apr 26, 2012
code6 pushed a commit to code6/cubes that referenced this issue Mar 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant