Skip to content

Buildnote Query Language (BNQL) ​

Buildnote Query Language (BNQL) is a SQL-like language for querying your data. You can use it through the Data API, the Query page in the app, or the MCP server.

SELECT ​

sql
SELECT field1, field2 [AS alias]
FROM <table>
[WHERE condition [AND|OR condition ...]]
[SINCE 'yyyy-MM-dd HH:mm:ss[.SSS]']
[UNTIL 'yyyy-MM-dd HH:mm:ss[.SSS]']
[GROUP BY field1, field2, ...]
[ORDER BY field [ASC|DESC] [, ...]]
[LIMIT n]
[FORMAT format]

List the fields you want returned, or use * to select all fields.

Supported aggregate functions:

FunctionDescription
AVG(field)Average of all values
COUNT()Count of all values
DISTINCT(field)Select distinct values
DISTINCT_COUNT(field)Count of distinct values
MAX(field)Maximum value
MIN(field)Minimum value
P001(field)0.1th percentile
P01(field)1st percentile
P05(field)5th percentile
P10(field)10th percentile
P20(field)20th percentile
P25(field)25th percentile (Q1)
P50(field)50th percentile (median)
P75(field)75th percentile (Q3)
P80(field)80th percentile
P90(field)90th percentile
P95(field)95th percentile
P99(field)99th percentile
P999(field)99.9th percentile
SUM(field)Sum of all values

Conditional aggregate functions only aggregate the rows that match an inline condition. The condition uses the same syntax as WHERE, and you can use scalar functions in both arguments.

FunctionDescription
AVGIF(field, condition)Average of values where condition is true
COUNTIF(condition)Count of rows where condition is true
MAXIF(field, condition)Maximum value where condition is true
MINIF(field, condition)Minimum value where condition is true
SUMIF(field, condition)Sum of values where condition is true
sql
SELECT SUMIF(duration, status = 'successful') AS total_successful FROM tests
SELECT SUMIF(toNumber(value), toNumber(value) > 0) AS positive_sum FROM properties

Supported scalar functions:

FunctionDescription
formatDateTime(time, format)Format a datetime value using a format string
formatDuration(ms)Format millisecond duration as a human-readable string
formatPercentage(ratio)Format a ratio (0.0 to 1.0) as a percentage string
toNumber(value)Convert string to number (Float64) value
toString(value)Convert value to string

You can nest scalar functions and combine them with aggregate functions:

sql
SELECT toNumber(value) AS num FROM properties
SELECT toString(duration) AS dur_str FROM tests
SELECT AVG(toNumber(value)) AS avg_num FROM properties
SELECT toString(SUM(duration)) AS total_str FROM tests
SELECT toString(toNumber(toString(duration))) AS converted FROM tests

Arithmetic expressions ​

Write arithmetic expressions in parentheses. They support +, -, * and / with standard precedence. Each part of an expression can be a number literal, a field reference or any function call, including aggregates.

sql
SELECT (duration / 1000) AS secs FROM tests
SELECT (AVG(duration) / 1000) AS avg_secs FROM tests
SELECT ((MAX(duration) - MIN(duration)) / 1000) AS range_secs FROM tests
SELECT (1 + toNumber('12')) AS x FROM tests

Precedence follows standard arithmetic rules: * and / bind tighter than + and -. Use inner parentheses to change the order, as in ((a + b) * c).

AS ​

Use AS to give a field or aggregate expression an alias. You can then refer to the alias in ORDER BY and GROUP BY.

sql
SELECT field AS alias            
SELECT aggregateFn(field) AS alias

FROM ​

Available tables:

TableDescription
buildsEvents related to builds
commitsCommits pushed to tracked branches
deploymentsDeployments to tracked environments
filesFiles collected during build runs
guardrailsGuardrail verdicts produced by the Buildnote CLI
modulesBuild modules tracked across your projects
orgsOrganizations in your account
projectsProjects within your organizations
propertiesCustom properties submitted to builds
pull_requestsPull requests
refsBuild refs tracked across your modules
tagsTags tracked across your builds
testsIndividual test results from build runs

WHERE ​

Filters rows. Combine conditions with AND and OR.

OperatorDescription
=Equal
!=Not equal
<>Not equal (alternative syntax)
<Less than
>Greater than
<=Less than or equal
>=Greater than or equal
INMatches any value in a list
CONTAINS(field, value)True if the field contains the substring
NOT(condition)Negates a condition
sql
SELECT * FROM tests WHERE status IN ('running', 'successful', 'failed', 'skipped', 'cancelled', 'unknown', 'warning', 'info')
SELECT * FROM tests WHERE duration IN (1, 2, 3)
SELECT * FROM tests WHERE CONTAINS(name, 'login')
SELECT * FROM tests WHERE CONTAINS(name, 'login') AND status = 'failed'
SELECT COUNTIF(CONTAINS(name, 'login')) AS cnt FROM tests
SELECT * FROM tests WHERE NOT(status = 'failed')
SELECT * FROM tests WHERE NOT(CONTAINS(name, 'flaky')) AND ref = 'main'

