---
title: interruptOperation
description: "SparkSession.interruptOperation method in PySpark: Interrupt an operation of this session with the given operation ID."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/sparksession/interruptOperation
---

# interruptOperation

Interrupt an operation of this session with the given operation ID.

## Syntax

```
interruptOperation(op_id)
```

## Parameters

| Parameter | Type | Description                           |
| --------- | ---- | ------------------------------------- |
| `op_id`   | str  | The ID of the operation to interrupt. |

## Returns

`list of str`

List of operation IDs of interrupted operations.

## Notes

There is still a possibility of an operation finishing just as it is interrupted.
