Global operation functions
The LOG domain-specific language (DSL) of Simple Log Service provides approximately 30 global operation functions. You can use these functions to control data transformation logic.
The following table describes the global operation functions.
Function type | Function | Instructions |
| You can combine multiple conditions and operations. | |
| Performs an operation based on the evaluation result of a specified condition. | |
| A combination of conditions and operations. After one condition is met, the operation is performed and the process exits. | |
| Combines multiple operations and performs the operations in sequence. | |
| Discards a log if a specified condition is met. | |
| Retains a log if a specified condition is met. | |
| Splits a log into multiple logs based on the value of a specified field. The function also supports extracting the field value using JMESPath before splitting. | |
| Writes a log to a specified Logstore. The subsequent transformation rules are not executed for the log. | |
| Writes a log to a specified Logstore. The subsequent transformation rules are still executed for the log. | |
| Converts the log format to the time series storage (MetricStore) format. | |
| Gets the value of a specific log field. | |
| Adds a new field or sets a new value for an existing field. | |
| Deletes log fields that meet a specified condition. | |
| Retains log fields that meet a specified condition. | |
| Packs log fields and outputs them to a new field. | |
| Renames log fields that meet a specified condition. | |
| Extracts the value of a field using a regular expression and assigns the value to other fields. | |
| Performs JSON operations on a JSON object in a specified field. Operations include expanding JSON data, extracting data using JMES, or extracting and then expanding the data. | |
| Extracts key-value pairs from multiple source fields using quotes. | |
| Extracts key-value pairs from source fields using a separator. | |
| Extracts multiple fields using a comma (,) as the default separator. | |
| Extracts multiple fields using a tab ( | |
| Extracts multiple fields using a vertical bar (|) as the default separator. | |
| Calculates facility and severity from a known priority value based on the Syslog protocol, and matches the corresponding level information. | |
| Extracts strings using the rules specified by anchor_rules. | |
| Maps an input field to a new field based on a mapping dictionary. | |
| Finds the corresponding row in a mapping table and returns a field value based on the input field. | |
| Enriches a raw log using data from Tablestore as a dimension table. | |
| Enriches a raw log using data from Alibaba Cloud Redis as a dimension table. |