SINCE / UNTIL ​

Filters rows by event timestamp. Both bounds are inclusive.

ClauseDescription
SINCE 'datetime'Include only events at or after this timestamp
UNTIL 'datetime'Include only events at or before this timestamp

Accepted formats:

FormatExample
yyyy-MM-dd HH:mm:ss'2024-01-15 09:00:00'
yyyy-MM-dd HH:mm:ss.SSS'2024-01-15 09:00:00.000'
yyyy-MM-dd'2024-01-15' (treated as 00:00:00 UTC)

GROUP BY ​

Groups rows so aggregates are computed per group. You need it when SELECT mixes aggregate and non-aggregate fields.

sql
GROUP BY field1
GROUP BY field1, field2

ORDER BY ​

Sorts results by one or more fields. The direction defaults to ASC.

DirectionDescription
ASCAscending order (smallest to largest)
DESCDescending order (largest to smallest)

FORMAT ​

Sets the output format. Defaults to JSONL.

FormatDescription
CSVComma-separated values
JSONJSON object with results array
JSONLNewline-delimited JSON
MARKDOWNMarkdown table
PRETTYHuman-readable table
TSVTab-separated values

Examples ​

List modules sorted alphabetically:

sql
SELECT org, project, module FROM modules ORDER BY module ASC LIMIT 100

Average duration of failed tests per project, sorted slowest first:

sql
SELECT org, project, AVG(duration) AS avg_dur FROM tests
WHERE status = 'failed'
GROUP BY org, project
ORDER BY avg_dur DESC
LIMIT 50
FORMAT CSV

Average numeric property value per build:

sql
SELECT build, AVG(toNumber(value)) AS avg_value FROM properties
WHERE name = 'coverage'
GROUP BY build
ORDER BY avg_value DESC

Failed tests in a date range:

sql
SELECT org, project, name, duration FROM tests
WHERE status = 'failed'
SINCE '2024-01-01'
UNTIL '2024-01-31'
ORDER BY duration DESC
LIMIT 100

P95 test duration per project since a specific datetime:

sql
SELECT project, P95(duration) AS p95_dur FROM tests
SINCE '2024-06-01 00:00:00'
GROUP BY project
ORDER BY p95_dur DESC

Successful and failed duration totals in a single query:

sql
SELECT
  SUMIF(duration, status = 'successful') AS total_successful_ms,
  SUMIF(duration, status = 'failed') AS total_failed_ms
FROM tests
WHERE ref = 'main'

P95 duration in seconds and the range (max minus min) per project:

sql
SELECT
  project,
  (P95(duration) / 1000) AS p95_secs,
  ((MAX(duration) - MIN(duration)) / 1000) AS range_secs
FROM tests
GROUP BY project
ORDER BY p95_secs DESC

Functions ​

Aggregate functions ​

AVG(field) ​

Average of all values

ParameterDescription
fieldNumeric field or expression to average

Returns the arithmetic mean of all non-null values.

sql
SELECT AVG(duration) FROM tests
SELECT AVG(duration) AS avg_dur FROM tests GROUP BY project

COUNT() ​

Count of all values

Returns the number of rows. Accepts a field name or *.

sql
SELECT COUNT(*) FROM tests
SELECT COUNT(name) FROM tests

DISTINCT(field) ​

Select distinct values

ParameterDescription
fieldField to return unique values of

Returns only unique values of the field.

sql
SELECT DISTINCT(status) FROM tests

DISTINCT_COUNT(field) ​

Count of distinct values

ParameterDescription
fieldField to count unique values of

Returns the count of unique values.

sql
SELECT DISTINCT_COUNT(status) FROM tests

MAX(field) ​

Maximum value

ParameterDescription
fieldField or expression to find the maximum of

Returns the largest value.

sql
SELECT MAX(duration) FROM tests

MIN(field) ​

Minimum value

ParameterDescription
fieldField or expression to find the minimum of

Returns the smallest value.

sql
SELECT MIN(duration) FROM tests

P001(field) ​

0.1th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 0.1th percentile value. Useful for identifying the extreme low end of a distribution.

sql
SELECT P001(duration) FROM tests GROUP BY project

P01(field) ​

1st percentile

ParameterDescription
fieldNumeric field or expression

Returns the 1st percentile value.

sql
SELECT P01(duration) FROM tests GROUP BY project

P05(field) ​

5th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 5th percentile value.

sql
SELECT P05(duration) FROM tests GROUP BY project

P10(field) ​

10th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 10th percentile value.

sql
SELECT P10(duration) FROM tests GROUP BY project

P20(field) ​

20th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 20th percentile value.

sql
SELECT P20(duration) FROM tests GROUP BY project

P25(field) ​

25th percentile (Q1)

ParameterDescription
fieldNumeric field or expression

Returns the 25th percentile (first quartile). Half the values below the median fall below this point.

sql
SELECT P25(duration) FROM tests GROUP BY project

P50(field) ​

50th percentile (median)

ParameterDescription
fieldNumeric field or expression

Returns the median value. Half of all values fall below this point.

sql
SELECT P50(duration) FROM tests GROUP BY project

P75(field) ​

75th percentile (Q3)

ParameterDescription
fieldNumeric field or expression

Returns the 75th percentile (third quartile). Half the values above the median fall below this point.

sql
SELECT P75(duration) FROM tests GROUP BY project

P80(field) ​

80th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 80th percentile value.

sql
SELECT P80(duration) FROM tests GROUP BY project

P90(field) ​

90th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 90th percentile value. A common threshold for identifying slow outliers.

sql
SELECT P90(duration) FROM tests GROUP BY project

P95(field) ​

95th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 95th percentile value. Use to measure tail latency in performance-sensitive workloads.

sql
SELECT P95(duration) AS p95_dur FROM tests GROUP BY project

P99(field) ​

99th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 99th percentile value. Captures near-worst-case performance.

sql
SELECT P99(duration) AS p99_dur FROM tests GROUP BY project

P999(field) ​

99.9th percentile

ParameterDescription
fieldNumeric field or expression

Returns the 99.9th percentile value. Identifies extreme outliers in large datasets.

sql
SELECT P999(duration) AS p999_dur FROM tests GROUP BY project

SUM(field) ​

Sum of all values

ParameterDescription
fieldNumeric field or expression to sum

Returns the sum of all non-null values.

sql
SELECT SUM(duration) FROM tests

Conditional aggregate functions ​

AVGIF(field, condition) ​

Average of values where condition is true

ParameterDescription
fieldNumeric field or expression to average
conditionFilter condition. Only matching rows are included

Returns the average of field values for rows where the condition is true.

sql
SELECT AVGIF(duration, status = 'failed') AS avg_failed_ms FROM tests

COUNTIF(condition) ​

Count of rows where condition is true

ParameterDescription
conditionFilter condition. Rows where it is true are counted

Returns the count of rows where the condition is true.

sql
SELECT COUNTIF(status = 'failed') AS failed_count FROM tests

MAXIF(field, condition) ​

Maximum value where condition is true

ParameterDescription
fieldField or expression to find the maximum of
conditionFilter condition. Only matching rows are included

Returns the maximum field value among rows where the condition is true.

sql
SELECT MAXIF(duration, status = 'failed') AS max_failed_ms FROM tests

MINIF(field, condition) ​

Minimum value where condition is true

ParameterDescription
fieldField or expression to find the minimum of
conditionFilter condition. Only matching rows are included

Returns the minimum field value among rows where the condition is true.

sql
SELECT MINIF(duration, status = 'successful') AS min_successful_ms FROM tests

SUMIF(field, condition) ​

Sum of values where condition is true

ParameterDescription
fieldNumeric field or expression to sum
conditionFilter condition. Only matching rows are included

Returns the sum of field values for rows where the condition is true. The condition uses the same syntax as WHERE.

sql
SELECT SUMIF(duration, status = 'failed') AS failed_ms FROM tests

Scalar functions ​

formatDateTime(time, format) ​

Format a datetime value using a format string

ParameterDescription
timeDatetime field or expression to format
formatFormat string with %-placeholders, e.g. '%Y-%m-%d %H:%i:%S'

Formats a datetime value into a string using a format string. format must be a string literal.

Supported format placeholders:

