---
title: STREAMING_BATCH_ID_NOT_SUPPORTED error condition
description: Documentation for the STREAMING\_BATCH\_ID\_NOT\_SUPPORTED error condition on Databricks
canonical_url: https://docs.databricks.com/gcp/en/error-messages/streaming-batch-id-not-supported-error-class
---

# STREAMING\_BATCH\_ID\_NOT\_SUPPORTED error condition

[SQLSTATE: 0A000](https://docs.databricks.com/gcp/en/error-messages/sqlstates.md#class-0a-feature-not-supported)

streaming\_batch\_id() is not supported

## BATCH\_QUERY

in batch queries.

## CONTINUOUS\_PROCESSING

in continuous processing mode (Trigger.Continuous).

## CTE\_KEY

as a window, sort, or join key outside the common table expression (CTE) that defines it. Define streaming\_batch\_id() outside the CTE.

## EVENT\_TIME\_WINDOW

as an input key combined with an event-time window. Remove the event-time window or streaming\_batch\_id().

## GROUPING\_SETS

as a key of grouping sets unless every set includes it, for example, `GROUP BY` bid, `ROLLUP`(...).

## JOIN\_CONDITION

in a stream-stream join condition. Remove it from the join condition, or use it in an aggregation, deduplication, window function, or sort instead.

## LIMIT\_ON\_SORT

in a sort followed by a global limit. Use row\_number() over streaming\_batch\_id() for a per-batch top-N.

## REAL\_TIME\_MODE

in real-time mode.

## SORT\_KEY

in sort/orderBy unless it is the leading, ascending key.

## STATEFUL\_OPERATOR\_KEY

as a key of `<operator>`.

## SUBQUERY\_EXPRESSION

inside a subquery expression.

## WATERMARKED\_INPUT

with a watermarked event-time column in the input. Remove streaming\_batch\_id() from the keys, or remove the watermark.
