High severityexecution
Power BI Refresh Error:
TRANSACTION_ABORTED
What does this error mean?
A Databricks SQL transaction was aborted and all subsequent statements in the same session are rejected until a ROLLBACK TRANSACTION is issued to clear the aborted state.
Common causes
- 1A statement within an explicit BEGIN TRANSACTION block failed, leaving the transaction in an aborted state
- 2The session exceeded the idle transaction timeout, causing the transaction to be automatically aborted by the server
- 3A constraint violation or type error within a transaction caused the entire transaction to be marked as failed
How to fix it
- 1Step 1: Issue ROLLBACK TRANSACTION to clear the aborted transaction state before executing any further SQL in the same session.
- 2Step 2: Review the previous statement that triggered the abort — check for constraint violations, type mismatches, or timeout conditions.
- 3Step 3: Wrap transaction logic in a try/except block and issue ROLLBACK in the exception handler to keep the connection in a usable state.
- 4Step 4: If the abort was caused by an idle timeout, reduce the transaction scope to keep it short and avoid leaving connections idle while holding a transaction.