PlaceholderDescriptionExample
%aabbreviated weekday name (Mon-Sun)Mon
%babbreviated month name (Jan-Dec)Jan
%cmonth as an integer number (01-12)01
%Cyear divided by 100 and truncated to integer (00-99)20
%dday of the month, zero-padded (01-31)02
%Dshort MM/DD/YY date, equivalent to %m/%d/%y01/02/18
%eday of the month, space-padded (1-31)2
%ffractional second123456
%Fshort YYYY-MM-DD date, equivalent to %Y-%m-%d2018-01-02
%gtwo-digit year format, aligned to ISO 860118
%Gfour-digit year format for ISO week number2018
%hhour in 12h format (01-12)09
%Hhour in 24h format (00-23)22
%iminute (00-59)33
%Ihour in 12h format (01-12)10
%jday of the year (001-366)002
%khour in 24h format (00-23)14
%lhour in 12h format (01-12)09
%mmonth as an integer number (01-12)01
%Mfull month name (January-December)January
%nnew-line character
%pAM or PM designationPM
%Qquarter (1-4)1
%r12-hour HH:MM AM/PM time, equivalent to %h:%i %p10:30 PM
%R24-hour HH:MM time, equivalent to %H:%i22:33
%ssecond (00-59)44
%Ssecond (00-59)44
%thorizontal-tab character
%TISO 8601 time format (HH:MM:SS), equivalent to %H:%i:%S22:33:44
%uISO 8601 weekday as number with Monday as 1 (1-7)2
%VISO 8601 week number (01-53)01
%wweekday as an integer number with Sunday as 0 (0-6)2
%Wfull weekday name (Monday-Sunday)Monday
%yyear, last two digits (00-99)18
%Yyear2018
%ztime offset from UTC as +HHMM or -HHMM-0500
%%a % sign%
sql
SELECT formatDateTime(timestamp, '%Y-%m-%d') AS day FROM tests
SELECT formatDateTime(timestamp, '%Y-%m-%d %H:%i:%S') AS moment FROM tests

formatDuration(ms) ​

Format millisecond duration as a human-readable string

ParameterDescription
msDuration in milliseconds

Formats a millisecond integer as a compact human-readable string. Only the most significant parts are shown: hours+minutes, minutes+seconds, or seconds+milliseconds. Negative values are prefixed with -. Zero returns '0ms'.

Examples: '2h 5m', '3m 45s', '12s 500ms'.

sql
SELECT formatDuration(duration) AS dur FROM tests

formatPercentage(ratio) ​

Format a ratio (0.0 to 1.0) as a percentage string

ParameterDescription
ratioRatio value between 0.0 and 1.0

Formats a ratio (0.0 to 1.0) as a human-readable percentage string. For example, 0.234 becomes '23.4%'.

sql
SELECT formatPercentage(COUNTIF(status = 'failed') / COUNT(*)) AS failure_rate FROM tests

toNumber(value) ​

Convert string to number (Float64) value

ParameterDescription
valueString field or expression to convert to Float64

Converts a string field to a Float64 number. Returns nan for non-numeric input. Required before applying numeric aggregate functions to string-typed fields.

sql
SELECT AVG(toNumber(value)) FROM properties WHERE name = 'coverage'

toString(value) ​

Convert value to string

ParameterDescription
valueField or expression to convert to string

Converts any value to its string representation. Useful for output formatting or wrapping numeric fields before string operations.

sql
SELECT toString(duration) AS dur_str FROM tests

Tables ​

builds ​

Events related to builds

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
nameStringBuild stage name
urlStringBuild stage URL
typeStringBuild event type
started_atStringBuild event start time
completed_atStringBuild event completion time
runner_labelsStringComma-separated list of runner labels

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

name ​

Build stage name

Name of the build stage or job.

sql
SELECT name, duration FROM builds ORDER BY duration DESC LIMIT 20

url ​

Build stage URL

URL of the build stage, typically a link to the CI job run.

sql
SELECT name, url FROM builds WHERE status = 'failed'

type ​

Build event type

Category of the build event (e.g. pipeline, stage, job).

sql
SELECT type, COUNT(*) AS total FROM builds GROUP BY type

started_at ​

Build event start time

Timestamp when the build stage started, formatted as a string.

sql
SELECT name, started_at, completed_at FROM builds ORDER BY started_at DESC LIMIT 20

completed_at ​

Build event completion time

Timestamp when the build stage completed, formatted as a string.

sql
SELECT name, started_at, completed_at FROM builds ORDER BY completed_at DESC LIMIT 20

runner_labels ​

Comma-separated list of runner labels

Labels assigned to the CI runner that executed this build stage, returned as a comma-separated string.

sql
SELECT runner_labels, AVG(duration) AS avg_dur FROM builds GROUP BY runner_labels

commits ​

Commits pushed to tracked branches

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
messageStringCommit message
urlStringCommit URL
ref_urlStringRef URL
author_nameStringAuthor display name
author_usernameStringAuthor username
author_emailStringAuthor email address
committer_nameStringCommitter display name
committer_usernameStringCommitter username
committer_emailStringCommitter email address
pusher_nameStringPusher display name
pusher_usernameStringPusher username
pusher_emailStringPusher email address
pusher_avatar_urlStringPusher avatar URL
pusher_urlStringPusher profile URL
added_filesStringComma-separated list of added files
removed_filesStringComma-separated list of removed files
modified_filesStringComma-separated list of modified files

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

message ​

Commit message

The commit message.

sql
SELECT sha, message FROM commits ORDER BY timestamp DESC LIMIT 20

url ​

Commit URL

URL of the commit in the source control system.

sql
SELECT sha, url FROM commits WHERE ref = 'main'

ref_url ​

Ref URL

URL of the branch or tag in the source control system.

sql
SELECT ref, ref_url FROM commits GROUP BY ref, ref_url

author_name ​

Author display name

Display name of the commit author.

sql
SELECT author_name, COUNT(*) AS total FROM commits GROUP BY author_name ORDER BY total DESC

author_username ​

Author username

Username of the commit author.

sql
SELECT author_username, COUNT(*) AS total FROM commits GROUP BY author_username ORDER BY total DESC

author_email ​

Author email address

Email address of the commit author.

sql
SELECT author_email, COUNT(*) AS total FROM commits GROUP BY author_email ORDER BY total DESC

committer_name ​

Committer display name

Display name of the committer (the person who applied the commit).

sql
SELECT committer_name, COUNT(*) AS total FROM commits GROUP BY committer_name ORDER BY total DESC

committer_username ​

Committer username

Username of the committer.

sql
SELECT committer_username, COUNT(*) AS total FROM commits GROUP BY committer_username ORDER BY total DESC

committer_email ​

Committer email address

Email address of the committer.

sql
SELECT committer_email, COUNT(*) AS total FROM commits GROUP BY committer_email ORDER BY total DESC

pusher_name ​

Pusher display name

Display name of the person who pushed the commit.

sql
SELECT pusher_name, COUNT(*) AS total FROM commits GROUP BY pusher_name ORDER BY total DESC

pusher_username ​

Pusher username

Username of the pusher.

sql
SELECT pusher_username, COUNT(*) AS total FROM commits GROUP BY pusher_username ORDER BY total DESC

pusher_email ​

Pusher email address

Email address of the pusher.

sql
SELECT pusher_email, COUNT(*) AS total FROM commits GROUP BY pusher_email ORDER BY total DESC

pusher_avatar_url ​

Pusher avatar URL

Avatar URL of the pusher.

sql
SELECT pusher_username, pusher_avatar_url FROM commits GROUP BY pusher_username, pusher_avatar_url

pusher_url ​

Pusher profile URL

Profile URL of the pusher in the source control system.

sql
SELECT pusher_username, pusher_url FROM commits GROUP BY pusher_username, pusher_url

added_files ​

Comma-separated list of added files

Files added in this commit, as a comma-separated string.

sql
SELECT sha, added_files FROM commits WHERE ref = 'main' LIMIT 20

removed_files ​

Comma-separated list of removed files

Files removed in this commit, as a comma-separated string.

sql
SELECT sha, removed_files FROM commits WHERE ref = 'main' LIMIT 20

modified_files ​

Comma-separated list of modified files

Files modified in this commit, as a comma-separated string.

sql
SELECT sha, modified_files FROM commits WHERE ref = 'main' LIMIT 20

deployments ​

Deployments to tracked environments

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
environmentStringDeployment target environment
productionStringWhether the deployment targeted production (true/false)
categoryStringDeployment category (release, rollback, hotfix)
started_atStringDeployment start time
completed_atStringDeployment completion time
versionStringDeployed version or tag
nameStringDeployment name or description
urlStringDeployment URL

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

environment ​

Deployment target environment

Environment the deployment targeted (e.g. production, staging-eu).

sql
SELECT environment, COUNT(*) AS total FROM deployments GROUP BY environment

production ​

Whether the deployment targeted production (true/false)

Whether the deployment targeted production. Returned as the string true or false.

sql
SELECT COUNT(*) AS prod_deploys FROM deployments WHERE production = 'true' AND status = 'successful'

category ​

Deployment category (release, rollback, hotfix)

Kind of deployment: release (planned), rollback (revert to a previous version), or hotfix (unplanned corrective deploy).

sql
SELECT category, COUNT(*) AS total FROM deployments WHERE production = 'true' GROUP BY category

started_at ​

Deployment start time

Timestamp when the deployment started, formatted as a string.

sql
SELECT environment, started_at, completed_at FROM deployments ORDER BY started_at DESC LIMIT 20

completed_at ​

Deployment completion time

Timestamp when the deployment completed, formatted as a string. Empty while a deployment is still in progress.

sql
SELECT environment, started_at, completed_at FROM deployments ORDER BY completed_at DESC LIMIT 20

version ​

Deployed version or tag

Human-readable version or tag that was deployed (e.g. v1.2.3).

sql
SELECT version, environment, completed_at FROM deployments WHERE production = 'true' ORDER BY completed_at DESC

name ​

Deployment name or description

Human-readable name or description of the deployment.

sql
SELECT name, version, environment FROM deployments ORDER BY completed_at DESC LIMIT 20

