SHOW-TRANSACTION

Name

SHOW TRANSACTION

Description

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

grammar:

1. SHOW TRANSACTION
2. [FROM db_name]
3. WHERE
4. [id=transaction_id]
5. [label = label_name];

Example of returned result:

1. TransactionId: 4005
2. Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d
3. Coordinator: FE: 10.74.167.16
4. TransactionStatus: VISIBLE
5. LoadJobSourceType: INSERT_STREAMING
6. PrepareTime: 2020-01-09 14:59:07
7. CommitTime: 2020-01-09 14:59:09
8. FinishTime: 2020-01-09 14:59:09
9. Reason:
10. ErrorReplicasCount: 0
11. ListenerId: -1
12. TimeoutMs: 300000
  • TransactionId: transaction id
  • Label: the label corresponding to the import task
  • Coordinator: The node responsible for transaction coordination
  • TransactionStatus: transaction status
  • PREPARE: preparation stage
  • COMMITTED: The transaction succeeded, but the data was not visible
  • VISIBLE: The transaction succeeded and the data is visible
  • ABORTED: Transaction failed
  • LoadJobSourceType: Type of import job.
  • PrepareTime: transaction start time
  • CommitTime: The time when the transaction was successfully committed
  • FinishTime: The time when the data is visible
  • Reason: error message
  • ErrorReplicasCount: The number of replicas with errors
  • ListenerId: The id of the related import job
  • TimeoutMs: Transaction timeout, in milliseconds

Example

  1. View the transaction with id 4005:

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

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

1. SHOW TRANSACTION WHERE LABEL = 'label_name';

Keywords

1. SHOW, TRANSACTION

Best Practice