Skip to main content

Query Builder

The Query Builder is a data exploration tool for creating custom graphs from your engineering data. Build queries by selecting measures, dimensions, time ranges, and filters — the chart renders automatically as you configure.

Written by Aika Apolinario
Updated today

Accessing the Query Builder

Navigate to More Reports > Query Builder from the left sidebar.

The subtitle reads: "Create custom graphs." A Learn more link is provided for additional documentation.


Building a Query

The Query Builder uses five fields to define what data to retrieve and how to display it:

Field

What it does

Example

Measures

The metric or value you want to calculate. Click the field and select from available measures.

All Pull Request Line Change 50 Percentile

Dimensions

How to group or break down the data. Click + Dimension to add.

Repository name, Team name, Author

Segment

Pre-defined data subsets to narrow your query. Click + Segment to add.

(Available segments depend on your data model)

Time

The time dimension and range for your query. Select a time field, date range, and granularity.

All Pull Request Updated At, for All time, by Day

Filters

Additional conditions to narrow results. Click + Filter to add.

Repository = specific repo, Team = specific team

Selected measures, dimensions, time fields, and filters appear as purple tags that can be removed by clicking the × on each tag.

You can add multiple measures to a single query by clicking the + button next to the Measures field.


Query Tabs

The Query Builder supports multiple queries in tabs. You start with Query 1 and can click the + button to add additional query tabs. This lets you build and compare different queries side by side without losing your previous work.


Chart Output

After configuring your query, click the purple Run button (bottom-right) to generate the chart. The chart appears below the query fields.

Chart Type

A chart type selector appears above the chart area. The default is Line chart. Click it to switch between chart types (line, bar, area, etc.).

Settings

Additional chart configuration options appear next to the chart type selector:

Setting

What it does

Pivot

Transpose rows and columns in the results

Order

Sort results by a specific field (ascending or descending)

Limit

Restrict the number of data points returned


Sharing Queries

Your query configuration is stored in the page URL. To share a specific query, copy the URL from your browser — anyone with access to Haystack DORA can open it and see the same query and chart.


Use Cases

Scenario

How to set it up

PR size trends over time

Measure: All Pull Request Line Change 50 Percentile, Time: Updated At by Week

Review time by repository

Measure: Review Time, Dimension: Repository name

Deployment frequency over time

Measure: Deployment count, Time: by Week

Compare throughput across teams

Measure: PR count, Dimension: Team name, Time: by Month


FAQ

Q: How far back can I query? A: You can query any data that Haystack has ingested. Select "All time" in the Time field for the full range, or set specific dates.

Q: Can I save a query for later? A: Query state is stored in the URL. Bookmark the page or copy the URL to return to the same query later.

Q: Can I combine multiple measures in one chart? A: Yes. Click the + button next to the Measures field to add additional measures to the same query.

Q: Why is the chart empty? A: You need at least one Measure selected. If a measure is selected but the chart is still empty, try adjusting the Time range or removing restrictive Filters.

Q: Who can access the Query Builder? A: Both Admin and Member roles can access it. The data available depends on which integrations and repositories are connected.

Did this answer your question?