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

Handle derived metrics related to multiple models #176

Open
Vitor-Avila opened this issue Dec 22, 2022 · 2 comments
Open

Handle derived metrics related to multiple models #176

Vitor-Avila opened this issue Dec 22, 2022 · 2 comments

Comments

@Vitor-Avila
Copy link
Contributor

Current scenario

Currently, trying to sync a derived metric that relies on metrics from multiple models would fail with below error:

Metric {metricName} cannot be calculated because it depends on multiple models

This error prevents the sync from finishing successfully.

Suggested solution

Handle this scenario - some suggestions:

  • Notify the user as a warning that the metric wasn't created because of this reason, but properly finish the operation;
  • Create the metric on all target/involved datasets
  • Ability to specify the desired dataset that should receive this metric on Preset, using the meta field for the metric.
@dweaver33
Copy link

Are we saying that currently if we use a derived metric, that none of the metrics will be deployed to Preset?

@Vitor-Avila
Copy link
Contributor Author

Derived metrics in general are supported. The problem is when the metric derives from metrics from another models. For example, imagine you have:

  • model_a with metric_a
  • model_b with metric_b
  • model_c with a derived metric that uses metric_a and/or metric_b

Currently the CLI wouldn't be able to sync model_c, since it's using a metric that is associated with another model, so likely the columns used by this metric doesn't exist on this model and therefore it wouldn't be possible to create a metric like that on Superset (since the metric is created on the dataset level).

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