An incident hits payment-api and the alert lands in a generic channel, because nobody can say which team owns the service. The gap is rarely in the telemetry. It is in the context around it. Dynatrace lookup tables close that gap: you keep a small reference file in Grail and attach it to your results at query time, with nothing to re-ingest.
This article skips the command syntax, which the article on lookup, join and parse in DQL already covers. It deals with the other half: preparing, loading, updating and protecting the table itself. It applies to Dynatrace SaaS only. The facts come from the Grail lookup data documentation and the vendor’s launch post. The examples below were written for this blog and were not run on a tenant.
Why Dynatrace lookup tables beat an attribute added at ingestion
There are two ways to record who owns a service. You can stamp the owner on every log or span at ingestion. Or you can keep the reference data apart and join it when you read.
The second approach has three operational benefits. A corrected owner applies to all the history you query, because the join happens at read time. You do not pay for extra ingested volume on a column that repeats millions of times. And one file, reviewed by the platform team, replaces rules scattered across pipelines.
The trade-off is real: the value is computed on read. For very early filtering, or for an alert fired at ingestion, an attribute added upstream still fits better. For masking or normalising on the way in, look at OpenPipeline and data masking instead.
Prepare the CSV file before loading the table
The simplest format is a CSV with one line per key. The documentation also accepts JSONL, XML, or any format DPL can parse. Two design rules help before you write the first line.
- One unique join key. The
lookupFieldparameter deduplicates: two lines with the same value in that field produce a single record. - Few useful columns. Keep what your queries reuse: owner, criticality tier, on-call channel. The documented limit is 128 fields.
The DPL pattern describes how to read one line. Each matching line becomes a record. If the header line matches too, the skippedRecords parameter lets you drop it. In the example the value is a starting point to adjust to your file.
Load the table and test the pattern before storing
Three paths lead to the table: the UI (Storage management, then Grail files, then the upload button), the Resource Store API with the lookup:upload action, or the Investigations section. The documentation describes no upload through Workflows, although the launch post mentions it. I have not settled that difference.
An upload needs three parameters: parsePattern, lookupField and filePath. The path must start with /lookups/. Optional ones are displayName, description and overwrite.
- Call
lookup:test-patternfirst. It shows the match count and up to 100 records, and stores nothing. - Check that the header did not become a data row.
- Upload the file with a meaningful
filePath, for example/lookups/service-owners.
That dry run prevents the most common flaw: a table loaded with a pattern so broad that the join column holds the whole line.
Use the table in a DQL query
Once loaded, the table is read with load and attached to results with lookup. The query below replays our incident: recent errors, grouped by service owner.
Key lines: sourceField names the field in the main query, lookupField the one in the table, and prefix avoids name collisions. Adapt service.name to your data, since that field is not present everywhere. The launch post adds that tables also work in Dashboards, Notebooks and Security Investigator.
Update a lookup table without breaking queries
Updates are not incremental. According to the documentation, you re-upload the whole file. If the filePath already exists, you must set overwrite, and the UI re-upload also replaces the current file.
In practice, keep the source CSV in a Git repository and load it from a pipeline step reviewed like code. Every owner change then has an author and a history. Deletion goes through the UI or the Resource Store files:delete route, and it is irreversible.
One word of caution: do not rename the path of a table used by a Dashboard before you find where it is read. Queries reference the path as plain text.
Limits and permissions to know
| Topic | What the documentation says |
|---|---|
| Files per environment | 10,000 at most |
| File size | 100 MB at most |
| Fields per table | 128 at most |
| Read | storage:files:read permission |
| Upload and delete | storage:files:write and storage:files:delete |
/dt/ prefix | read-only, reserved for vendor-managed files |
You can scope permissions by path prefix, with a condition such as storage:file-path startsWith "/lookups/". Give write access to a small group and read access to everyone. An API token needs the same permissions, and so does the linked user.
On cost, usage falls under the DPS subscription and generates « Events powered by Grail » consumption. The host properties dt.cost.costcenter and dt.cost.product handle cost allocation. To see where these files sit in the platform, reread the introductory module on Grail.
How to check that it works
- After the upload, run
load "/lookups/service-owners"alone. You should see one row per service and no header row. - Compare the row count with your CSV, remembering that duplicate keys are merged.
- Run the enriched query and look for results with an empty owner: those are services missing from the table.
Best practices
- One file per subject (owners, criticality, regions) rather than one giant file.
- Version the source CSV; the Grail table is only a working copy.
- Name the prefixes in your queries so they read well six months later.
- Put no secret or personal data in a table: anyone with read permission can see it.
- Test every new pattern with
lookup:test-patternbefore uploading.
Frequently asked questions
Do lookup tables work on Dynatrace Managed?
This article covers Dynatrace SaaS only. Neither the documentation I read nor the launch post describes a Managed equivalent. I have not verified it, so do not assume it.
Is the feature still in preview?
The launch post spoke of a public preview. The documentation page I read does not mention that status, so I cannot say whether it changed. Check it in your own environment.
How many rows can a table hold?
The documentation gives a size limit (100 MB) and a field limit (128), but no row limit. Measure on a realistic sample before loading a very large reference set.
Conclusion
A lookup table answers a simple decision: who to notify, which criticality tier, which region. Its value depends on the discipline around the file: unique key, tested pattern, versioned source, restricted write access. To keep going with the queries that use it, see the DQL filter, summarize and timeseries commands.
Independent blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC.
Originally published on span.observer. French version: https://span.observer/fr/lookup-tables-dynatrace-gerer-csv/.


