Skip to content

Commit

Permalink
Updated documentation with correct configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kondaka <[email protected]>
  • Loading branch information
Krishna Kondaka committed Jan 10, 2024
1 parent e935916 commit d2f107b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions data-prepper-plugins/truncate-processor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ pipeline:
record_type: "event"
format: "json"
processor:
- trucate_string:
entries:
- source: "message"
length: 5
start_at: 7
truncate_when: '/id == 1'
- trucate:
source: "message"
length: 5
start_at: 7
truncate_when: '/id == 1'
sink:
- stdout:
```
Expand All @@ -84,8 +83,8 @@ the output would be
```

### Configuration
* `entries` - (required) - A list of entries to add to an event
* `source` - (required) - The key to be modified
* `start_at` - (optional) - starting index of the string. Defaults to 0.
* `length` - (optional) - length of the string after truncation. Defaults to end of the string.
* `source` - (required) - The key to be modified
* `truncate_when` - (optional) - a condition, when it is true the truncate operation is performed.
* `start_at` - (optional) - starting index of the string. Defaults to 0.
* `length` - (optional) - length of the string after truncation. Defaults to end of the string.
Either `start_at` or `length` or both must be present

0 comments on commit d2f107b

Please sign in to comment.