jobs

Name

jobs

description

Table function, generating a temporary task table, which can view job information in a certain task type.

This function is used in the from clause.

This function is supported since 2.1.0.

syntax

jobs("type"="")

parameter description

parameterdescriptiontyperequired
typejob typestringyes

the type supported types

  • insert: insert into type job
  • mv: materialized view job
insert job

jobs(“type”=”insert”)Table structure:

  1. mysql> desc function jobs("type"="insert");
  2. +-------------------+------+------+-------+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +-------------------+------+------+-------+---------+-------+
  5. | Id | TEXT | No | false | NULL | NONE |
  6. | Name | TEXT | No | false | NULL | NONE |
  7. | Definer | TEXT | No | false | NULL | NONE |
  8. | ExecuteType | TEXT | No | false | NULL | NONE |
  9. | RecurringStrategy | TEXT | No | false | NULL | NONE |
  10. | Status | TEXT | No | false | NULL | NONE |
  11. | ExecuteSql | TEXT | No | false | NULL | NONE |
  12. | CreateTime | TEXT | No | false | NULL | NONE |
  13. | SucceedTaskCount | TEXT | No | false | NULL | NONE |
  14. | FailedTaskCount | TEXT | No | false | NULL | NONE |
  15. | CanceledTaskCount | TEXT | No | false | NULL | NONE |
  16. | Comment | TEXT | No | false | NULL | NONE |
  17. +-------------------+------+------+-------+---------+-------+
  18. 12 rows in set (0.01 sec)
  • Id: job ID.
  • Name: job name.
  • Definer: job definer.
  • ExecuteType: Execution type
  • RecurringStrategy: recurring strategy
  • Status: Job status
  • ExecuteSql: Execution SQL
  • CreateTime: Job creation time
  • SucceedTaskCount: Number of successful tasks
  • FailedTaskCount: Number of failed tasks
  • CanceledTaskCount: Number of canceled tasks
  • Comment: job comment
matterialized view job

jobs(“type”=”mv”)Table structure:

  1. mysql> desc function jobs("type"="mv");
  2. +-------------------+------+------+-------+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +-------------------+------+------+-------+---------+-------+
  5. | Id | TEXT | No | false | NULL | NONE |
  6. | Name | TEXT | No | false | NULL | NONE |
  7. | MvId | TEXT | No | false | NULL | NONE |
  8. | MvName | TEXT | No | false | NULL | NONE |
  9. | MvDatabaseId | TEXT | No | false | NULL | NONE |
  10. | MvDatabaseName | TEXT | No | false | NULL | NONE |
  11. | ExecuteType | TEXT | No | false | NULL | NONE |
  12. | RecurringStrategy | TEXT | No | false | NULL | NONE |
  13. | Status | TEXT | No | false | NULL | NONE |
  14. | CreateTime | TEXT | No | false | NULL | NONE |
  15. +-------------------+------+------+-------+---------+-------+
  16. 10 rows in set (0.00 sec)
  • Id: job ID.
  • Name: job name.
  • MvId: Materialized View ID
  • MvName: Materialized View Name
  • MvDatabaseId: DB ID of the materialized view
  • MvDatabaseName: Name of the database to which the materialized view belongs
  • ExecuteType: Execution type
  • RecurringStrategy: Loop strategy
  • Status: Job status
  • CreateTime: Task creation time

example

  1. View jobs in all materialized views
  1. mysql> select * from jobs("type"="mv");
  1. View job with name inner_mtmv_75043
  1. mysql> select * from jobs("type"="mv") where Name="inner_mtmv_75043";
  1. View all insert jobs
  1. mysql> select * from jobs("type"="insert");
  1. View job with name one_insert_job
  1. mysql> select * from jobs("type"="insert") where Name='one_insert_job';

keywords

  1. jobs, job, insert, mv, materialized view, schedule