-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: Metricflow and dbt Core #265
Conversation
This pull request has been linked to Shortcut Story #79017: Support for metrics definition in dbt Core 1.6 with the CLI. |
This is awesome!!! |
Followed below steps to test these changes:
|
except subprocess.CalledProcessError: | ||
return None |
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.
Now the CLI requires having metricflow
installed to properly retrieve the SQL syntax for metrics. I wonder if we can identify the error returned in case it's not installed (maybe something like command not found
and provide an error to the user instructing to install the package. We could raise it as an error to make sure a CI job would also show as failed so the user adds the specific metricflow
package (according to their engine) to their configurations.
We could also add the package to the list of requirements.
models = get_models_from_sql(sql, dialect, model_map) | ||
if len(models) > 1: | ||
return None |
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.
I'm working on this PR #266 and could potentially further improve it to also list at the end of the execution any failed metric (according to the limitations we currently have).
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 so much for working on this! I left some non-blocking comments.
Add support for Metricflow when using dbt Core sync.
Ran:
See datasets and metrics in https://49437123.us1a.app.preset.io.
Will update tests.