Documentation Home
HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 2.4Mb
PDF (A4) - 2.4Mb


2.6.4.3 Viewing List of Tasks

This topic describes how to view a paginated list of tasks based on the given task type.

Before You Begin

Ensure that you have the required roles.

Viewing List of Tasks Based on the Task Type

To retrieve tasks of a specific type with pagination, use the task_list function.

Press CTRL+C to copy
mysql> SELECT mysql_tasks.task_list('task_type', offset, limit);

Replace the following:

  • task_type: filters the tasks based on a specific task type. If the value is NULL, tasks of all types are included.

  • offset: the number of rows to skip. The offset value is used for pagination.

  • limit: the maximum number of task records included in the list of tasks.

For example:

Press CTRL+C to copy
mysql> SELECT mysql_tasks.task_list('Async_SQL', 5, 5)\G *************************** 1. row *************************** mysql_tasks.task_list('Async_SQL', 5, 5): [{"id": "69edecea-3b7b-11f0-a5dc-02001712c792", "data": {"country": "INDIA", "mysqlMetadata": {"autoGc": true, "events": ["`airportdb`.`69eddbea-3b7b-11f0-a5dc-02001712c792`"]}}, "name": "Create table for flight from JAPAN", "task_type": "Async_SQL", "connection_id": 5600}, {"id": "4f43d993-3b7b-11f0-a5dc-02001712c792", "data": {"country": "INDIA", "mysqlMetadata": {"autoGc": true, "events": ["`airportdb`.`4f43cb11-3b7b-11f0-a5dc-02001712c792`"]}}, "name": "Create table for flight from INDIA", "task_type": "Async_SQL", "connection_id": 5597}, ... 1 row in set (0.2259 sec)

This example lists all the tasks of task type Async_SQL.