From 74c5d3d7019c824121d76ce36c77e4e502520628 Mon Sep 17 00:00:00 2001 From: Lynette Miles Date: Thu, 29 May 2025 10:53:16 -0700 Subject: [PATCH 1/3] Pipeline: filters: parser: Style updates Signed-off-by: Lynette Miles --- pipeline/filters/parser.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pipeline/filters/parser.md b/pipeline/filters/parser.md index b0ff976b1..15a7e95cf 100644 --- a/pipeline/filters/parser.md +++ b/pipeline/filters/parser.md @@ -1,26 +1,26 @@ # Parser -The _Parser Filter_ plugin allows for parsing fields in event records. +The _Parser_ filter plugin allows for parsing fields in event records. -## Configuration Parameters +## Configuration parameters The plugin supports the following configuration parameters: | Key | Description | Default | | :--- | :--- | :--- | -| Key\_Name | Specify field name in record to parse. | | -| Parser | Specify the parser name to interpret the field. Multiple _Parser_ entries are allowed \(one per line\). | | -| Preserve\_Key | Keep original `Key_Name` field in the parsed result. If false, the field will be removed. | False | -| Reserve\_Data | Keep all other original fields in the parsed result. If false, all other original fields will be removed. | False | +| `Key_Name` | Specify field name in record to parse. | _none_ | +| `Parser` | Specify the parser name to interpret the field. Multiple parser entries are allowed (one per line). | _none_ | +| `Preserve_Key` | Keep the original `Key_Name` field in the parsed result. If false, the field will be removed. | `False` | +| `Reserve_Data` | Keep all other original fields in the parsed result. If false, all other original fields will be removed. | `False` | -## Getting Started +## Get started ### Configuration File -This is an example of parsing a record `{"data":"100 0.5 true This is example"}`. - The plugin needs a parser file which defines how to parse each field. +This is an example of parsing a record `{"data":"100 0.5 true This is example"}`. + ```python [PARSER] Name dummy_test @@ -28,7 +28,7 @@ The plugin needs a parser file which defines how to parse each field. Regex ^(?[^ ]+) (?[^ ]+) (?[^ ]+) (?.+)$ ``` -The path of the parser file should be written in configuration file under the **\[SERVICE\]** section. +The path of the parser file should be written in configuration file under the `[SERVICE]` section. ```python [SERVICE] @@ -113,7 +113,7 @@ Copyright (C) Treasure Data [3] dummy.data: [1499347996.001320284, {"INT"=>"100", "FLOAT"=>"0.5", "BOOL"=>"true", "STRING"=>"This is example"}, "key1":"value1", "key2":"value2"] ``` -If you enable `Reserved_Data` and `Preserve_Key`, the original key field will be preserved as well: +If you enable `Reserved_Data` and `Preserve_Key`, the original key field will also be preserved: ```python [PARSER] From b50dd9037576aa9e18091cd4be760ea4803a15da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lecaros?= Date: Fri, 30 May 2025 10:04:39 -0400 Subject: [PATCH 2/3] Pipeline: filters: parser: Style updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexa Kreizinger Signed-off-by: José Lecaros --- pipeline/filters/parser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/filters/parser.md b/pipeline/filters/parser.md index 15a7e95cf..1428da109 100644 --- a/pipeline/filters/parser.md +++ b/pipeline/filters/parser.md @@ -1,6 +1,6 @@ # Parser -The _Parser_ filter plugin allows for parsing fields in event records. +The _Parser_ filter allows for parsing fields in event records. ## Configuration parameters From 9a0db056b2747a29a353ba9c494960a3c2a4972e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lecaros?= Date: Fri, 30 May 2025 10:04:48 -0400 Subject: [PATCH 3/3] Pipeline: filters: parser: Style updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexa Kreizinger Signed-off-by: José Lecaros --- pipeline/filters/parser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/filters/parser.md b/pipeline/filters/parser.md index 1428da109..fb7eae81e 100644 --- a/pipeline/filters/parser.md +++ b/pipeline/filters/parser.md @@ -15,7 +15,7 @@ The plugin supports the following configuration parameters: ## Get started -### Configuration File +### Configuration file The plugin needs a parser file which defines how to parse each field.