fix(ddsql): correct broken DDSQL time-series help example#605
Merged
Conversation
The `ddsql time-series` example in `--help` queried a bare `metrics` table, which is not a valid DDSQL dataset and fails with: HTTP 400: depends on non-existent dataset "metrics" Replace it with a verified `dd.metrics_timeseries(...)` table-function query, the spec-correct way to read metrics via DDSQL.
jack-edmonds-dd
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-pick of #599 (authored by @roippi) with a signed commit to satisfy the merge gate.
Fixes the
pup ddsql time-serieshelp example, which referenced a non-existentmetricsdataset and caused HTTP 400 errors for anyone (or any agent) copying it verbatim.Changes
src/main.rs:1083: replaceSELECT avg(system.cpu.user) FROM metrics GROUP BY host(invalid) withSELECT timestamp, value, tags->'host' AS host FROM dd.metrics_timeseries('avg:system.cpu.user{*} by {host}')(spec-correct)--interval 300000flag from the exampleTesting
Verified by original author in #599 against the live API — broken query returns HTTP 400, corrected query returns real per-host timeseries data.
Closes #599
🤖 Generated with Claude Code