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

catch pluck errors to warn about potential dimension ID/name conflicts #36

Open
jspeis opened this issue May 24, 2018 · 1 comment
Open

Comments

@jspeis
Copy link
Contributor

jspeis commented May 24, 2018

Per #35 , the goal would be to warn MR users of potential issues that can arise when two different IDs share the same name.

@hwchen
Copy link

hwchen commented Sep 27, 2018

More background, which I had written in another issue:

Puma caught this error: undefined method `[]' for nil:NilClass (NoMethodError)
/home/deploy/.rvm/gems/jruby-9.1.13.0/gems/mondrian-rest-1.0.0-java/lib/mondrian_rest/api_formatters.rb:104:in `block in pluck'
org/jruby/RubyArray.java:2486:in `map'
/home/deploy/.rvm/gems/jruby-9.1.13.0/gems/mondrian-rest-1.0.0-java/lib/mondrian_rest/api_formatters.rb:104:in `pluck'
/home/deploy/.rvm/gems/jruby-9.1.13.0/gems/mondrian-rest-1.0.0-java/lib/mondrian_rest/api_formatters.rb:63:in `block in tidy'

This is an error that happens when there's duplicate labels in a dimension and formatting into csv, jsonrecords (anything not default).

Root issue is duplicates in labels (not the ids!). So far we've just fixed the data and the error went away. This leads to a more permanent solution of enforcing unique membership in every single col of every dimension.

However, there's another issue. Why didn't the default json throw an error when confronted with duplicate labels!

My hazy recollection (perhaps documented elsewhere) is that mondrian would choose the last of the duplicate labels, while silently erasing the previous duplicates.

We should figure out how this can be dealt with within Mondrian and Mondrian-rest:

  • Is the older json handling version of Mondrian rest having similar issues?
  • Is there any way for mondrian-rest to identify this behavior? Or is this actually a problem in mondrian-rest handling duplicate labels?
  • If the issue is Mondrian, can Mondrian be configured differently, to either allow duplicate labels or enforce uniqueness without silently erroring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants