> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# loads

> loads provides the results of load jobs.

`loads` provides the results of load jobs. This view is supported from StarRocks v3.1 onwards.

`loads` shows a load job to users who 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, the fields that can reveal the loaded data are hidden: `TRACKING_SQL`, `REJECTED_RECORD_PATH`, and `PROPERTIES` are NULL, `ERROR_MSG` keeps only the failure type of a Broker Load or INSERT job (for example, `type:ETL_QUALITY_UNSATISFIED`) and is NULL for other jobs, and `RUNTIME_DETAILS` omits the load IDs, the backends, and the transaction error message. 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.

The following fields are provided in `loads`:

| Field | Description |
| - | - |
| ID | Globally unique identifier. |
| LABEL | Label of the load job. |
| PROFILE\_ID | The ID of the Profile, which can be analyzed via `ANALYZE PROFILE`. |
| DB\_NAME | The database to which the target table belongs. |
| TABLE\_NAME | The target table. |
| USER | The user who initiates the load job. |
| WAREHOUSE | The warehouse to which the load job belongs. |
| STATE | The state of the load job. Valid values:<ul><li>`PENDING`/`BEGIN`: The load job is created.</li><li>`QUEUEING`/`BEFORE_LOAD`: The load job is in the queue waiting to be scheduled.</li><li>`LOADING`: The load job is running.</li><li>`PREPARING`: The transaction is being pre-committed.</li><li>`PREPARED`: The transaction has been pre-committed.</li><li>`COMMITED`: The transaction has been committed.</li><li>`FINISHED`: The load job succeeded.</li><li>`CANCELLED`: The load job failed.</li></ul> |
| PROGRESS | The progress of the ETL stage and LOADING stage of the load job. |
| TYPE | The type of the load job. For Broker Load, the return value is `BROKER`. For INSERT, the return value is `INSERT`. For Spark Load, the return value is `SPARK`. For Stream Load, the return value is `STREAM_LOAD`. For Routine Load, the return value is `ROUTINE_LOAD`. |
| PRIORITY | The priority of the load job. Valid values: `HIGHEST`, `HIGH`, `NORMAL`, `LOW`, and `LOWEST`. |
| SCAN\_ROWS | The number of data rows that are scanned. |
| SCAN\_BYTES | The number of bytes that are scanned. |
| FILTERED\_ROWS | The number of data rows that are filtered out due to inadequate data quality. |
| UNSELECTED\_ROWS | The number of data rows that are filtered out due to the conditions specified in the WHERE clause. |
| SINK\_ROWS | The number of data rows that are loaded. |
| RUNTIME\_DETAILS | Load runtime metadata. For details, see [RUNTIME\_DETAILS](#runtime_details). |
| CREATE\_TIME | The time at which the load job was created. Format: `yyyy-MM-dd HH:mm:ss.SSSSSS`. Example: `2023-07-24 14:58:58.123000`. |
| LOAD\_START\_TIME | The start time of the LOADING stage of the load job. Format: `yyyy-MM-dd HH:mm:ss.SSSSSS`. Example: `2023-07-24 14:58:58.123000`. |
| LOAD\_COMMIT\_TIME | The time at which the loading transaction was committed. Format: `yyyy-MM-dd HH:mm:ss.SSSSSS`. Example: `2023-07-24 14:58:58.123000`. |
| LOAD\_FINISH\_TIME | The end time of the LOADING stage of the load job. Format: `yyyy-MM-dd HH:mm:ss.SSSSSS`. Example: `2023-07-24 14:58:58.123000`. |
| PROPERTIES | The static properties of the load job. For details, see [PROPERTIES](#properties). |
| ERROR\_MSG | The error message of the load job. If the load job did not encounter any error, `NULL` is returned. |
| TRACKING\_SQL | The SQL statement that can be used to query the tracking log of the load job. A SQL statement is returned only when the load job involves unqualified data rows. If the load job does not involve any unqualified data rows, `NULL` is returned. |
| REJECTED\_RECORD\_PATH | The path from which you can access all the unqualified data rows that are filtered out in the load job. The number of unqualified data rows logged is determined by the `log_rejected_record_num` parameter configured in the load job. You can use the `wget` command to access the path. If the load job does not involve any unqualified data rows, `NULL` is returned. |

**Note**

From v4.2 onwards, `CREATE_TIME`, `LOAD_START_TIME`, `LOAD_COMMIT_TIME`, and `LOAD_FINISH_TIME` carry millisecond precision. The sub-second part is rendered as six fractional digits, of which the last three are always `0` (for example, `2023-07-24 14:58:58.123000`). Predicates on these fields, such as `LOAD_FINISH_TIME <= '2023-07-24 14:58:58'`, are also evaluated at millisecond precision. In earlier versions, these fields are second-precision (format `yyyy-MM-dd HH:mm:ss`).

## RUNTIME\_DETAILS

* Universal metrics:

| Metric | Description |
| - | - |
| load\_id | Globally unique ID of the load execution plan. |
| txn\_id | Load transaction ID. |

* Specific metrics for Broker Load, INSERT INTO, and Spark Load:

| Metric | Description |
| - | - |
| etl\_info | ETL Details. This field is only valid for Spark Load jobs. For other types of load jobs, the value will be empty. |
| etl\_start\_time | The start time of the ETL stage of the load job. Format: `yyyy-MM-dd HH:mm:ss`. Example: `2023-07-24 14:58:58`. |
| etl\_start\_time | The end time of the ETL stage of the load job. Format: `yyyy-MM-dd HH:mm:ss`. Example: `2023-07-24 14:58:58`. |
| unfinished\_backends | List of BEs with unfinished executions. |
| backends | List of BEs participating in execution. |
| file\_num | Number of files read. |
| file\_size | Total size of files read. |
| task\_num | Number of subtasks. |

* Specific metrics for Routine Load:

| Metric | Description |
| - | - |
| schedule\_interval | The interval for Routine Load to be scheduled. |
| wait\_slot\_time | Time elapsed while the Routine Load task waits for execution slots. |
| check\_offset\_time | Time consumed when checking offset information during Routine Load task scheduling. |
| consume\_time | Time consumed by the Routine Load task to read upstream data. |
| plan\_time | Time for generating the execution plan. |
| commit\_publish\_time | Time consumed to execute the COMMIT RPC. |

* Specific metrics for Stream Load:

| Metric | Description |
| - | - |
| timeout | Timeout for load tasks. |
| begin\_txn\_ms | Time consumed to begin the transaction. |
| plan\_time\_ms | Time for generating the execution plan. |
| receive\_data\_time\_ms | Time for receiving data. |
| commit\_publish\_time\_ms | Time consumed to execute the COMMIT RPC. |
| client\_ip | Client IP address. |

## PROPERTIES

* Specific properties for Broker Load, INSERT INTO, and Spark Load:

| Property | Description |
| - | - |
| timeout | Timeout for load tasks. |
| max\_filter\_ratio | Maximum ratio of data rows that are filtered out due to inadequate data quality. |

* Specific properties for Routine Load:

| Property | Description |
| - | - |
| job\_name | Routine Load job name. |
| task\_num | Number of subtasks actually executed in parallel. |
| timeout | Timeout for load tasks. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.