Skip to content

Commit d1c77f6

Browse files
esmerellecarosalexakreizinger
authored
Pipeline: filters: parser: Style updates (#1695)
* Pipeline: filters: parser: Style updates Signed-off-by: Lynette Miles <[email protected]> * Pipeline: filters: parser: Style updates Co-authored-by: Alexa Kreizinger <[email protected]> Signed-off-by: José Lecaros <[email protected]> * Pipeline: filters: parser: Style updates Co-authored-by: Alexa Kreizinger <[email protected]> Signed-off-by: José Lecaros <[email protected]> --------- Signed-off-by: Lynette Miles <[email protected]> Signed-off-by: José Lecaros <[email protected]> Co-authored-by: José Lecaros <[email protected]> Co-authored-by: Alexa Kreizinger <[email protected]>
1 parent 6f111a6 commit d1c77f6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

pipeline/filters/parser.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# Parser
22

3-
The _Parser Filter_ plugin allows for parsing fields in event records.
3+
The _Parser_ filter allows for parsing fields in event records.
44

5-
## Configuration Parameters
5+
## Configuration parameters
66

77
The plugin supports the following configuration parameters:
88

99
| Key | Description | Default |
1010
| :--- | :--- | :--- |
11-
| Key\_Name | Specify field name in record to parse. | |
12-
| Parser | Specify the parser name to interpret the field. Multiple _Parser_ entries are allowed \(one per line\). | |
13-
| Preserve\_Key | Keep original `Key_Name` field in the parsed result. If false, the field will be removed. | False |
14-
| Reserve\_Data | Keep all other original fields in the parsed result. If false, all other original fields will be removed. | False |
11+
| `Key_Name` | Specify field name in record to parse. | _none_ |
12+
| `Parser` | Specify the parser name to interpret the field. Multiple parser entries are allowed (one per line). | _none_ |
13+
| `Preserve_Key` | Keep the original `Key_Name` field in the parsed result. If false, the field will be removed. | `False` |
14+
| `Reserve_Data` | Keep all other original fields in the parsed result. If false, all other original fields will be removed. | `False` |
1515

16-
## Getting Started
16+
## Get started
1717

18-
### Configuration File
19-
20-
This is an example of parsing a record `{"data":"100 0.5 true This is example"}`.
18+
### Configuration file
2119

2220
The plugin needs a parser file which defines how to parse each field.
2321

22+
This is an example of parsing a record `{"data":"100 0.5 true This is example"}`.
23+
2424
```python
2525
[PARSER]
2626
Name dummy_test
2727
Format regex
2828
Regex ^(?<INT>[^ ]+) (?<FLOAT>[^ ]+) (?<BOOL>[^ ]+) (?<STRING>.+)$
2929
```
3030

31-
The path of the parser file should be written in configuration file under the **\[SERVICE\]** section.
31+
The path of the parser file should be written in configuration file under the `[SERVICE]` section.
3232

3333
```python
3434
[SERVICE]
@@ -113,7 +113,7 @@ Copyright (C) Treasure Data
113113
[3] dummy.data: [1499347996.001320284, {"INT"=>"100", "FLOAT"=>"0.5", "BOOL"=>"true", "STRING"=>"This is example"}, "key1":"value1", "key2":"value2"]
114114
```
115115

116-
If you enable `Reserved_Data` and `Preserve_Key`, the original key field will be preserved as well:
116+
If you enable `Reserved_Data` and `Preserve_Key`, the original key field will also be preserved:
117117

118118
```python
119119
[PARSER]

0 commit comments

Comments
 (0)