Configure a scheduling policy for an SQL analytic task and publish the task.
Prerequisites
SQL statements must be prepared. For more information, see Step 2: Write SQL Analytic Statements.
Usage notes
-
If you modify the output field names or types of a published SQL analytic task, existing data in the storage table is overwritten by newly generated data.
To change the storage table structure and preserve existing data, create a new SQL analytic task.
-
Revoke the task before modifying or deleting a published SQL analytic task.
-
Only SQL analytic tasks with the statuses Unpublished and Offline can be modified or deleted.
-
Deleted SQL analytic tasks cannot be recovered. Proceed with caution.
-
Deleting a custom storage table produced by an SQL analytic task may affect other data analysis services that depend on it.
For example, if a custom storage table from an SQL analytic task serves as a data source for a data API, deleting the task and taking it offline before the schedule's effective date prevents the API from querying data after the schedule ends.
Procedure
-
Click SQL Dataservice Studio on the top toolbar, then select Publish And Execute.
-
In the Execution Settings dialog box, configure the scheduling policy for the SQL analytic task.
Item
Description
Result Storage Table
The custom storage table where query results are written.
For more information about custom storage tables, see Custom Storage Table.
Important-
Before you set the execution task policy, create a custom storage table and configure the output data fields to store data generated by the SQL analytic task. For detailed steps, see Create and Manage Custom Storage Tables.
-
A custom storage table can serve as the output for only one data parsing or SQL task.
Data Writing Policy
The method used to write data during SQL analytic task execution. The policy is automatically determined by the custom storage table type and cannot be changed.
-
Partitioned Table and Time Series Table use Partition Overwrite: Each execution overwrites the entire partition's data.
-
Transactional Table uses Primary Key Overwrite: If primary key data is duplicated, only the latest data set is retained.
Primary Key
The primary key fields defined in the custom storage table.
Effective Date of Scheduling Policy
The date when the SQL analytic task schedule takes effect.
Scheduling Frequency
The execution interval of the SQL analytic task, with the following options:
-
Hourly: Runs data scheduling every hour, starting one hour after the task goes online, based on data from the previous hour.
-
Daily: Runs data scheduling once a day, starting one day after the task goes online, using data from the previous day.
For example, an Hourly SQL analytic task that runs at 6:00 processes data from 5:00 to 5:59.
-
-
Click Validate Settings to ensure all configurations are correct.
-
In the Validate Settings dialog box, click Publish Task to proceed.
What to do next
After the SQL analytic task goes online, you can monitor its configuration and scheduling status.