Skip to content

Conversation

@MadhuVK
Copy link
Contributor

@MadhuVK MadhuVK commented Nov 11, 2025

Short description of the changes

Upgrade the Derived Column validator to recognize the new infix notation.

  • Derived Columns are also known as Calculated Fields in the Honeycomb product.

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:

  • Create a resource with a Derived Column using new infix notation

Documentation

https://docs.honeycomb.io/reference/calculated-field-formula/syntax/
https://docs.honeycomb.io/reference/derived-column-formula/syntax/

@MadhuVK MadhuVK force-pushed the madhuvk.infix-support branch 2 times, most recently from 1199351 to 113a3a7 Compare November 17, 2025 20:52
@MadhuVK MadhuVK force-pushed the madhuvk.infix-support branch from 113a3a7 to 74d9929 Compare November 17, 2025 21:03
@MadhuVK MadhuVK marked this pull request as ready for review November 17, 2025 22:10
@MadhuVK MadhuVK requested a review from a team as a code owner November 17, 2025 22:10
Copy link
Contributor

@jharley jharley left a 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:

  1. The provider is still using the old "derived column" terminology so updating the PR name and description to reflect that would be good
  2. 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.
  3. the documentation for the resource itself should be updated also (docs/resources/derived_column.md)

$duration_ms,
300
)
$duration_ms < 300
Copy link
Contributor

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

Copy link
Contributor Author

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.

@MadhuVK MadhuVK changed the title feat(calculated fields): Infix notation support feat(derived columns): Infix notation support Nov 17, 2025
@MadhuVK MadhuVK changed the title feat(derived columns): Infix notation support feat(derived-columns): Infix notation support Nov 17, 2025
@MadhuVK MadhuVK force-pushed the madhuvk.infix-support branch from aa625db to 3f542b2 Compare November 18, 2025 00:21
@MadhuVK
Copy link
Contributor Author

MadhuVK commented Nov 18, 2025

@jharley updated:

  1. Stuck with Derived Column verbiage, but cross-reference the new product name, and provide both relevant documentation links.
  2. Removed mixing notation - IF/EXISTS don't have an equivalent so continue to use them.
  3. I didn't make any augmentations to the TF provider resource docs - the current example is just LOG10($foo) and already has a reference to the syntax docs that reference the new notation + equivalents.
    i. Is there something specific you wish to see here? Happy to expand out a bit with a more complete example if you think its appropriate.
    ii. https://registry.terraform.io/providers/honeycombio/honeycombio/latest/docs/resources/derived_column

@MadhuVK MadhuVK requested a review from jharley November 18, 2025 00:24
@jharley
Copy link
Contributor

jharley commented Nov 18, 2025

@MadhuVK thank you! Looks like a test is failing now though so something tidy up.

Is there something specific you wish to see here?

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.

Copy link
Contributor

@jharley jharley left a 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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MadhuVK MadhuVK merged commit 954c316 into main Nov 18, 2025
7 checks passed
@MadhuVK MadhuVK deleted the madhuvk.infix-support branch November 18, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants