This topic describes the syntax comparison between the old and new versions of data transformation.
For more information about the comparison between Simple Log Service Processing Language (SPL) and SQL syntax in various data transformation scenarios, see Scenario comparison between SPL and SQL.
Synchronize data (no processing logic required)
Version | Script description |
Old version | The DSL script is empty. |
New version | The SPL rule is empty. |
Filter data: exact match by text type
Version | Script description |
Old version |
|
New version |
|
Filter data by numeric type
Version | Script description |
Old version |
|
New version |
|
Filter data: fuzzy match
Version | Script description |
Old version |
|
New version |
|
Add a field used to extract or construct a single key information item
Version | Script description |
Old version |
|
New version |
|
Parse and format time values
Version | Script description |
Old version |
|
New version |
|
Process and filter fields
Version | Script description |
Old version |
|
New version |
|
Extract multiple fields by using a regular expression
Version | Script description |
Old version |
|
New version |
|
Expand key-value pairs of JSON objects into data fields
Version | Script description |
Old version | For more information about the JSON query syntax in the old version of data transformation, see JMESPath syntax.
|
New version | For more information about the JSON object path reference in the new version of data transformation, see JsonPath on GitHub.
|
Extract the content in CSV files as data fields
Version | Script description |
Old version |
|
New version |
|
Process logical branches: parallel branches
Version | Script description |
Old version | The preceding code is equivalent to the following Python code: |
New version | |
Process logical branches: mutually exclusive branches (if-else and switch)
Version | Script description |
Old version | The preceding code is equivalent to the following Python code: |
New version | |
Dynamically select a destination project and a Logstore based on rules
Version | Script description |
Old version |
|
New version |
|
Route the transformation results to the required shard based on a specific hash key
Version | Script description |
Old version |
|
New version |
|
Encapsulate and serialize fields into JSON data and store the JSON data in a new field
Version | Script description |
Old version |
|
New version |
|
Converts logs to metrics that can be stored in a Metricstore
Version | Script description |
Old version |
|
New version |
|