Skip to main content
Version: 2.5

SHOW ROUTINE LOAD TASK

Description

Shows the execution information of load tasks within a Routine Load job.

note

For the relationship between a Routine Load job and the load tasks in it, see Load data using Routine Load

Syntax

SHOW ROUTINE LOAD TASK
[ FROM <db_name>]
[ WHERE JobName = <job_name> ]
note

You can add the \G option to the statement (such as SHOW ROUTINE LOAD TASK WHERE JobName = <job_name>\G) to vertically display the return result rather than in the usual horizontal table format.

Parameters

ParameterRequiredDescription
db_nameNoThe name of the database to which the Routine Load job belongs.
JobNameNoThe name of the Routine Load job.

Output

ParameterDescription
TaskIdThe globally unique ID of the load task, automatically generated by StarRocks.
TxnIdThe ID of the transaction to which the load task belongs.
TxnStatusThe status of the transaction to which the load task belongs. UNKNOWN indicates that the transaction is not started yet, possibly because the load task is not dispatched or executed.
JobIdThe ID of the load job.
CreateTimeThe date and time when the load task was created.
LastScheduledTimeThe date and time when the load task was last scheduled.
ExecuteStartTimeThe date and time when the load task was executed.
TimeoutThe timeout period for the load task, controlled by the FE parameter routine_load_task_timeout_second and the task_timeout_second parameter in job_properties for the Routine Load job.
BeIdThe ID of the BE that executes the load task.
DataSourcePropertiesThe load task's progress (measured in the offset) of consuming messages in partitions of the topic.
MessageThe information returned for the load task, including task error information.

Examples

View all load tasks in the Routine Load job example_tbl_ordertest.

MySQL [example_db]> SHOW ROUTINE LOAD TASK WHERE JobName = "example_tbl_ordertest";  
+--------------------------------------+-------+-----------+-------+---------------------+---------------------+------------------+---------+------+------------------------------------+-----------------------------------------------------------------------------+
| TaskId | TxnId | TxnStatus | JobId | CreateTime | LastScheduledTime | ExecuteStartTime | Timeout | BeId | DataSourceProperties | Message |
+--------------------------------------+-------+-----------+-------+---------------------+---------------------+------------------+---------+------+------------------------------------+-----------------------------------------------------------------------------+
| abde6998-c19a-43d6-b48c-6ca7e14144a3 | -1 | UNKNOWN | 10208 | 2023-12-22 12:46:10 | 2023-12-22 12:47:00 | NULL | 60 | -1 | Progress:{"0":6},LatestOffset:null | there is no new data in kafka/pulsar, wait for 10 seconds to schedule again |
+--------------------------------------+-------+-----------+-------+---------------------+---------------------+------------------+---------+------+------------------------------------+-----------------------------------------------------------------------------+
1 row in set (0.00 sec)