url ​

Deployment URL

URL of the deployment, typically a link to the deploy page or CD tool run.

sql
SELECT environment, url FROM deployments WHERE status = 'failed'

files ​

Files collected during build runs

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
nameStringFile name
pathStringFile path
content_typeStringFile MIME content type
titleStringFile display title
sizeNumberFile size in bytes

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

name ​

File name

Name of the file.

sql
SELECT name, path FROM files ORDER BY timestamp DESC LIMIT 20

path ​

File path

Path of the file relative to the project root.

sql
SELECT path, content_type FROM files WHERE status = 'successful'

content_type ​

File MIME content type

MIME type of the file (e.g. text/plain, application/json).

sql
SELECT content_type, COUNT(*) AS total FROM files GROUP BY content_type

title ​

File display title

Optional human-readable title for the file.

sql
SELECT title, path FROM files WHERE title != ''

size ​

File size in bytes

Size of the file in bytes.

sql
SELECT name, size FROM files ORDER BY size DESC LIMIT 20

guardrails ​

Guardrail verdicts produced by the Buildnote CLI

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
guardrailStringGuardrail identifier (e.g. git/conventional-commits)
nameStringHuman-readable guardrail name
categoryStringGuardrail event category (run/check)
namespaceStringGuardrail namespace (the first segment of its id)
ruleStringWhich configured rule of the guardrail produced the verdict
versionStringVersion of the guardrail definition
severityStringGuardrail severity (error/warning/info)
violationsNumberNumber of violations found
skip_reasonStringWhy the guardrail was skipped
remediationStringHow to fix a violation
evidenceStringFirst violation messages, newline-joined

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

guardrail ​

Guardrail identifier (e.g. git/conventional-commits)

Namespaced identifier of the guardrail that produced the verdict, such as git/conventional-commits.

sql
SELECT guardrail, status, violations FROM guardrails WHERE build = '1234' AND category = 'check'

name ​

Human-readable guardrail name

Human-readable name of the guardrail, taken from its definition.

sql
SELECT name, status, violations FROM guardrails WHERE category = 'check' ORDER BY timestamp DESC LIMIT 20

category ​

Guardrail event category (run/check)

run for the event summarising one buildnote guardrails invocation, check for the verdict of a single guardrail.

sql
SELECT SUM(violations) AS total FROM guardrails WHERE category = 'run'

namespace ​

Guardrail namespace (the first segment of its id)

Namespace of the guardrail, which is the first segment of its id, such as git. Empty on a run event.

sql
SELECT namespace, COUNT(*) AS total FROM guardrails GROUP BY namespace ORDER BY total DESC

rule ​

Which configured rule of the guardrail produced the verdict

Tells apart two entries of the same guardrail in one configuration, derived from the with inputs of the entry that produced the verdict. Empty when the entry configured no inputs, which is most of them, so group by guardrail, rule rather than by rule alone.

sql
SELECT guardrail, rule, SUM(violations) AS total FROM guardrails WHERE category = 'check' GROUP BY guardrail, rule ORDER BY total DESC

version ​

Version of the guardrail definition

Version of the guardrail definition that produced the verdict.

sql
SELECT guardrail, version, COUNT(*) AS total FROM guardrails WHERE category = 'check' GROUP BY guardrail, version

severity ​

Guardrail severity (error/warning/info)

Severity the guardrail ran with: error, warning or info. A use entry can override the definition's own severity.

sql
SELECT guardrail, severity FROM guardrails WHERE status = 'failed' AND category = 'check'

violations ​

Number of violations found

Number of violations left after exemptions were applied. Zero when the guardrail passed or was skipped. A run row carries the total of every check in that run, so filter by category before summing.

sql
SELECT guardrail, SUM(violations) AS total FROM guardrails WHERE category = 'check' GROUP BY guardrail ORDER BY total DESC

skip_reason ​

Why the guardrail was skipped

Reason the guardrail could not gather its evidence. Empty unless the status is skipped.

sql
SELECT guardrail, skip_reason FROM guardrails WHERE status = 'skipped' AND category = 'check'

remediation ​

How to fix a violation

Markdown from the guardrail definition explaining how to fix a violation. Empty unless the check failed.

sql
SELECT guardrail, remediation FROM guardrails WHERE status = 'failed' AND category = 'check'

evidence ​

First violation messages, newline-joined

Up to five violation messages joined by newlines, truncated to 4 KB. Empty when the guardrail passed or was skipped.

sql
SELECT guardrail, evidence FROM guardrails WHERE status = 'failed' AND category = 'check' ORDER BY timestamp DESC LIMIT 10

modules ​

Build modules tracked across your projects

FieldTypeDescription
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

orgs ​

Organizations in your account

FieldTypeDescription
orgStringOrganization identifier

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

projects ​

Projects within your organizations

FieldTypeDescription
orgStringOrganization identifier
projectStringProject identifier

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

properties ​

Custom properties submitted to builds

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
nameStringProperty name
valueStringProperty value
typeStringProperty value type

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

name ​

Property name

Name of the property key.

sql
SELECT name, AVG(toNumber(value)) AS avg_value FROM properties GROUP BY name

value ​

Property value

Value of the property. Always returned as a string; use toNumber(value) to apply numeric aggregations.

sql
SELECT build, AVG(toNumber(value)) AS avg FROM properties WHERE name = 'coverage' GROUP BY build

type ​

Property value type

Data type of the property value (e.g. string, number).

sql
SELECT type, COUNT(*) AS total FROM properties GROUP BY type

pull_requests ​

Pull requests

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
numberStringPull request number
titleStringPull request title
messageStringPull request body/description
stateStringPull request state, as reported by the source
source_branchStringSource (head) branch
target_branchStringTarget (base) branch
authorStringPull request author username
urlStringPull request URL
mergedStringWhether the PR was merged (true/false)
draftStringWhether the PR is a draft (true/false)
created_atNumberCreation time (epoch millis)
merged_atNumberMerge time (epoch millis, 0 if not merged)
closed_atNumberClose time (epoch millis, 0 if open)
additionsNumberLines added
deletionsNumberLines deleted
changed_filesNumberFiles changed
commitsNumberNumber of commits
commentsNumberNumber of issue comments
review_commentsNumberNumber of review comments
labelsStringComma-separated list of labels

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

number ​

Pull request number

The pull request number, as assigned by the source.

sql
SELECT number, title, state FROM pull_requests WHERE state = 'merged'

title ​

Pull request title

Title of the pull request.

sql
SELECT number, title FROM pull_requests WHERE state = 'open'

message ​

Pull request body/description

Body of the pull request (the description text). Empty when the source reports none.

sql
SELECT number, title, message FROM pull_requests WHERE state = 'open'

state ​

Pull request state, as reported by the source

Lifecycle state of the pull request exactly as reported by the source. draft is a separate boolean flag, not a state.

sql
SELECT state, COUNT(*) AS total FROM pull_requests GROUP BY state

source_branch ​

Source (head) branch

Branch the changes come from.

sql
SELECT number, source_branch, target_branch FROM pull_requests

target_branch ​

Target (base) branch

Branch the changes will be merged into.

sql
SELECT target_branch, COUNT(*) AS total FROM pull_requests GROUP BY target_branch

author ​

Pull request author username

Username of the actor that opened the pull request.

sql
SELECT author, COUNT(*) AS total FROM pull_requests GROUP BY author ORDER BY total DESC

url ​

Pull request URL

Web URL of the pull request.

sql
SELECT number, url FROM pull_requests WHERE state = 'open'

merged ​

Whether the PR was merged (true/false)

Whether the pull request was merged. Returned as the string true or false.

sql
SELECT COUNT(*) AS merged FROM pull_requests WHERE merged = 'true'

draft ​

Whether the PR is a draft (true/false)

Whether the pull request is a draft. Returned as the string true or false.

sql
SELECT number, title FROM pull_requests WHERE draft = 'true'

created_at ​

Creation time (epoch millis)

Time the pull request was created, as milliseconds since the Unix epoch.

sql
SELECT number, created_at, merged_at FROM pull_requests WHERE merged = 'true'

merged_at ​

Merge time (epoch millis, 0 if not merged)

Time the pull request was merged, as epoch milliseconds. 0 when the PR is not merged.

sql
SELECT number, ((merged_at - created_at) / 1000) AS lead_secs FROM pull_requests WHERE merged = 'true'

closed_at ​

Close time (epoch millis, 0 if open)

Time the pull request was closed, as epoch milliseconds. 0 while the PR is open.

sql
SELECT number, closed_at FROM pull_requests WHERE state = 'closed'

additions ​

Lines added

Number of lines added. 0 when the source does not report it.

sql
SELECT number, additions, deletions FROM pull_requests ORDER BY additions DESC

deletions ​

Lines deleted

Number of lines deleted. 0 when the source does not report it.

sql
SELECT number, deletions FROM pull_requests ORDER BY deletions DESC

changed_files ​

Files changed

Number of files changed. 0 when the source does not report it.

sql
SELECT number, changed_files FROM pull_requests ORDER BY changed_files DESC

commits ​

Number of commits

Number of commits in the pull request. 0 when the source does not report it.

sql
SELECT number, commits FROM pull_requests ORDER BY commits DESC

comments ​

Number of issue comments

Number of issue comments on the pull request. 0 when the source does not report it.

