Dynatrace DQL Query Writer
Writes correct, faster and cheaper Dynatrace DQL queries for logs, spans and metrics, avoiding syntax traps.
Claude's review
8/10 Official DQL guide with a sharp syntax-pitfall table and cost optimisation rules for a language Claude often gets wrong.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Core DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents syntax errors and makes queries faster, more efficient, and cheaper (less data scanned = lower query consumption/cost per run). Covers fetch commands, data models, field namespaces, time alignment, entity/smartscape patterns, metric discovery, and performance/cost optimization (filter early, bucket filters, short time ranges, field selection, sampling, cardinality). Trigger: "write/build/fix a DQL query", "DQL syntax", "query logs/spans/metrics", "create a timeseries", "optimize my DQL", "make my query faster/cheaper", "reduce DQL cost/consumption/scanned data", "keep DQL cost under control". Do NOT use to explain an existing query or answer product questions. For MONITORING a tenant's ACTUAL query consumption/billing (how much queries cost, who scanned most, cost trends) use dt-platform-costs — this tunes the query text, not billing data.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: dt-dql-essentials
description: "Core DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents syntax errors and makes queries faster, more efficient, and cheaper (less data scanned = lower query consumption/cost per run). Covers fetch commands, data models, field namespaces, time alignment, entity/smartscape patterns, metric discovery, and performance/cost optimization (filter early, bucket filters, short time ranges, field selection, sampling, cardinality). Trigger: \"write/build/fix a DQL query\", \"DQL syntax\", \"query logs/spans/metrics\", \"create a timeseries\", \"optimize my DQL\", \"make my query faster/cheaper\", \"reduce DQL cost/consumption/scanned data\", \"keep DQL cost under control\". Do NOT use to explain an existing query or answer product questions. For MONITORING a tenant's ACTUAL query consumption/billing (how much queries cost, who scanned most, cost trends) use dt-platform-costs — this tunes the query text, not billing data."
license: Apache-2.0
---
# DQL Essentials Skill
DQL is a pipeline-based query language. Queries chain commands with `|` to filter, transform, and aggregate data. DQL has unique syntax that differs from SQL — load this skill before writing any DQL query.
______________________________________________________________________
## When to Load References
Before working on specific tasks, load the relevant reference:
| Task | Required Reading |
| ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Discovering data | [references/discovery.md](references/discovery.md) |
| Field names, namespaces, data models, stability levels, query patterns | [references/semantic-dictionary.md](references/semantic-dictionary.md) |
| Query optimization — make a query faster / more efficient / cheaper, reduce consumption & scanned data (filter early, bucket filters, time ranges, field selection, sampling, cardinality) | [references/optimization.md](references/optimization.md) |
| Smartscape topology navigation for discovering relationships between entities | [references/smartscape-topology-navigation.md](references/smartscape-topology-navigation.md) |
| `summarize` and `makeTimeseries` patterns (bucketing, calendar months) | [references/summarization.md](references/summarization.md) |
| Array and timeseries manipulation (`arrayFilter`, `collectArray`, iterative) | [references/iterative-expressions.md](references/iterative-expressions.md) |
| Conditional logic (`if/else` chains), `coalesce`, string/date helpers | [references/useful-expressions.md](references/useful-expressions.md) |
| `in` operator (subquery), full `@` time alignment unit table | [references/operators.md](references/operators.md) |
| `matchesValue`, `matchesPhrase`, `matchesPattern`, `in()` — string pattern matching, regex, array matching, wildcards, case sensitivity | [references/string-matching.md](references/string-matching.md) |
______________________________________________________________________
## DQL Reference Index
Use this index to route from a function group (e.g. time functions, conversions) to its detailed spec, or from a function name to its spec file.
| Description | Items |
|-------------|-------|
| [Data Types](references/dql/dql-data-types.md) | `array`, `binary`, `boolean`, `double`, `duration`, `long`, `record`, `string`, `timeframe`, `timestamp`, `uid` |
| [Parameter Value Types](references/dql/dql-parameter-value-types.md) | `bucket`, `dataObject`, `dplPattern`, `entityAttribute`, `entitySelector`, `entityType`, `enum`, `executionBlock`, `expressionTimeseriesAggregation`, `expressionWithConstantValue`, `expressionWithFieldAccess`, `fieldPattern`, `filePattern`, `identifierForAnyField`, `identifierForEdgeType`, `identifierForFieldOnRootLevel`, `identifierForNodeType`, `joinCondition`, `jsonPath`, `metricKey`, `metricTimeseriesAggregation`, `namelessDplPattern`, `nonEmptyExecutionBlock`, `prefix`, `primitiveValue`, `simpleIdentifier`, `tabularFileExisting`, `tabularFileNew`, `url` |
| [Commands](references/dql/dql-commands.md) | `append`, `data`, `dedup`, `describe`, `expand`, `fetch`, `fields`, `fieldsAdd`, `fieldsFlatten`, `fieldsKeep`, `fieldsRemove`, `fieldsRename`, `fieldsSnapshot`, `fieldsSummary`, `filter`, `filterOut`, `join`, `joinNested`, `limit`, `load`, `lookup`, `makeTimeseries`, `metrics`, `parse`, `search`, `smartscapeEdges`, `smartscapeNodes`, `sort`, `summarize`, `timeseries`, `traverse` |
| [Functions — Aggregation](references/dql/dql-functions-aggregation.md) | `avg`, `collectArray`, `collectDistinct`, `correlation`, `count`, `countDistinct`, `countDistinctApprox`, `countDistinctExact`, `countIf`, `max`, `median`, `min`, `percentRank`, `percentile`, `percentileFromSamples`, `percentiles`, `stddev`, `sum`, `takeAny`, `takeFirst`, `takeLast`, `takeMax`, `takeMin`, `variance` |
...From Dynatrace's repository, Apache-2.0 licence.
Related skills
-
Checked
Incident postmortem writer
Writes blameless incident postmortems with fishbone and five whys analysis, so the team fixes root causes.
8/101 credit -
Checked
Akka.NET cluster management
Sets up Akka.NET cluster bootstrapping, service discovery and health checks, with no static seed nodes needed.
7/101 credit -
Checked
Terraform and OpenTofu
Sets up Terraform or OpenTofu modules, state and secrets with safe plan and apply for predictable changes.
8/101 credit -
Checked
AWS Lambda web apps
Builds and deploys Express, Fastify or Hono apps on AWS Lambda web functions, so your site runs serverless.
7/101 credit -
Checked
Cloud IAM audit
Audits and designs access across AWS, GCP, Azure and identity providers for least privilege and clean SSO.
7/101 credit -
Checked
Grafana APM and RUM
Sets up Grafana Cloud app monitoring, Faro frontend RUM and LLM tracing to show latency and errors.
7/101 credit