Axiom Processing Language (APL)
This section explains how to use the Axiom Processing Language to get deeper insights from your data.
The Axiom Processing Language (APL) is a query language that is perfect for getting deeper insights from your data. Whether logs, events, analytics, or similar, APL provides the flexibility to filter, manipulate, and summarize your data exactly the way you need it.
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.
Delimit operators with the pipe character (|
).
A typical APL query has the following structure:
DatasetName
is the name of the dataset you want to query.Operator
is 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
let
statement.
Example query
The query above uses a dataset called github-issue-comment-event
as its data source. It uses the follwing operators:
- extend adds a new field
isBot
to the query results. It sets the values of the new field to true if the values of theactor
field in the original dataset contain-bot
or[bot]
. - where filters for the values of the
isBot
field. It only returns rows where the value is true. - summarize aggregates the data and produces a chart.
Each operator is separated using the pipe character (|
).
Example result
As a result, the query returns a chart and a table. The table counts the different values of the actor
field where isBot
is true, and the chart displays the distribution of these counts over time.
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 (
-
)
To quote the dataset or field in your APL query, enclose its name with quotation marks ('
or "
) and square brackets ([]
). For example, ['my-field']
.
For more information on rules about naming and quoting entities, see Entity names.
What’s next
Check out the list of sample queries or explore the supported operators and functions:
Was this page helpful?