Skip to main content

SHOW TRANSACTION

Description​

This syntax is used to view transaction details for the specified transaction id or label.

Syntax​

SHOW TRANSACTION
[FROM <db_name>]
WHERE
[id = <transaction_id> | label = <label_name>];

Required Parameters​

1. <transaction_id>

The transaction ID whose details need to be viewed.

2. <label_name>

The label whose transaction details need to be viewed.

Optional Parameters​

1. <db_name>

The database whose transaction details need to be viewed.

Return Value​

Column NameDescription
TransactionIdTransaction ID
LabelLabel associated with the import task
CoordinatorNode responsible for coordinating the transaction
TransactionStatusStatus of the transaction
PREPAREPreparation phase
COMMITTEDTransaction succeeded, but data is not visible yet
VISIBLETransaction succeeded, and data is visible
ABORTEDTransaction failed
LoadJobSourceTypeType of the import task
PrepareTimeStart time of the transaction
CommitTimeTime when the transaction was successfully committed
FinishTimeTime when the data became visible
ReasonError message
ErrorReplicasCountNumber of replicas with errors
ListenerIdID of the related import job
TimeoutMsTransaction timeout duration in milliseconds

Access Control Requirements​

PrivilegeObjectNotes
ADMIN_PRIVDatabaseOnly users with ADMIN_PRIV can perform this operation.

Examples​

  1. View the transaction with id 4005:

    SHOW TRANSACTION WHERE ID=4005;
  2. In the specified db, view the transaction with id 4005:

    SHOW TRANSACTION FROM db WHERE ID=4005;
  3. View the transaction whose label is label_name:

    SHOW TRANSACTION WHERE LABEL = 'label_name';