fix(ddsql): correct wrong DDSQL time-series help example#599
Closed
roippi wants to merge 1 commit into
Closed
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.
platinummonkey
approved these changes
Jun 18, 2026
Collaborator
|
I pulled this commit in and signed it in #605 so we can get the signed commit requirement, thanks for the fix! |
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
The
pup ddsql time-seriesexample in--helpqueried a baremetricstable, which is not a valid DDSQL dataset. Anyone (or more likely anyone's agent) copying the example verbatim hits an HTTP 400. This swaps it for a verifieddd.metrics_timeseries(...)query, the spec-correct way to read metrics via DDSQL.Changes
time-seriesexample in theddsqlcommand help (src/main.rs:1083):SELECT avg(system.cpu.user) FROM metrics GROUP BY hostSELECT timestamp, value, tags->'host' AS host FROM dd.metrics_timeseries('avg:system.cpu.user{*} by {host}')--interval 300000flag from the example — metric resolution comes from thedd.metrics_timeseries(...)call, not that flag.Testing
cargo checkpasses (the doc comment feeds clap'sverbatim_doc_commentderive).