-
Notifications
You must be signed in to change notification settings - Fork 14
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
Remove inconsistent Jinja param errors #309
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
courtneyholcomb
requested review from
QMalcolm,
graciegoheen and
a team
as code owners
July 8, 2024 21:27
courtneyholcomb
commented
Jul 8, 2024
@@ -16,15 +16,16 @@ | |||
|
|||
@dataclass(frozen=True) | |||
class DimensionCallParameterSet: | |||
"""When 'Dimension(...)' is used in the Jinja template of the where filter, the parameters to that call.""" | |||
"""When 'Dimension(...)' is used in a Jinja template, the parameters to that call.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed specificity to where filter here, since Jinja parsing is used elsewhere now, too.
DevonFulcher
approved these changes
Jul 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
courtneyholcomb
added a commit
to dbt-labs/metricflow
that referenced
this pull request
Jul 9, 2024
Upgrades DSI. This is needed to upgrade DSI in MFS. MFS does not depend on DSI directly, instead relying on MF to set the DSI dependency. The DSI upgrade is needed in MFS to get [this bug fix](dbt-labs/dbt-semantic-interfaces#309) released. [This is the PR](dbt-labs/metricflow-server#746) currently blocked by the upgrade.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Remove some errors related to Jinja objects. This will allow more flexible syntax. The main problem driving this change is that we have multiple places that parse the same Jinja syntax, but each has different behavior. This means that if you pass a certain syntax into a where filter, that same syntax won't work in a group by. In order to align the two, we must use the more permissive option, since adding new restrictions would be a breaking change. Changes here:
metric_time
is passed into aDimension(...)
object. This error creates inconsistent restrictions, not only between where & group by params, but within this where param. Before this change, it would only error if you passedmetric_time
intoDimension(...)
without a grain. If you include a grain, no error. Instead of raising this error, just allow it and MF will sort it out.Checklist
changie new
to create a changelog entry