Extraction and parsing commands
Parses a record field and puts the result(s) into one or more fields as specified in the pattern.
The parse command works in combination with the Dynatrace Pattern Language for parsing strings.
| parse fieldName, pattern
To get started, a field is generated at runtime to demonstrate its functionality.
Example1data record(content="22.214.171.124--[14/Mar/2016:23:34:25 +0200] GET//db/scripts/setup.php HTTP/1.1 404 474")2| parse content, "IPV4:ip LD HTTPDATE:time ']' LD:text"
The result shows that the parsed fields are added to the previously present set of fields and can be used for further processing.
content Ip time text
126.96.36.199--[14/Mar/2016:23:34:25 +0200] GET//db/scripts/setup.php HTTP/1.1 404 474
GET//db/scripts/setup.php HTTP/1.1 404 474
In case of identical names, fields added by the parse command override the existing fields. When two identical field names are specified in the DQL statement, a warning "The field
<fieldName> overrides an existing field." is returned.