Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Add kv processor content gap doc #5781

Merged
merged 17 commits into from
Dec 12, 2023
Merged

[DOC] Add kv processor content gap doc #5781

merged 17 commits into from
Dec 12, 2023

Conversation

vagimeli
Copy link
Contributor

@vagimeli vagimeli commented Dec 4, 2023

Description

Adds documentation about kv processor; addresses content gap

Issues Resolved

#5651

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli vagimeli self-assigned this Dec 4, 2023
@vagimeli vagimeli changed the title [DOC} Add kv processor content gap doc [DOC] Add kv processor content gap doc Dec 4, 2023
@vagimeli
Copy link
Contributor Author

vagimeli commented Dec 5, 2023

@reta @gaobinlong Please take a look at the draft kv processor documentation. We particularly need your input for a real-life example of a kv processor ingest pipeline (see the section Using the processor steps 1-3). Thank you for your review!

For reference, if you'd like to see recent documentation for other processors, go to https://opensearch.org/docs/latest/ingest-pipelines/processors/index-processors/.

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli vagimeli added the 3 - Tech review PR: Tech review in progress label Dec 5, 2023
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@reta
Copy link
Contributor

reta commented Dec 5, 2023

We particularly need your input for a real-life example of a kv processor ingest pipeline (see the section Using the processor steps 1-3).

@gaobinlong do you mind providing those, I believe you should have them ready, thank you

_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved
_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved
_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved
_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved
vagimeli and others added 3 commits December 8, 2023 11:23
Co-authored-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli
Copy link
Contributor Author

vagimeli commented Dec 8, 2023

@reta @gaobinlong Thank you for your review. I've addressed your feedback. I'll move this forward for doc and editorial review and then get the PR merged. Thank you!

@vagimeli vagimeli added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Dec 8, 2023
Copy link
Contributor

@hdhalter hdhalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a few suggestions/nits.

_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved

The following table lists the required and optional parameters for the `lowercase` processor.

| Name | Required/Optional | Description |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the other processors, should the headings be: Parameter | Required | Description |

(Although, sometimes "Required/Optional" is the heading. See https://opensearch.org/docs/latest/ingest-pipelines/processors/date-index-name/ )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are updating the tables to now read Required/Optional. The first round originally said Required, but those need updating. I'll sync them this week. Good comment. Thanks!

_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved
_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved
_ingest-pipelines/processors/lowercase.md Outdated Show resolved Hide resolved
vagimeli and others added 2 commits December 11, 2023 16:09
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
vagimeli and others added 2 commits December 11, 2023 16:09
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli
Copy link
Contributor Author

@hdhalter I accepted your suggestions. I'll update the first round of processors that used Required instead of Required/Optional and Name instead of Parameter. Thanks for the review.

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vagimeli Please see my comments and changes and let me know if you have any questions. Thanks!

_ingest-pipelines/processors/kv.md Outdated Show resolved Hide resolved

# KV processor

The `kv` processor automatically extracts specific event fields or messages that are in a`key=value` format. This structured format organizes your data by grouping it together based on keys and values. It's helpful for analyzing, visualizing, and using data such as user behavior analytics, performance optimizations, or security investigations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last sentence: I suggest just "It's helpful in use cases such as user behavior analytics...". Otherwise, "...and using data, such as user behavior analytics, performance optimization, or security investigation data."

The `kv` processor automatically extracts specific event fields or messages that are in a`key=value` format. This structured format organizes your data by grouping it together based on keys and values. It's helpful for analyzing, visualizing, and using data such as user behavior analytics, performance optimizations, or security investigations.

## Example
The following is the syntax for the `kv` processor:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a line between the heading and the following text.


| Parameter | Required/Optional | Description |
|---|---|---|
`field` | Required | The name of the field that contains the data to be parsed. Supports [template snippets]({{site.url}}{{site.baseurl}}/ingest-pipelines/create-ingest/#template-snippets). |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`field` | Required | The name of the field that contains the data to be parsed. Supports [template snippets]({{site.url}}{{site.baseurl}}/ingest-pipelines/create-ingest/#template-snippets). |
`field` | Required | The name of the field containing the data to be parsed. Supports [template snippets]({{site.url}}{{site.baseurl}}/ingest-pipelines/create-ingest/#template-snippets). |

`exclude_keys` | Optional | The keys to exclude from the document. Default is `null`. |
`include_keys` | Optional | The keys for filtering and inserting. Default is to include all keys. |
`prefix` | Optional | The prefix to add to the extracted keys. Default is `null`. |
`strip_brackets` | Optional | If set to `true`, strips brackets `()`, `<>,` or `[]` and quotes `'` or `"` from extracted values. Default is `false`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put parentheses around the examples?: ((), <>, or []) and quotes (' or ")

```
{% include copy-curl.html %}

**Step 2 (Optional): Test the pipeline.**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Step 2 (Optional): Test the pipeline.**
**Step 2 (Optional): Test the pipeline**

```
{% include copy-curl.html %}

#### Response
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm heading level.

}
```

**Step 3: Ingest a document.**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Step 3: Ingest a document.**
**Step 3: Ingest a document**

```
{% include copy-curl.html %}

**Step 4 (Optional): Retrieve the document.**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Step 4 (Optional): Retrieve the document.**
**Step 4 (Optional): Retrieve the document**

_ingest-pipelines/processors/lowercase.md Outdated Show resolved Hide resolved
vagimeli and others added 3 commits December 12, 2023 10:54
Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli vagimeli merged commit 424956d into main Dec 12, 2023
4 checks passed
@vagimeli vagimeli deleted the kv branch December 12, 2023 18:23
@vagimeli vagimeli added the backport 2.11 PR: Backport label for 2.11 label Dec 12, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 12, 2023
* Add kv processor content gap doc

---------

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: Nathan Bower <nbower@amazon.com>
(cherry picked from commit 424956d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vagimeli pushed a commit that referenced this pull request Dec 12, 2023
* Add kv processor content gap doc

---------





(cherry picked from commit 424956d)

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: Nathan Bower <nbower@amazon.com>
vagimeli added a commit that referenced this pull request Dec 21, 2023
* Add kv processor content gap doc

---------

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: Nathan Bower <nbower@amazon.com>
@hdhalter hdhalter removed the 4 - Doc review PR: Doc review in progress label Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.11 PR: Backport label for 2.11 Content gap v2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants