,

Updated at:

You can configure advanced parameters for Data Transformation (New) tasks to control output failure handling and consumer group checkpoint behavior.

Usage notes

1. Configuration limits

  • Parameter names cannot contain spaces or special characters.

  • Parameter values in JSON format must be valid JSON strings.

  • The size of a parameter value is typically limited to 1 KB.

2. Effective period

  • Changes to advanced parameters take effect only after you restart the data transformation task.

  • Adjust parameters during off-peak hours.

  • After you modify parameters, perform thorough testing.

3. Backward compatibility

  • New parameters do not affect existing tasks.

  • You will be notified in advance of any changes to parameter formats. Backward compatibility will be maintained.

  • Regularly review the update notes for parameter configurations.

Procedure

  1. Log on to the Simple Log Service console.

  2. Go to the data transformation page.

    1. In the Projects section, click the project you want.

    2. On the Log Storage > Logstores tab, click the logstore you want.

    3. On the query and analysis page, click Data Transformation.

  3. In the upper-right corner of the page, select a time range.

    After you select a time range, make sure that logs are displayed on the Raw Logs tab.

  4. In the editor, enter an SPL statement.

    For more information about SPL syntax, see SPL syntax.

  5. Preview the data.

    • On the Raw Data tab, click Add Test Data. Alternatively, you can manually enter test data on the Test Data tab.

  6. Create a data transformation task.

    1. Click Save as Transformation Job (New Version).

    2. In the Create Data Transformation Job (New Version) panel, configure Advanced Options, and then click OK. For information about other configurations, see Create a data transformation job (new version).

Advanced parameters

config.sls_output.failure_strategy

Controls how the task handles output failures when a destination Logstore does not exist.

Parameter syntax

{"drop_when_not_exists":"true"}

Parameter description

  • drop_when_not_exists: Specifies the behavior when the destination Logstore does not exist.

    • "true": Skips the log and continues processing subsequent data without reporting an error.

    • "false": Reports an error and stops processing. This is the default behavior.

Use cases

  • Scenarios where destination LogStores are dynamically created.

  • Scenarios where the task must continue running even if a destination LogStore does not exist.

  • Data processing tasks that require high fault tolerance.

Configuration example

Key: config.sls_output.failure_strategy
Value: {"drop_when_not_exists":"true"}

enable.auto.commit

Controls whether the system automatically commits the consumer group checkpoint.

Parameter syntax

{"enable.auto.commit":"true"}

Parameter description

  • enable.auto.commit: Enables or disables automatic consumer group checkpoint commits.

    • "true": The system automatically and periodically updates the consumer group checkpoint.

    • "false" (default): You must manually manage the checkpoint.

Scenarios

  • Retain the checkpoint management behavior of the previous data transformation version.

  • Downstream tasks depend on the checkpoint updates of the consumer group.

Configuration example

Key: enable.auto.commit
Value: true

Mechanism

  • The system automatically and periodically commits the consumer group checkpoint.

  • This maintains compatibility with the checkpoint behavior of the previous data transformation version, preventing errors in downstream tasks that depend on the consumer group.

Configuration example

Example 1: Fault-tolerant data distribution

Dedicated Logstores are dynamically created for users based on their user IDs, but a specific user's Logstore may not yet exist when data is processed.

  • Configuration

    Key: config.sls_output.failure_strategy
    Value: {"drop_when_not_exists":"true"}
    Key: enable.auto.commit  
    Value: true
  • SPL statement:

    * | extend user_logstore = concat('user-', user_id, '-logs')
      | extend "__tag__:__sls_etl_output_logstore__" = user_logstore
      | project timestamp, user_id, action, details
  • Result:

    • If a user's dedicated Logstore does not exist, the log is skipped without affecting the processing of other logs.

    • The consumer group checkpoint is updated without affecting existing downstream tasks.

Troubleshooting

FAQ

Parameters do not take effect

  • Verify that the parameter name is correct. The name is case-sensitive.

  • Verify that the parameter value format meets the requirements.

  • Confirm that you have restarted the task to apply the new configuration.

JSON format error

# Incorrect format: Missing quotation marks
{"drop_when_not_exists":true}
# Correct format  
{"drop_when_not_exists":"true"}

Automatic commit does not work

  • Verify that the parameter value is a Boolean string.

  • Confirm that the consumer group configuration is correct.

  • Verify that the task has sufficient permissions to update the consumer group.