tencent cloud

Cloud Log Service

Creating a DLC Shipping Task

Download
Modo Foco
Tamanho da Fonte
Última atualização: 2026-05-21 19:39:28
After logs are collected to CLS, you can ship log data to Tencent Cloud DLC for analysis.

Prerequisites

Enable Cloud Log Service, create a logset and log topic, and ensure log data has been successfully collected.
Activate Tencent Cloud DLC service and create a database and data table in the region of the log topic to be delivered. See SQL editor.
Sub-account/Collaborator requires root account authorization. For authorization steps, see CAM management permissions. For authorization policy, refer to CLS Access Policy Template.
The Tencent Cloud CLS service role has been authorized to access DLC. When most users operate through the console, the system will guide the user to complete authorization; a small number of users cross the console and directly call the API, and these customers need to manually authorize. For details, please refer to Delivery Task Role Authorization.

Directions

1. Log in to the Cloud Log Service console.
2. Select Log Topic in the left sidebar.
3. Click the log topic ID/name to deliver, and enter the log topic management page.
4. Click the Shipping to DLC tab, enter the Send to DLC configuration page, and click Create.
Basic Configuration Item
Description
Rule
Required
Shipping Task Name
Name of the delivery task.
-
Required
Service log
Write the monitoring metrics of the delivery task running to the free log topic cls_service_log.
-
No
Shipping Mode
Currently only support Batch Shipping.
-
No
File Size
The size of the raw log file to be delivered works in conjunction with the delivery interval time. Whichever condition is met first will trigger the rule to compress the file, and then deliver it to DLC.
For example: if you configure 256MB and 15 minutes, and the file size reaches 256MB in just 5 minutes, then the file size condition will trigger the delivery task first.
5 - 256, unit: MB.
No
Shipping Interval
Specify the interval to trigger a delivery. This works with the delivery file size. Whichever condition is met first will trigger the rule to compress the file and deliver it to DLC.
For example, if you configure 256MB and 15 minutes, and the file size is only 200MB after 15 minutes, then the interval time condition will trigger the delivery task first.
300 - 900, unit: s.
No
5. Click Next to enter Data Table Configuration.
Data Table Configuration Item
Description
Rule
Required
Data Catalogs
Currently, only DataLakeCatalog is supported.
-
No
Database
Select your DLC database.
-
Required
Data Table
Select your DLC data table.
-
Required
data Field
Map Fields: After you click this button, field names in the log topic that are identical to those in the DLC data table will be automatically filled into the Log Field Name fields below (see the following figure). For field names that differ from the DLC data table, you must enter them manually. You can refer to the log sample in the upper-right corner of the page to help you select and enter fields into the Log Field Name fields.

Log Field Name: Map fields in the CLS log to corresponding DLC fields, as shown in the log in figure: Only support filling in the key of the first-layer node in JSON, such as app_name. Nested nodes like details.request_id are not supported.
{
"__TIMESTAMP__":1742543131,
"app_name": "cls",
"category": "Filter",
"latency": "11",
"details": {
"request_id": "123456dfg",
"trace_id": "0610df2a4c5d9cdf"
}
}
Data Table Field Name: The data table field is read from DLC and cannot be modified here. Please go to DLC to edit.
Field Type: Type of DLC field, not supported here. Please go to DLC to modify.
Assignment information returned upon resolution failure: NULL/empty/custom value. If the user's raw field cannot be parsed as the specified type, the system will attempt to parse the unresolved field. If the unresolved field also cannot be parsed, it will fill the default zero value.
int/bigint: corresponds to 0
float/double/decimal: corresponds to 0
date: today
timestamp: corresponding current timestamp
Enable Mapping: whether to map this field to the DLC table. If not required, toggle off.
Date:1970-01-01
TIMESTAMP:2025-01-01 00:00:00
Note:
If a field does not exist in the log, it will have a Null value on the DLC side.
If field parsing to the specified type fails:
If parsing fails, the field is assigned a Null value, and it will be Null on the DLC side.
If parsing fails and a non-Null value is assigned, the system will attempt to parse that assigned value. If the parsing succeeds, the value is written. Otherwise, the field is represented as a Null value on the DLC side.
Enable Mapping: Whether to map this field to the DLC table. If not needed, disable the switch.
-
Required
Partition Field
Log Field Name: the field name of the log, used for Mapping the partition field in DLC. If your DLC table is partitioned by time, we recommend using the log time field here, such as __TIMESTAMP__.
Data Table Field Name: partition field, read from DLC, cannot be modified here. Please go to DLC to edit.
Field Type: type of partition field, read from DLC, not supported here. Please go to DLC to modify.
-
Required
Time Partition Format
For the time partition format, configuration examples, and parameter details, see the following description.
Note:
The time partition format takes effect only when the log field name in the DLC partition column is configured as __TIMESTAMP__.
We recommend partitioning by day. Using minutes or seconds would result in too many partitions in the DLC table.
Examples of the time partition format are as follows:
%Y-%m-%d-%H-%M:2025-07-09-20-30
%Y-%m-%d-%H:2025-07-09-20
%Y-%m-%d:2025-07-09
%Y-%m:2025-07
Used in conjunction with the time zone.
No
Time Zone (UTC)
This time zone is used to format time and time partitions.
Used in conjunction with the time partition.
No
6. Click Submit to complete the configuration of the new task.

Ajuda e Suporte

Esta página foi útil?

comentários