Introduction to Dynatrace Query Language
Dynatrace Query Language is your communication channel with Dynatrace Grail.
Let’s start by reviewing some query language basics. Query languages are used for creating,
accessing, and modifying data from databases and other information systems.
You may be familiar with some of these common query languages:
Query languages usually have similar specifications and query structures, and a set of rules for
syntax that must be followed. For example, you may be familiar with a simple select
statement of the form: select – from – where.
It starts with a command, followed by what data to display, and from where, any conditions,
and ends with a semicolon that terminates the statement. The simple structure and syntax of
most query languages make them easy to learn.
DQL was created by Dynatrace for accessing data in Grail storage. It is more flexible than a
traditional language like SQL, as it was built for processing arbitrary event data, where an up-
front description of the data structure is not needed.
The exact commands and syntax may be different in DQL than they are in other languages,
but the overall concepts remain the same. For example, our simple select statement in SQL is
a fetch statement in DQL.
In other languages the similar statements are:
A where condition becomes a filter command in DQL: and specific fields can just be listed.
With DQL you can perform calculations and sorting, and group and aggregate results, to
transform records and produce new data points.
DQL is used to explore Grail observability data and perform analysis to discover patterns and
anomalies. You will use it to view and analyze Business Events, to pinpoint and retrieve Log
data, in Notebooks to create powerful, data-driven documents for custom analytics, to add
data and visualizations to Dashboards as tiles and filters, and to access, model, and report on
any data stored in the Grail lake house.