Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
Build an APL query
APL queries consist of the following:- Data source: The most common data source is one of your Axiom datasets.
- Operators: Operators filter, manipulate, and summarize your data.
|).
A typical APL query has the following structure:
DatasetNameis the name of the dataset you want to query.Operatoris an operation you apply to the data.
Apart from Axiom datasets, you can use other data sources:
- External data sources using the externaldata operator.
- Specify a data table in the APL query itself using the
letstatement.
Example query
github-issue-comment-event as its data source. It uses the following operators:
- extend adds a new field
isBotto the query results. It sets the values of the new field to true if the values of theactorfield in the original dataset contain-botor[bot]. - where filters for the values of the
isBotfield. It only returns rows where the value is true. - summarize aggregates the data and produces a chart.
|).
Example result
As a result, the query returns a chart and a table. The table counts the different values of theactor field where isBot is true, and the chart displays the distribution of these counts over time.
| actor | count_ |
|---|---|
| github-actions[bot] | 487 |
| sonarqubecloud[bot] | 208 |
| dependabot[bot] | 148 |
| vercel[bot] | 91 |
| codecov[bot] | 63 |
| openshift-ci[bot] | 52 |
| coderabbitai[bot] | 43 |
| netlify[bot] | 37 |
The query results are a representation of your data based on your request. The query doesn’t change the original dataset.
Quote dataset and field names
If the name of a dataset or field contains at least one of the following special characters, quote the name in your APL query:- Space (
) - Dot (
.) - Dash (
-)
' or ") and square brackets ([]). For example, ['my-field'].
For more information on rules about naming and quoting entities, see Entity names.