Skip to main content
SHOW LOAD displays information of all load jobs or given load jobs in a database. This statement can only display load jobs that are created by using Broker Load, INSERT, and SPARK_LOAD. You can also view load job information via the curl command. From v3.1 onwards, we recommend that you use the SELECT statement to query the results of Broker Load or Insert jobs from the loads table in the information_schema database. For more information, see Loading. In addition to the preceding loading methods, the database supports using Stream Load and Routine Load to load data. Stream Load is a synchronous operation and will directly return information of Stream Load jobs. Routine Load is an asynchronous operation where you can use the SHOW ROUTINE LOAD statement to display information of Routine Load jobs. SHOW LOAD displays a load job if you hold at least one privilege on each table that the job loads data into, or the OPERATE privilege. Unless you hold the SELECT privilege on each of those tables, TaskInfo and TrackingSQL are NULL, ErrorMsg keeps only the failure type, and JobDetails omits the backends. The root user can see all load jobs in full. A load job whose target table has been dropped is shown in full only to the root user, and with these fields hidden to users with the OPERATE privilege. SHOW STREAM LOAD displays a Stream Load job if you hold at least one privilege on each table that the job loads data into, or the OPERATE privilege. Unless you hold the SELECT privilege on each of those tables, ErrorMsg, TrackingURL, and TrackingSQL are NULL. The root user can see all Stream Load jobs in full. A Stream Load job whose target table has been dropped is shown in full only to the root user, and with these fields hidden to users with the OPERATE privilege.

Syntax

Note You can add the \G option to the statement (such as SHOW LOAD WHERE LABEL = "label1"\G;) to vertically display output rather than in the usual horizontal table format. For more information, see Example 1.

Parameters

Output

The output of this statement varies based on loading methods.

Usage notes

  • The information returned by the SHOW LOAD statement is valid for 3 days from LoadFinishTime of a load job. After 3 days, the information cannot be displayed. You can use the label_keep_max_second parameter to modify the default validity period.
  • If the value of the LoadStartTime field is N/A for a long time, it means that load jobs heavily pile up. We recommended that you reduce the frequency of creating load jobs.
  • Total time period consumed by a load job = LoadFinishTime - CreateTime.
  • Total time period a load job consumed in the LOAD stage = LoadFinishTime - LoadStartTime.

Examples

Example 1: Vertically display all load jobs in your current database.
Example 2: Display two load jobs whose labels contain the string null in your current database.
Example 3: Display the load jobs whose labels contain the string table in example_db. In addition, the load jobs returned are displayed in descending order of the LoadStartTime field.
Example 4: Display the load job whose label is duplicate_table_with_null and state is FINISHED in example_db.
Example 5: Skip the first load job and display the next two load jobs. In addition, these two load jobs are sorted in ascending order.
Or
The output of the preceding statements is as follows.