-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Record field usage during query execution #40494
Comments
High-level approach looks solid. I have a few ideas:
|
yep I'm not sure how useful is that either, but if the goal is to find all the fields that were used in the last 15 days then that that should be enough.
that's a good idea ! updated the schema. |
If we're not going to store any expression related data in v1 of this, maybe we should leave it out of the QP API? I imagine we can save us all some time if we don't require it. |
on the second thought, not sure what we can do with it since expression can have a high degree of freedom. |
Implemented in #39671 |
What
We want to record how fields are used during query execution. The schema for field usage.
Gathering field usage
We’ll rely on our friends over at the QP team and ask them to help us with an API that takes a query and returns field_usage. The schema for the output is:
Saving field usage
We already have a process that save query_execution asynchronously in
metabase/src/metabase/query_processor/middleware/process_userland_query.clj
Line 59 in cd1d3c7
For our task, we’ll extend
save-query-execution!*
to save field_usage.The text was updated successfully, but these errors were encountered: