Skip to main content
This documentation is for an unreleased version of Apache Doris.
For usage, please refer to the official documentation of Version 2.1 or Version 3.x .

JOBS

Description

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

Syntax

JOBS(
"type"="<type>"
)

Required Parameters

FieldDescription
<type>The type of the job:
insert: Insert into type job.
mv: Materialized view job.

Return Value

  • jobs("type"="insert") Job return value of type insert

    FieldDescription
    IdJob ID
    NameJob name
    DefinerJob definer
    ExecuteTypeExecution type
    RecurringStrategyRecurring strategy
    StatusJob status
    ExecuteSqlExecution SQL
    CreateTimeJob creation time
    SucceedTaskCountNumber of successful tasks
    FailedTaskCountNumber of failed tasks
    CanceledTaskCountNumber of canceled tasks
    CommentJob comment
  • jobs("type"="mv") MV type job return value

    FieldDescription
    Idjob ID
    Namejob name
    MvIdMaterialized View ID
    MvNameMaterialized View Name
    MvDatabaseIdDB ID of the materialized view
    MvDatabaseNameName of the database to which the materialized view belongs
    ExecuteTypeExecution type
    RecurringStrategyLoop strategy
    StatusJob status
    CreateTimeTask creation time

Examples

View jobs in all materialized views

select*from jobs("type"="mv");
+-------+------------------+-------+--------------------------+--------------+--------------------------------------------------------+-------------+-------------------+---------+---------------------+
| Id | Name | MvId | MvName | MvDatabaseId | MvDatabaseName | ExecuteType | RecurringStrategy | Status | CreateTime |
+-------+------------------+-------+--------------------------+--------------+--------------------------------------------------------+-------------+-------------------+---------+---------------------+
| 23369 | inner_mtmv_23363 | 23363 | range_date_up_union_mv1 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | MANUAL | MANUAL TRIGGER | RUNNING | 2025年01月08日 18:19:10 |
| 23377 | inner_mtmv_23371 | 23371 | range_date_up_union_mv2 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | MANUAL | MANUAL TRIGGER | RUNNING | 2025年01月08日 18:19:10 |
| 21794 | inner_mtmv_21788 | 21788 | test_tablet_type_mtmv_mv | 16016 | zd | MANUAL | MANUAL TRIGGER | RUNNING | 2025年01月08日 12:26:06 |
| 19508 | inner_mtmv_19494 | 19494 | mv1 | 16016 | zd | MANUAL | MANUAL TRIGGER | RUNNING | 2025年01月07日 22:13:31 |
+-------+------------------+-------+--------------------------+--------------+--------------------------------------------------------+-------------+-------------------+---------+---------------------+

View all insert jobs

select*from jobs("type"="insert");
+----------------+----------------+---------+-------------+--------------------------------------------+---------+--------------------------------------------------------------+---------------------+------------------+-----------------+-------------------+---------+
| Id | Name | Definer | ExecuteType | RecurringStrategy | Status | ExecuteSql | CreateTime | SucceedTaskCount | FailedTaskCount | CanceledTaskCount | Comment |
+----------------+----------------+---------+-------------+--------------------------------------------+---------+--------------------------------------------------------------+---------------------+------------------+-----------------+-------------------+---------+
| 78533940810334 | insert_tab_job | root | RECURRING | EVERY 10 MINUTE STARTS 2025年01月17日 14:42:53 | RUNNING | INSERT INTO test.insert_tab SELECT * FROM test.example_table | 2025年01月17日 14:32:53 | 0 | 0 | 0 | |
+----------------+----------------+---------+-------------+--------------------------------------------+---------+--------------------------------------------------------------+---------------------+------------------+-----------------+-------------------+---------+

AltStyle によって変換されたページ (->オリジナル) /