tencent cloud

Feedback

Creating Task

Last updated: 2024-01-20 17:44:35

Overview

This document describes how to create a scheduled SQL analysis task.

Prerequisites

The CLS service has been activated, and key-value index has been enabled.
Make sure that the current account has the permission to configure scheduled SQL analysis. For more information, see Examples of Custom Access Policies.

Directions

1. Log in to the CLS console.
2. Click Data Processing > Scheduled SQL Task on the left sidebar and click

to create a task.
3. On the basic configuration page, configure the following information and click Next:
Task Name: Enter a custom task name.
Source Log Topic: Select the log topic where to run the SQL analysis task.
SQL Statement: Enter the SQL statement in Query Statement, and the system will return the preview results (up to 100 items).
Target Log Topic: Select the target log topic where to save SQL analysis results.
4. On the scheduling configuration page, configure the following information and click OK.
Scheduling Range: Set the time range for running the scheduled task. The default value is to start at the current time and last forever, i.e., running continuously.
Scheduling Cycle: Set the cycle of the scheduled task, i.e., execution every X minutes. The maximum value is 1,440.
SQL Time Window: Set the start and end time of the SQL query log data.
Common SQL Time Window Expression (Suppose It's 12:06 Now)
SQL Time Window
Description
@m-1h, @m
11:06 - 12:06
`@m` and `-1h` indicate to take the value down to the minute and subtract 1 hour, respectively.
@h-1h,@h
11:00 - 12:00
`@h` and `-1h` indicate to take the value down to the hour and subtract 1 hour, respectively.
@m-1h+20m,@h+25m
11:26 - 12:25
`@m`, `-1h`, `+20m`, `@h`, and `+25m` indicate to take the value down to the minute, subtract 1 hour, add 20 minutes, take the value down to the hour, and add 25 minutes, respectively.

Example

The following example illustrates the configurations of the scheduling range, scheduling cycle, and SQL time window:



Catalog

In The Article

Creating Task

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support