docs/en/sql-reference/sql-statements/loading_unloading/pipe/SHOW_PIPES.md
SHOW PIPES lists the pipes stored in a specified database or in the current database in use. This command is supported from v3.2 onwards.
SHOW PIPES [FROM <db_name>]
[
WHERE [ NAME { = "<pipe_name>" | LIKE "pipe_matcher" } ]
[ [AND] STATE = { "SUSPENDED" | "RUNNING" | "ERROR" } ]
]
[ ORDER BY <field_name> [ ASC | DESC ] ]
[ LIMIT { [offset, ] limit | limit OFFSET offset } ]
<db_name>The name of the database for which you want to query pipes. If you do not specify this parameter, the system returns the pipes for the current database in use.
The criteria based on which to query pipes.
<field_name>The field by which you want to sort the records returned.
The maximum number of records you want the system to return.
The command output consists of the following fields.
| Field | Description |
|---|---|
| DATABASE_NAME | The name of the database in which the pipe is stored. |
| PIPE_ID | The unique ID of the pipe. |
| PIPE_NAME | The name of the pipe. |
| TABLE_NAME | The name of the destination StarRocks table. |
| STATE | The status of the pipe. Valid values: RUNNING, FINISHED, SUSPENDED, and ERROR. |
| LOAD_STATUS | The overall status of the data files to be loaded via the pipe, including the following sub-fields:<ul><li>loadedFiles: the number of data files that have been loaded.</li><li>loadedBytes: the volume of data that has been loaded, measured in bytes.</li><li>LastLoadedTime: the date and time when the last data file was loaded. Format: yyyy-MM-dd HH:mm:ss. Example: 2023-07-24 14:58:58.</li></ul> |
| LAST_ERROR | The details about the last error that occurred during the pipe execution. Default value: NULL. |
| CREATED_TIME | The date and time when the pipe was created. Format: yyyy-MM-dd HH:mm:ss. Example: 2023-07-24 14:58:58. |
Switch to the database named mydatabase and show all the pipes in it:
USE mydatabase;
SHOW PIPES \G
Switch to the database named mydatabase and show the pipe named user_behavior_replica in it:
USE mydatabase;
SHOW PIPES WHERE NAME = 'user_behavior_replica' \G