Update PPL examples to use otel sample data#12199
Update PPL examples to use otel sample data#12199ritvibhatt wants to merge 9 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
|
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). |
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
| {% include copy.html %} | ||
| {% include try-in-playground.html %} | ||
|
|
||
| The query returns the following results: |
There was a problem hiding this comment.
ERR?R wildcard example: "The query returns the following results:" with no results table.
There was a problem hiding this comment.
Updated query to use quotes around the wildcard phrase so there is an output table now
|
|
||
| ``` | ||
| {% include copy.html %} | ||
| Parentheses > NOT > OR > AND |
There was a problem hiding this comment.
The prose says "AND binds tighter than OR" but the precedence list reads Parentheses > NOT > OR > AND. One of them is wrong. Also, query_string docs state that conventional Boolean operators don't follow precedence rules and require explicit parentheses — worth clarifying which behavior applies here.
Formatting: {% include copy.html %} is inside the fenced code block (unlike every other example on the page).
There was a problem hiding this comment.
Thanks for catching this! The prose was incorrect, OR > AND is correct so updated to match the precedence list. Also removed the copy button as it should not have been added there
_sql-and-ppl/ppl/commands/convert.md
Outdated
| source=otellogs | ||
| | rex field=body "response_time=(?<duration>\d+ms)" | ||
| | convert auto(duration) | ||
| | where NOT ISNULL(duration) |
There was a problem hiding this comment.
Examples 1–3 are incomplete:
- Example 1 (this line): "The query returns the following results:" with no output table.
- Example 2 (line 71): Same — no results table.
- Example 3 (line 73): Only a heading with no content before Example 4.
Examples 4–8 have proper tables, so this looks like an incomplete edit.
There was a problem hiding this comment.
Updated to change queries to get results and added example 3 back in thanks!
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
RyanL1997
left a comment
There was a problem hiding this comment.
Hi @ritvibhatt , thanks for the change. I took a look of rex, regex, and where and I think it looks good to me.
Description
Updates the PPL command documentation examples to use otel data instead of accounts/bank data
Adds try in playground button for PPL examples and link to observability playground website with example queries
Issues Resolved
Closes #[Replace this text, including the brackets, with the issue number. Leave "Closes #" so the issue is closed properly.]
Version
3.6.0+
Frontend features
If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.