-
Notifications
You must be signed in to change notification settings - Fork 30
feat(derived-columns): Infix notation support #779
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
Conversation
1199351 to
113a3a7
Compare
113a3a7 to
74d9929
Compare
jharley
left a comment
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.
This looks pretty good, thank you! Couple of things:
- The provider is still using the old "derived column" terminology so updating the PR name and description to reflect that would be good
- I'm not sure we want to be encouraging mixing operator types from a best practises standpoint. I know it works, but people look to these examples as a guide.
- the documentation for the resource itself should be updated also (
docs/resources/derived_column.md)
| $duration_ms, | ||
| 300 | ||
| ) | ||
| $duration_ms < 300 |
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.
do we want to be encouraging people to mix forms? From a best practise standpoint that feels a bit messy to me
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.
Good point - I'll update the example to avoid mixing as much as possible.
- Some functions don't have an equivalent infix operator so things like IF(foo, bar) might continue to exist though.
aa625db to
3f542b2
Compare
|
@jharley updated:
|
|
@MadhuVK thank you! Looks like a test is failing now though so something tidy up.
Ah, you're right those examples just aren't great currently. :\ We can leave it as unless you have time to add a few examples. |
jharley
left a comment
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.
Nice ✨
| * `dataset` - (Required) The dataset this derived column is added to. If not set, an Environment-wide derived column will be created. | ||
| * `alias` - (Required) The name of the derived column. Must be unique per dataset. | ||
| * `expression` - (Required) The formula of the derived column. See [Derived Column Syntax](https://docs.honeycomb.io/reference/derived-column-formula/syntax/). | ||
| * `dataset` - (Optional) The dataset this derived column is added to. If not set, an Environment-wide derived column will be created. |
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.
Ah, nice catch! 🙏🏻
| ## Import | ||
|
|
||
| Derived columns can be imported using a combination of the dataset name and their alias, e.g. | ||
| Dataset-specific derived columns can be imported using a combination of the dataset name and their alias, e.g. |
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!
Short description of the changes
Upgrade the Derived Column validator to recognize the new infix notation.
Relevant Release: https://github.com/honeycombio/honeycomb-derived-column-validator/releases/tag/v0.1.0
How to verify that this has the expected result
Test automation should have a new infix notation DC
Smoke Test:
Documentation
https://docs.honeycomb.io/reference/calculated-field-formula/syntax/
https://docs.honeycomb.io/reference/derived-column-formula/syntax/