All Products
Search
Document Center

IoT Platform:Step 3: Set a job scheduling policy and publish

Last Updated:Oct 21, 2024

This topic outlines how to establish a job scheduling policy.

Prerequisites

SQL statements must be prepared. For more information, see Step 2: Write SQL Analytic Statements.

Usage notes

  • Modifying a published SQL analytic task may result in overwriting existing data in the storage table with new output if the output fields' names and types are altered.

    To adjust the storage table structure output by the SQL analytic task and preserve the original data, please set up 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 are irrecoverable; proceed with caution.

  • Deleting a custom storage table output by an SQL analytic task may impact other data analysis services that utilize it.

    For instance, if a custom storage table from an SQL analytic task is used as a data source for a data API, deleting the task and taking it offline before the schedule's effective date will result in the API being unable to query data post-schedule.

Procedure

  1. Click SQL Dataservice Studio on the top toolbar, then select Publish And Execute.

  2. In the Execution Settings dialog box, configure the scheduling policy for the SQL analytic task.

    Item

    Description

    Result Storage Table

    Directs query results to the designated custom storage table.

    For more details on custom storage tables, refer to Custom Storage Table.

    Important
    • Prior to setting the execution task policy, create a new custom storage table and configure the output data fields in the table structure to store the data generated by the SQL analytic task schedule. See Create and Manage Custom Storage Tables for detailed steps.

    • A custom storage table should only serve as the output for a single data parsing or SQL task.

    Data Writing Policy

    Determines how data is written during the execution of the SQL analytic task. The policy is automatically selected based on the custom storage table type and is not adjustable.

    • 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

    Displays the primary key fields from the custom storage table.

    Effective Date of Scheduling Policy

    Specifies when the SQL analytic task schedule becomes active.

    Scheduling Frequency

    Sets how often the SQL analytic task is executed, with options including:

    • Hourly: Initiates data scheduling every hour, starting one hour after the task goes online, based on the previous hour's data.

    • Daily: Begins daily data scheduling one day after the task goes online, using data from the previous day.

    For instance, an Hourly scheduled SQL analytic task running at 6:00 will process data from 5:00 to 5:59.

  3. Click Validate Settings to ensure all configurations are correct.

  4. In the Validate Settings dialog box, click Publish Task to proceed.

What to do next

Once the SQL analytic task is online, you can monitor its configuration and scheduling status as needed.