bound dimensions on metric nodes#622
Conversation
✅ Deploy Preview for thriving-cassata-78ae72 canceled.
|
There was a problem hiding this comment.
Looks like you ran the revision twice, you should be able to just delete this file.
|
@CircArgs VERY cool! It's awesome that the columns objects are actually linked in the metadata so we could probably very easily add in a check in the node update logic to prevent dropping a column in a transform if it's being used as a required dimension by any metrics. @agorajek can you take a look at this when you get a chance and see how this works for some of the use cases you had in mind? |
shangyian
left a comment
There was a problem hiding this comment.
Thanks for adding! I think the data models here all make sense.
Will this additionally need to modify the POST /nodes/metric endpoint so that someone creating a metric can set the bound dimensions of the metric? And presumably that would be where you do the check for whether their provided bound_dimensions are actually valid.
| ), | ||
| ) | ||
|
|
||
| # get dimension columns which are required |
There was a problem hiding this comment.
Does this need to additionally check if the user-provided dimensions overlap with the bound_dimensions set on the node?
Yeah I think that's a good place to do that validation. Can it be done in a follow-up PR? |
|
@CircArgs follow-up PR sounds good! |
* bound dimensions * pylint can't read * filter used dimensions from used bound dimensions
Summary
Adds an attribute to Metric Nodes that allow the author to specify that when the metric is used, some columns from the sourced node must be grouped by.
Test Plan
Unit test
make checkpassesmake testshows 100% unit test coverage