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


2.20.1.4 task

The task routine returns information about a single task.

The application-level variant for this routine is app_task.

This topic contains the following sections:

Syntax
mysql> SELECT mysql_tasks.task(IN 'task_id' VARCHAR(36));

The task_id (VARCHAR(36)) parameter specifies the unique task ID (UUID) of the task whose information is required.

Syntax Example
mysql> SELECT JSON_PRETTY(mysql_tasks.task(@task_id));

This example retrieves all the task information associated with the task ID that is stored in the session variable @task_id. The output is similar to the following:

| {
  "id": "17efb56b-52a1-11f0-bca4-020017205654",
  "data": {
    "mysqlMetadata": {
      "autoGc": true,
      "events": [
        "`demo_db`.`17ef9cf8-52a1-11f0-bca4-020017205654`"
      ]
    }
  },
  "name": "DemoAsyncTask",
  "alias": "Thu-7",
  "task_type": "Async_SQL",
  "connection_id": 65220,
  "data_json_schema": {
    "type": "object",
    "required": [
      "mysqlMetadata"
    ],
    "properties": {
      "mysqlMetadata": {
        "type": "object",
        "required": [
          "events",
          "autoGc"
        ],
        "properties": {
          "autoGc": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "uniqueItems": true
          }
        }
      }
    }
  },
  "log_data_json_schema": null
} |