Extract
Extract (extract)
Section titled “Extract (extract)”Extract fields from text using regular expressions.
Transform json
Minimal example
Section titled “Minimal example”actions: - extract: pattern: ""JSON
{ "actions": [ { "extract": { "pattern": "" } } ]}Contents
Section titled “Contents”A ✓ marks a field that accepts a context variable such as
{{ VARIABLE }}.
General
Section titled “General”General
| Field | Type | Required | Description |
|---|---|---|---|
description |
string |
describe this step. | |
condition |
lua-expression (string) |
Only run this action if the specified condition is met. Examples: 2 * count() |
Input
| Field | Type | Required | Description |
|---|---|---|---|
input-field |
field (string) |
The field containing the text. Default: _rawExamples: data_field |
Mapping
Section titled “Mapping”Mapping
| Field | Type | Required | Description |
|---|---|---|---|
output-fields |
string[] |
field names to match with each matched group. | |
convert |
map (string) |
Optionally convert these fields afterwards. If fields is omitted, the keys from convert are used as the extracted field names. |
Output
Section titled “Output”Output
| Field | Type | Required | Description |
|---|---|---|---|
remove ✓ |
boolean (bool) |
Remove field containing text afterwards. Default: false |
Pattern
Section titled “Pattern”Pattern
| Field | Type | Required | Description |
|---|---|---|---|
pattern |
regex (string) |
✅ | Pattern containing named groups. Default is to use the group names. Examples: \d+[A-Z]* |
Substitution
Section titled “Substitution”Substitution
| Field | Type | Required | Description |
|---|---|---|---|
output-pattern |
string |
Optionally, do a substitution using text containing $1, $2, etc. referring to captured groups. | |
output-field |
field (string) |
Write to this field if doing a substitution. Examples: data_field |
Warnings
Section titled “Warnings”Warnings
| Field | Type | Required | Description |
|---|---|---|---|
suppress-warnings ✓ |
boolean (bool) |
Suppress warnings generated by this action. Default: false |
|
drop ✓ |
boolean (bool) |
Don’t pass through failed matches. Default: false |
Schema
Section titled “Schema”Convert Table
Section titled “Convert Table”| Field | Type |
|---|---|
event.field |
str |
Key format: field.