メインコンテンツまでスキップ
バージョン: 4.x

タスク

デスクリプション

Table関数で、タスクの一時Tableを生成します。これにより、現在のDorisクラスター内のジョブによって生成されたタスクの情報を表示できます。

Syntax

TASKS(
"type"="<type>"
)

必須パラメータ

Fieldデスクリプション
<type>タスクのタイプ:
insert: insertタイプのタスク。
mv: materialized viewタイプのタスク。

戻り値

  • tasks("type"="insert") insertタイプのタスクの戻り値

    Field Nameデスクリプション
    TaskIdタスクID
    JobIdジョブID
    JobNameジョブ名
    Labelラベル
    Statusタスクステータス
    ErrorMsgタスク失敗情報
    CreateTimeタスク作成時刻
    FinishTimeタスク完了時刻
    TrackingUrlトラッキングURL
    LoadStatisticロード統計
    Userユーザー
  • tasks("type"="mv") MVタイプのタスクの戻り値

    Field Nameデスクリプション
    TaskIdタスクID
    JobIdジョブID
    JobNameジョブ名
    MvIdMaterialized View ID
    MvNameMaterialized View名
    MvDatabaseIdmaterialized viewのDB ID
    MvDatabaseNamematerialized viewが属するデータベースの名前
    Statusタスクステータス
    ErrorMsgタスク失敗情報
    CreateTimeタスク作成時刻
    StartTimeタスク開始実行時刻
    FinishTimeタスク終了実行時刻
    DurationMsタスク実行時間
    TaskContextタスク実行パラメータ
    RefreshModeリフレッシュモード
    NeedRefreshPartitionsこのタスクでリフレッシュが必要なパーティション情報
    CompletedPartitionsこのタスクでリフレッシュが完了したパーティション情報
    Progressタスク実行進捗

すべてのmaterialized viewのタスクを表示

select * from tasks("type"="mv");
+-----------------+-------+------------------+-------+--------------------------+--------------+--------------------------------------------------------+---------+----------+---------------------+---------------------+---------------------+------------+-------------------------------------------------------------+-------------+-----------------------------------------------+-----------------------------------------------+---------------+-----------------------------------+
| TaskId | JobId | JobName | MvId | MvName | MvDatabaseId | MvDatabaseName | Status | ErrorMsg | CreateTime | StartTime | FinishTime | DurationMs | TaskContext | RefreshMode | NeedRefreshPartitions | CompletedPartitions | Progress | LastQueryId |
+-----------------+-------+------------------+-------+--------------------------+--------------+--------------------------------------------------------+---------+----------+---------------------+---------------------+---------------------+------------+-------------------------------------------------------------+-------------+-----------------------------------------------+-----------------------------------------------+---------------+-----------------------------------+
| 509478985247053 | 23369 | inner_mtmv_23363 | 23363 | range_date_up_union_mv1 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | SUCCESS | | 2025-01-08 18:19:10 | 2025-01-08 18:19:10 | 2025-01-08 18:19:10 | 233 | {"triggerMode":"SYSTEM","isComplete":false} | COMPLETE | ["p_20231001_20231101"] | ["p_20231001_20231101"] | 100.00% (1/1) | 71897c47d0d94fd2-9ca52a0e6eb3bff5 |
| 509486915704885 | 23369 | inner_mtmv_23363 | 23363 | range_date_up_union_mv1 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | SUCCESS | | 2025-01-08 18:19:17 | 2025-01-08 18:19:17 | 2025-01-08 18:19:17 | 227 | {"triggerMode":"MANUAL","partitions":[],"isComplete":false} | PARTIAL | ["p_20231101_20231201"] | ["p_20231101_20231201"] | 100.00% (1/1) | 9bf5ff69d4cc4c78-b50505436c8410c4 |
| 509487197275880 | 23369 | inner_mtmv_23363 | 23363 | range_date_up_union_mv1 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | SUCCESS | | 2025-01-08 18:19:18 | 2025-01-08 18:19:18 | 2025-01-08 18:19:18 | 191 | {"triggerMode":"MANUAL","partitions":[],"isComplete":false} | PARTIAL | ["p_20231101_20231201"] | ["p_20231101_20231201"] | 100.00% (1/1) | 5b3b4525b6774b5b-89b070042cdcbcd5 |
| 509478131194211 | 23377 | inner_mtmv_23371 | 23371 | range_date_up_union_mv2 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | SUCCESS | | 2025-01-08 18:19:10 | 2025-01-08 18:19:10 | 2025-01-08 18:19:10 | 156 | {"triggerMode":"SYSTEM","isComplete":false} | COMPLETE | ["p_20231001_20231101"] | ["p_20231001_20231101"] | 100.00% (1/1) | 6d0a0782819b446e-b9da5d5de513ce00 |
| 509486057129101 | 23377 | inner_mtmv_23371 | 23371 | range_date_up_union_mv2 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | SUCCESS | | 2025-01-08 18:19:17 | 2025-01-08 18:19:17 | 2025-01-08 18:19:18 | 213 | {"triggerMode":"MANUAL","partitions":[],"isComplete":false} | PARTIAL | ["p_20231101_20231201"] | ["p_20231101_20231201"] | 100.00% (1/1) | f1303483e3db43e7-aa424acc32dc39ca |
| 509486143784554 | 23377 | inner_mtmv_23371 | 23371 | range_date_up_union_mv2 | 21805 | regression_test_nereids_rules_p0_mv_create_part_and_up | SUCCESS | | 2025-01-08 18:19:18 | 2025-01-08 18:19:18 | 2025-01-08 18:19:18 | 151 | {"triggerMode":"MANUAL","partitions":[],"isComplete":false} | PARTIAL | ["p_20231101_20231201"] | ["p_20231101_20231201"] | 100.00% (1/1) | 8d29b11ac41f4fe0-9d7c86372707310b |
| 488317385772600 | 21794 | inner_mtmv_21788 | 21788 | test_tablet_type_mtmv_mv | 16016 | zd | SUCCESS | | 2025-01-08 12:26:29 | 2025-01-08 12:26:29 | 2025-01-08 12:26:29 | 1 | {"triggerMode":"MANUAL","partitions":[],"isComplete":true} | NOT_REFRESH | [] | \N | \N | |
| 437156301250803 | 19508 | inner_mtmv_19494 | 19494 | mv1 | 16016 | zd | SUCCESS | | 2025-01-07 22:13:48 | 2025-01-07 22:13:48 | 2025-01-07 22:17:45 | 236985 | {"triggerMode":"MANUAL","partitions":[],"isComplete":false} | COMPLETE | ["p_20210101_MAXVALUE","p_20200101_20210101"] | ["p_20210101_MAXVALUE","p_20200101_20210101"] | 100.00% (2/2) | 7965b4ddce8a4480-8884e9701679c1c4 |
| 439689059641969 | 19508 | inner_mtmv_19494 | 19494 | mv1 | 16016 | zd | SUCCESS | | 2025-01-07 22:55:59 | 2025-01-07 22:55:59 | 2025-01-07 22:55:59 | 35 | {"triggerMode":"MANUAL","partitions":[],"isComplete":false} | NOT_REFRESH | [] | \N | \N | |
+-----------------+-------+------------------+-------+--------------------------+--------------+--------------------------------------------------------+---------+----------+---------------------+---------------------+---------------------+------------+-------------------------------------------------------------+-------------+-----------------------------------------------+-----------------------------------------------+---------------+-----------------------------------+

全てのinsertタスクのタスクを表示する

select * from tasks("type"="insert");
+----------------+----------------+----------------+-------------------------------+---------+----------+---------------------+---------------------+---------------------+-------------+---------------+------+
| TaskId | JobId | JobName | Label | Status | ErrorMsg | CreateTime | StartTime | FinishTime | TrackingUrl | LoadStatistic | User |
+----------------+----------------+----------------+-------------------------------+---------+----------+---------------------+---------------------+---------------------+-------------+---------------+------+
| 79133848479750 | 78533940810334 | insert_tab_job | 78533940810334_79133848479750 | SUCCESS | | 2025-01-17 14:42:54 | 2025-01-17 14:42:54 | 2025-01-17 14:42:54 | | | root |
+----------------+----------------+----------------+-------------------------------+---------+----------+---------------------+---------------------+---------------------+-------------+---------------+------+