sql
SELECT number, comments FROM pull_requests ORDER BY comments DESC

review_comments ​

Number of review comments

Number of review comments on the pull request. 0 when the source does not report it.

sql
SELECT number, review_comments FROM pull_requests ORDER BY review_comments DESC

labels ​

Comma-separated list of labels

Labels applied to the pull request, returned as a comma-separated string.

sql
SELECT number, labels FROM pull_requests WHERE state = 'open'

refs ​

Build refs tracked across your modules

FieldTypeDescription
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
refStringGit ref (branch or tag)

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

tags ​

Tags tracked across your builds

FieldTypeDescription
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
tagStringTag associated with collected event

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

tag ​

Tag associated with collected event

A single tag value from the event's tag list. Rows are expanded to one row per tag. Use it to filter or group by individual tags.

sql
SELECT tag, COUNT(*) AS total FROM tags GROUP BY tag ORDER BY total DESC
SELECT project, build FROM tags WHERE tag = 'smoke'

tests ​

Individual test results from build runs

FieldTypeDescription
timestampStringEvent timestamp (yyyy-MM-dd HH:mm:ss.SSS)
event_idStringEvent ID
entity_idStringEntity identifier (identifies same entities across builds)
orgStringOrganization identifier
projectStringProject identifier
moduleStringModule identifier
buildStringBuild identifier
shaStringGit commit SHA
refStringGit ref (branch or tag)
submitterStringSubmitter identifier
statusStringEvent status
tagsStringComma-separated list of tags
durationNumberDuration in milliseconds
source_typeStringSource tool type (e.g. junit, gradle)
source_urlStringSource URL
collector_idStringCollector identifier
collector_sourceStringCollector source name
typeStringTest category
nameStringTest name
classStringTest class name
suiteStringTest suite name
messageStringTest failure message

timestamp ​

Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)

Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.

sql
SELECT timestamp FROM tests ORDER BY timestamp DESC

event_id ​

Event ID

Unique identifier for the event. Useful for deduplication or referencing a specific event.

sql
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'

entity_id ​

Entity identifier (identifies same entities across builds)

Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.

sql
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'

org ​

Organization identifier

Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.

sql
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, project

project ​

Project identifier

Identifier of the project within the organization.

sql
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESC

module ​

Module identifier

Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.

sql
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESC

build ​

Build identifier

Identifier of the CI/CD build run that produced this event.

sql
SELECT build, COUNT(*) AS total, COUNTIF(status = 'failed') AS failed FROM tests GROUP BY build

sha ​

Git commit SHA

Full or abbreviated Git commit SHA associated with the build.

sql
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sha

ref ​

Git ref (branch or tag)

Git ref (branch name or tag) associated with the build.

sql
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESC

submitter ​

Submitter identifier

Identifier of the actor that submitted the event, typically a CI runner or user.

sql
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitter

status ​

Event status

Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown, warning, info.

sql
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESC

tags ​

Comma-separated list of tags

All tags associated with the event, returned as a comma-separated string. To filter or group by individual tags, use the tag field of the tags table.

sql
SELECT name, tags FROM tests WHERE status = 'failed'

duration ​

Duration in milliseconds

How long the event took, in milliseconds. On the tests table, this is the test's execution time.

sql
SELECT name, duration FROM tests WHERE status = 'successful' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY project

source_type ​

Source tool type (e.g. junit, gradle)

The type of tool that produced the event (e.g. junit, gradle, pytest).

sql
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_type

source_url ​

Source URL

URL pointing to the source of the event, such as a CI job or report artifact.

sql
SELECT name, source_url FROM tests WHERE status = 'failed'

collector_id ​

Collector identifier

Identifier of the Buildnote collector that ingested this event.

sql
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_id

collector_source ​

Collector source name

Name of the source integration or pipeline step that triggered the collector.

sql
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_source

type ​

Test category

Category of the test event (e.g. unit, integration, e2e).

sql
SELECT type, COUNT(*) AS total FROM tests GROUP BY type

name ​

Test name

Name of the individual test case.

sql
SELECT name, status, duration FROM tests WHERE status = 'failed' ORDER BY duration DESC

class ​

Test class name

Fully qualified class name containing the test.

sql
SELECT class, COUNT(*) AS failures FROM tests WHERE status = 'failed' GROUP BY class ORDER BY failures DESC

suite ​

Test suite name

Name of the test suite grouping the test case.

sql
SELECT suite, AVG(duration) AS avg_dur FROM tests GROUP BY suite ORDER BY avg_dur DESC

message ​

Test failure message

Failure message or error output from the test. Empty for passing tests.

sql
SELECT name, message FROM tests WHERE status = 'failed' LIMIT 50

Buildnote Limited
Registered in England and Wales, Reg: 16140412