Derived columns allow you to define custom fields in a Dataset or an Environment. The field’s value is based on the result of an expression that performs functions, mathematical, and/or logical operations on other fields’ values; similar to expressions defined in a spreadsheet.
These derived columns are equivalent to other fields in your data. Use in query builder, boards, triggers, and Service Level Objectives (SLOs).
Use derived columns to express:
Derived columns exist in the schema of a Dataset or an Environment.
In Datasets, select a Dataset.
The Dataset Settings page displays several tabs.
Select the Schema tab.
Select Derived Columns to expand.
The schema displays a button to create a new derived column, a search box, and a list of any existing derived columns.
In the left navigation bar under the Honeycomb logo, select the Environments banner. A menu appears with Manage Environments and a list of existing Environments.
Select Manage Environments. The next screen displays a list of Environments and details about each Environment.
In the row of the target Environment, select the target Environment’s name. The next screen displays the Environment Settings page with several tabs.
Select the Schema tab.
The schema displays a button to create a new derived column, a search box, and a list of any existing derived columns.
Any team owner or member can create a derived column in the Honeycomb UI.
Create derived columns by accessing the Dataset’s schema, the Environment’s schema, or through query builder.
In Query Builder, select the GROUP BY clause.
A list of suggested fields appears automatically when selected with a mouse/trackpad or by pressing the down arrow on the keyboard.
Select Create Derived Column.
The “Create a Derived Column” editor appears.
Any team owner or member can edit a derived column in the Honeycomb UI.
Edit derived columns by accessing the Dataset’s schema or the Environment’s schema.
Select Edit for the derived column.
Changes to a derived column may effect boards, triggers, or SLOs.
If a dependency exists, an “Edit Derived Column” modal appears first and presents the choice to clone or continue with editing the derived column. If you are unsure whether to clone or edit the column, reach out to the most recent editor of the derived column.
Select Clone or Continue.
Clone creates an unsaved copy of the derived column with a new name in the editor. Continue opens the existing derived column in the editor.
Any team owner or member can clone a derived column in the Honeycomb UI.
Clone derived columns by accessing the Dataset’s schema or the Environment’s schema.
Select Clone next to the target derived column. The derived column editor appears.
An unsaved copy of the target derived column populates in the editor.
Modify the derived column name and formula as needed.
Select Continue to save.
The editor displays the following elements:
Only the derived column’s creator or a Team Owner can delete a derived column in the Honeycomb UI.
Delete derived columns by accessing the Dataset’s schema or the Environment’s schema.
Select Delete for the derived column.
Queries that use a derived column continue to work, but the alias no longer appears in the query builder. Changes to a derived column may effect boards, triggers, or SLOs. If any dependency exists, a “Delete Derived Column” modal presents a list of its dependencies.
To continue deletion, remove any objects dependent on the derived column.
Each object links directly to their respective editor. If you are unsure whether to remove the dependencies, reach out to the most recent editor of the dependent object.
Select Refresh Dependencies to reload the list after removing all dependencies.
A modal appears to confirm deletion of the derived column.
Select Delete to confirm deletion of the derived column.
A web server handles requests with varying sizes of content.
A query with GROUP BY content_length
returns a time series graph that displays the count for each value of content_length
.
The operations team wants to compare small requests to all other requests.
The team internally categorizes a small request as having a content_length
of less than or equal to 1000.
The team creates a derived column named smallRequest
with the function LTE($content_length, 1000)
.
A query with GROUP BY smallRequest
returns a time series graph that displays the small requests alongside the other requests.
An Environment named Production contains three Datasets named PaymentService, CheckoutService, and SupportService. The datasets all define a derived column with the same alias.
Dataset | Derived Column Alias | Expression |
---|---|---|
PaymentService | total_amount_in_usd | COALESCE($usd_total, ADD(MUL($tax_rate, $item_total), $fees)) |
CheckoutService | total_amount_in_usd | MUL($cart_total, $tax_rate) |
SupportService | total_amount_in_usd | SUM(0) |
A query across the Production Environment returns data for the:
total_amount_in_usd
values calculated with its expression.total_amount_in_usd
values calculated with its expression.total_amount_in_usd
values calculated with its expression.The Production Environment cannot define a derived column with the alias total_amount_in_usd
because the alias is already used by a derived column in one or more datasets.