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

if a dimension column is changed in the model, it breaks the application #1450

Closed
hamilton opened this issue Dec 14, 2022 · 4 comments · Fixed by #1488
Closed

if a dimension column is changed in the model, it breaks the application #1450

hamilton opened this issue Dec 14, 2022 · 4 comments · Fixed by #1488
Labels
Team:Applications Applications Working Group

Comments

@hamilton
Copy link
Contributor

hamilton commented Dec 14, 2022

Steps to reproduce:

create this model –

WITH x as (
  select 1 as value, make_date(2010,1,1) as dt, 'a' as letter
  UNION ALL select 2 as value, make_date(2010,1,2) as dt, 'b' as letter
  UNION ALL select 2 as value, make_date(2010,1,2) as dt, 'a' as letter
  UNION ALL select 3 as value, make_date(2010,1,3) as dt, 'a' as letter
  UNION ALL select 3 as value, make_date(2010,1,3) as dt, 'b' as letter
)
SELECT * from x

Auto-generate a dashboard

Add EXCLUDE LETTER to model

go back to dashboard.

I would expect to see some kind of error that the dimension no longer exists.

@ericpgreen2
Copy link
Contributor

ericpgreen2 commented Dec 14, 2022

A couple hypotheses:

  1. When a model file is updated and PutFileAndReconcile is called, somehow errors are not returned for the downstream metrics.

  2. We need to call "reconcile" in every +page.ts file (the top-level entrypoint) to ensure up-to-date errors.

@AdityaHegde
Copy link
Collaborator

I debugged this a little. It is because we are setting errors only when yaml changes. The errors are available to the component but since yaml content didnt change it doesnt update the metrics object used in the downward components.

@hamilton
Copy link
Contributor Author

Thanks @AdityaHegde ~ seems like we can also have a check to see if the errors need to be updated and do so accordingly.

@hamilton
Copy link
Contributor Author

We found that this was because the model itself wasn't being invalidated in MetricsDefWorkspace ~ useRuntimeServiceGetCatalogEntry. It's possible that it's related to #1462 and in fact this model is being invalidated, so if it is, we may not be able to fix it.

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

Successfully merging a pull request may close this issue.

5 participants