After you publish an SQL analysis task, you can view its basic information, configuration, and scheduling status, and perform operations such as editing, running, and deleting the task.
Prerequisites
You have configured and published an SQL analysis task. For more information, see Step 3: Set a task scheduling policy and publish the task.
Background information
For more information about SQL analysis tasks, see SQL analysis overview.
Manage SQL analysis tasks
-
In the IoT Platform console, on the Instance Overview page, click the ID or alias of the target Enterprise Edition instance.
-
In the left-side navigation pane, choose Data service > Analysis Insight.
-
On the Analysis Insight page, click a button in the Actions column to manage an SQL analysis task.
-
View: Opens the Data Development Details page to view the basic information, configuration, and other details of the task.
NoteIf the SQL analysis task is not fully configured, some data may not be visible.
Type
Description
Basic information
View the basic and storage information of the SQL analysis task.
Click Edit Basic Information to modify the basic information.
Table structure
View the fields of the output data.
Data preview
Preview a sample of the queried data.
Analysis SQL
View the SQL statement for the analysis task.
-
Development workbench: Opens the SQL Data Service Workbench page to configure the SQL analysis task.
For more information, see Step 2: Write SQL analysis statements and Step 3: Set a task scheduling policy and publish the task.
Important-
You can modify only SQL analysis tasks whose status is unpublished or offline.
-
If you modify the name or type of an output field in a published task, the schedule overwrites the data in the existing storage table with new data.
To adjust the structure of the output storage table without losing existing data, you must create and configure a new SQL analysis task.
-
To modify a published SQL analysis task, you must first unpublish it.
-
-
Delete: Deletes the SQL analysis task.
Important-
You can delete only SQL analysis tasks whose status is unpublished or offline.
-
To delete a published SQL analysis task, you must first unpublish it.
-
Deleted SQL analysis tasks cannot be recovered.
-
If the custom storage table produced by the task is used by other data services, deleting the task affects those services.
For example, if a custom storage table from a task is the data source for a data API, and the task is taken offline and deleted before the scheduling effective date, the API cannot query data after the scheduling stops.
-
-
Run an SQL analysis task manually
Published SQL analysis tasks run automatically based on their schedule. You can also run a task manually when needed.
-
On the Analysis Insight page, click Task O&M.
-
On the Task O&M page, click the Manual instances tab, and then click Create manual task.
-
In the Create manual task panel, configure the parameters for the manual task, and then click Confirm.
Note-
After you create a manual task, the system generates periodic instances on the Manual instances tab based on the task's scheduling period.
-
The periodic instances on the Manual instances tab may duplicate the scheduled tasks on the Periodic instances tab.
-
We recommend that you run a task manually only when a scheduled run fails or when you modify the SQL analysis task.
Parameter
Description
Select scheduling period
Select Daily Scheduling or Hourly Scheduling. For more information, see scheduling period.
Select manual date range
Select a time range within the last three days. The system reruns the scheduled tasks within this range.
For example, if a task's scheduling period is daily and you select the last three days, the task is rerun three times, once for each day.
Manual downstream task
Specifies whether to also run the downstream tasks of this SQL analysis task.
NoteSQL analysis tasks can have dependencies. If another SQL analysis task queries the output table of the first task, the second task is a downstream task of the first.
Data development name/ID
Select the name of the SQL analysis task to run.
-
View execution status
-
On the Task O&M page, find the task whose execution status you want to view.
-
On the Periodic instances tab, view the SQL analysis tasks that run on a schedule.
-
On the Manual instances tab, view the SQL analysis tasks that you ran manually.
-
-
In the Actions column for the SQL analysis task, click a button to perform the corresponding action.
-
Click View to view the basic information and run log of the task.
-
Click Rerun to run the task again.
Note-
For tasks in the Initializing state, you must wait two hours before you can rerun them.
-
If a SQL analysis task fails, you can rerun it to resolve the failure.
-
-
Next steps
After a scheduled SQL analysis task completes a run:
-
The output custom storage table is located in Data Storage > Offline storage > Custom storage table. For more information, see custom storage table.
-
You can use the output storage table as a data source for data API.