You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Data transformation
Create data transformation task
Copy page
Download PDF
Create data transformation task
TLS provides flexible and convenient data transformation capabilities, supporting data cleansing, filtering, content masking, data splitting, and data distribution for collected log data. After you create a data transformation task, TLS automatically reads the data from the source log topic and processes it according to the specified processing rules, and then writes the results to different log topics.​
This topic describes how to create a data transformation task through the console.​
Prerequisites​
  • Log data has been collected. For detailed steps, see Overview.​
  • A log project and log topic are created.​
Steps​
  1. Log in to TLS console.​
  1. Select the region where log service is located from the top navigation bar.​
  1. In the left navigation bar, select Data processing > Data transformation.​
  1. On the Data transformation - Task list page, click Create data transformation task.​
  1. On the data transformation task creation page, complete the following configuration.​
  1. Fill in the basic settings for the data transformation task, and then click Next: processing rule configuration.​
  • ​
    Parameters​
    Description​
    Task name​
    Name of the data transformation task.​
    Description​
    A brief description of the data transformation task.​
    Source project​
    The project that contains the logs to be transformed.​
    Source topic​
    The topic that contains the logs to be transformed.​
    Target topic​
    Information about the target topic, which refers to the topic where the transformed logs are stored.​
    You can specify up to 20 different log topics. Only one log topic can be selected or one topic ID can be entered for each target topic. If multiple topics are specified, the transformed data is saved to multiple log topics.​
    TLS supports data transformation for both same-account and cross-account scenarios. You need to provide the following information for each output destination:​
    • Same account:​
    • Shipping type: Select This account.​
    • Target name: The customized name for the output target. This name needs to be used in the data processing rules to refer to the output target.​
    • Target Region: The region where the transformed log data will be stored.​
    • Configuring cross-region log data storage incurs cross-region transfer traffic fees. For more details, see Billing overview.​
    • After configuring cross-region log data storage, only the Topic ID field is required.​
    • Currently available in North China 2 (Beijing), South China 1 (Guangzhou), and East China 2 (Shanghai) regions.​
    • Project: The project used to store the transformed log data.​
    • Log topic: The log topic where the transformed log data will be stored.​
    • Topic ID: After configuring cross-region storage of log data, fill in the log Topic ID to store the processed log data.​
    • Cross-account:​
    • Shipping type: Select Other accounts.​
    • IAM role: For cross-account data transformation, you need to configure an IAM role by entering a custom role's TRN. This authorizes the transformation task to assume the custom role, process the data, and then write it to TLS in another account.​
    • Target name: The customized name for the output target. This name needs to be used in the data processing rules to refer to the output target.​
    • Target Region: The region where the transformed log data will be stored.​
    • Configuring log data storage across regions incurs cross-region transfer traffic fees. For details, see Billing overview.​
    • Currently available in North China 2 (Beijing), South China 1 (Guangzhou), and East China 2 (Shanghai) regions.​
    • Topic ID: The log topic ID where the processed log data is stored.​
    Tip​
    • Set the shard count for the target log topic based on the shard count of the source log topic. If the source log topic receives high write traffic and the target log topic has fewer shards, data transformation performance may be affected.​
    • If you specify multiple target log topics, the data transformation results are written to the first log topic by default. You can also use the e_output function to distribute the processed data to different log topics when editing transformation rules. For details, see e_output function.​
    Processing time range​
    The processing time range for the data to be transformed.​
    This time range refers to the period during which log data is stored on the TLS server.​
    • All logs: Process all data stored within the specified log topic, including historical data and newly ingested logs.​
    • From certain time: Process data collected after the specified time, including newly ingested logs. If no time is specified, all logs will be processed.​
    • Specify time range: Process historical data within the specified time period.​
    Tip​
    • The time range is a left-closed, right-open interval.​
    • If the start time is not specified, processing begins with the earliest log. If the end time is not specified, newly written data will continue to be processed.​
    ​
  1. Write transformation rules.​
  • Follow the onscreen instructions to enter transformation rules in the input box. TLS supports a variety of DSL syntax functions. On the transformation functions tab, you can click a function name to view syntax descriptions and examples, and insert specified syntax with one click to quickly write transformation rules. For the list of supported syntax functions, see Functions overview.​
  1. Click Preview execution to test transformation rules.​
  • Follow the page instructions to test by using log data from the source log topic or specified test data.​
  • If the page prompts DSL code compilation failed, it means the transformation statement contains errors. You can refer to the error information provided and fix the syntax issue in the specified line, and then retest the transformation rule.​
  • If you confirm the data transformation results are correct, click Complete task creation.​
  1. In the Enable immediately after task creation dialog, select whether to enable the task right away.​
  • Enable immediately: Start the data transformation task right after completing task configuration.​
  • Enter pause state: The data transformation task will be paused after configuration is completed and needs to be manually started later.​
  • Cancel: Cancel task creation for data transformation.​
Tip​
When a data transformation task is stopped or has completed, TLS does not automatically delete its associated consumer group instances. It is recommended to promptly clean up data transformation tasks that are stopped or completed and confirmed to be unused, reducing unnecessary consumer group instances.​
Related operations​
  • After the data transformation task starts, TLS records the execution status and progress of the task in the service logs. You can view and analyze the relevant log data in the corresponding log topic. For more details, see Service log fields.​
  • After you successfully create a data transformation task, you can modify or delete the task as needed for your business requirements. For detailed instructions, see Manage data transformation tasks.​
  • We recommend enabling indexing for the target log topic to facilitate query and analysis of the processed data. Refer to the steps Configure indexes.​
​
Last updated: 2026.07.30 17:29:25