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

improve semantic manifest error message #10128

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Klimmy
Copy link

@Klimmy Klimmy commented May 10, 2024

resolves #9849

Problem

Improves this error message to provide more details as to what is wrong with the Semantic Manifest.

Solution

This PR moved the raising of an error to the validate() method and made it return None instead of bool.
From what I checked, this behavior aligns with other validations in the project (example_1, example_2, example_3).

Before the fix:

Encountered an error:
Parsing Error
  Semantic Manifest validation failed.

After the fix:

Encountered an error:
Parsing Error
  Semantic Manifest validation failed due to the following:
  - Invalid name `metric_time` - this name is reserved by MetricFlow. Reason: Used as the query input for creating time series metrics from measures with different time dimension names.
  - The semantic model orders contains dimensions, but it does not define a primary entity. Either add an entity with type PRIMARY or set a value for the primary_entity key.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc)
  • This PR includes type annotations for new and modified functions

@cla-bot cla-bot bot added the cla:yes label May 10, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@Klimmy Klimmy marked this pull request as ready for review May 13, 2024 16:51
@Klimmy Klimmy requested a review from a team as a code owner May 13, 2024 16:51
@github-actions github-actions bot added the community This PR is from a community member label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes community This PR is from a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Improve Semantic Manifest parsing error message
1 participant