---
title: get (StreamingQueryManager)
description: "StreamingQueryManager.get method in PySpark: Returns an active streaming query from this SparkSession by its unique ID."
canonical_url: https://docs.databricks.com/aws/en/pyspark/reference/classes/streamingquerymanager/get
---

# get (StreamingQueryManager)

Returns an active streaming query from this `SparkSession` by its unique ID.

## Syntax

```
get(id)
```

## Parameters

| Parameter | Type | Description                 |
| --------- | ---- | --------------------------- |
| `id`      | str  | The unique ID of the query. |

## Returns

`StreamingQuery`

## Notes

An exception is thrown if an active query with the given ID does not exist.

## Examples

```python
sdf = spark.readStream.format("rate").load()
sq = sdf.writeStream.format('memory').queryName('this_query').start()
sq = spark.streams.get(sq.id)
sq.isActive
# True
sq.stop()
```
