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

Math model error handling #23125

Closed
kibanamachine opened this issue Aug 9, 2018 · 10 comments
Closed

Math model error handling #23125

kibanamachine opened this issue Aug 9, 2018 · 10 comments
Labels
bug Fixes for quality problems that affect the customer experience Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@kibanamachine
Copy link
Contributor

Original comment by @alexfrancoeur:

aug-09-2018 08-22-38

I can't copy and paste the actual error, but I believe it looks like it's related to attempting to use the demo data instead of the new values. We shouldn't error out like this. Bare minimum, we should make the element empty like other elements. Ideally, we'd be more intelligent about it and use one of the new values.

screen shot 2018-08-09 at 8 24 11 am

@kibanamachine
Copy link
Contributor Author

Original comment by @rashidkpc:

I'm going to leave beta off of this, fixing this before beta isn't realistic.

@kibanamachine
Copy link
Contributor Author

Original comment by @alexfrancoeur:

If we're relying on SQL for aggregations and expect most of our users will want to use this Metric element to show aggregations, shouldn't we fix this experience? I guess at the end of the day it works, so I can understand the want to remove the beta label. It's just not ideal showing an error for this element type where we show a blank element for others. I guess there are bigger fish to fry. I have a feeling this will be a commonly seen bug though.

@kibanamachine
Copy link
Contributor Author

Original comment by @cqliu1:

So here's what I came across when I was testing it with SELECT SUM(bytes) FROM logstash* as my query.

It looks like the issue is the math model is still trying to run the unique(country) aggregation, but it's complaining that your new datasource doesn't have a country field. So you'd need to update the column to resolve that error.

screen shot 2018-08-09 at 12 13 49 pm

After setting the column, another issue I came across is the math model doesn't have value as option which forces you to do an aggregation on your aggregation, so we should add value back as an option in the dropdown menu.

screen shot 2018-08-09 at 12 25 49 pm

The last issue I ran is that the name of the column SUM(bytes) is being treated as a math expression instead of a field name because it contains parentheses, so it's trying to evaluate a sum aggregation on the field bytes (which doesn't exist in this case), instead of grabbing the value of the field SUM(bytes).

screen shot 2018-08-09 at 12 26 36 pm

A quick fix for this is to alias the aggregation in the sql query with something like SELECT sum(bytes) as total_bytes FROM logstash*.

Proposed fixes:

  • add value to math modal
  • replace ()s with an _ in field names

@kibanamachine
Copy link
Contributor Author

Original comment by @cqliu1:

Re: LINK REDACTED I'm reopening this issue. We still need to address what should happen to the args when switching datasources, like defaulting to the first available column.

@kibanamachine
Copy link
Contributor Author

Original comment by @alexfrancoeur:

@rashidkpc @cqliu1 I added a beta label to this. I'm able to replicate for non-SQL data sources as well. I really think this will be one of the most used elements in Canvas out of the gate and it is so confusing to receive an error when you haven't done anything wrong. Is the scope really that large?

@kibanamachine
Copy link
Contributor Author

Original comment by @rashidkpc:

The fix, eg, make it work like pointseries, is non-trivial as it's a conceptual problem. An empty table, which is what pointseries is, is just an empty table. Tables can exist without data. Single numbers are a bit different. A number can not exist without a number in it. 0 isn't right, as 0 is a valid number with meaning. For example, not knowing the number of errors is not the same as 0 errors.

The fix here is to make the error dialog less jarring. There is nothing the math function can output without a valid input that would make sense. We just need to tell the user they need to fix their input.

@kibanamachine
Copy link
Contributor Author

Original comment by @alexfrancoeur:

I'd be fine with a less jarring error that is specific to the metric vis vs. the math function. Is that something we could do before beta or still non-trivial?

@kibanamachine
Copy link
Contributor Author

Original comment by @rashidkpc:

If the requirement is that the error be specific to the metric vis, no, this is not something we could do before beta.

@kibanamachine
Copy link
Contributor Author

Original comment by @alexfrancoeur:

Honestly, I'm just looking to improve this experience in any way. I built this entire workpad using nothing but SQL and metrics from the UI last night. The experience was great with two exceptions. The first is this error. It would pop up with every metric I created. Which is fine after awhile, you learn to deal with it. But the initial experience is pretty poor, showing an error when you've done nothing wrong. The second was formatting a number, that's being tracked in LINK REDACTED

screen shot 2018-08-27 at 8 27 43 pm

I'm open to any ideas that will not surface in an error or at least a more descriptive error. If we can't fix in beta, I think this is definitely a blocker for GA.

@kibanamachine kibanamachine added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas bug Fixes for quality problems that affect the customer experience labels Sep 14, 2018
@alexfrancoeur
Copy link

We already addressed the error handling and have #23111 opened for number format. Closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

2 participants