[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/bigquery/docs/continuous-queries-introduction#supported_functionality [Back]  [Original]

Introduction to continuous queries  |  BigQuery  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

Introduction to continuous queries

This document describes BigQuery continuous queries.

BigQuery continuous queries are SQL statements that run continuously. Continuous queries let you analyze incoming data in BigQuery in real time. You can insert the output rows produced by a continuous query into a BigQuery table or export them to Pub/Sub, Bigtable, or Spanner. Continuous queries can process data that has been written to standard BigQuery tables by using one of the following methods:

You can use continuous queries to perform time-sensitive tasks, such as creating and immediately acting on insights, applying real-time machine learning (ML) inference, and replicating data into other platforms. This lets you use BigQuery as an event-driven data processing engine for your application's decision logic.

The following diagram shows common continuous query workflows:

Diagram illustrating common BigQuery continuous query workflows, including data ingestion, processing, and export to destinations like Bigtable and Pub/Sub. [Diagram illustrating common BigQuery continuous query workflows, including data ingestion, processing, and export to destinations like Bigtable and Pub/Sub.]

Use cases

Common use cases where you might want to use continuous queries are as follows:

Supported functionality

The following operations are supported in continuous queries:

Supported stateful operations

Preview

This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

To request support or provide feedback for this feature, send an email to bq-continuous-queries-feedback@google.com.

Stateful operations let continuous queries perform complex analysis that requires retaining information across multiple rows or time intervals. While stateless functions process each row independently, stateful operations maintain the state of ingested data to support functions like JOINs, aggregations, and window aggregations. This capability lets you correlate events from different streams or calculate metrics over timesuch as a 30-minute averageby storing necessary data in memory while the query runs.

Continuous queries support the following stateful operations:

Authorization

The Google Cloud access tokens that are used when running continuous query jobs have a time to live (TTL) of two days when they are generated by a user account. Therefore, such jobs stop running after two days. The access tokens that are generated by service accounts can run longer, but must still adhere to the maximum query runtime. For more information, see Run a continuous query by using a service account.

Locations

For a list of supported regions, see BigQuery continuous query locations.

Limitations

Continuous queries are subject to the following limitations:

Reservation limitations

Slots autoscaling

Continuous queries can use slot autoscaling to dynamically scale allocated capacity to accommodate your workload. As your continuous queries workload increases or decreases, BigQuery dynamically adjusts your slots.

After a continuous query starts running, it actively listens for incoming data, which consumes slot resources. While a reservation with a running continuous query does not scale down to zero slots, an idle continuous query that is primarily listening for incoming data is expected to consume a minimal amount of slots, typically around 1 slot.

Idle slot sharing

Continuous queries can use idle slot sharing to share unused slot resources with other reservations and job types.

Pricing

Continuous queries can use BigQuery fluid scaling.

Continuous queries use BigQuery capacity compute pricing, which is measured in slots. To run continuous queries, you must have a reservation that uses the Enterprise or Enterprise Plus edition, and a reservation assignment that uses the CONTINUOUS job type.

Usage of other BigQuery resources, such as data ingestion and storage, are charged at the rates shown in BigQuery pricing.

Usage of other services that receive continuous query results or that are called during continuous query processing are charged at the rates published for those services. For the pricing of other Google Cloud services used by continuous queries, see the following topics:

Estimating slot capacity requirements

Because every workload is different, an exact slot estimation for continuous queries is often not possible upfront. The amount of slots required by your continuous queries depends on a combination of several factors:

Conceptually, you can estimate your total slot requirement as a function of your continuous query workload:

Estimated Slots Number of continuous queries x (Data rate x Query complexity)

Because actual slot consumption heavily depends on your unique workload and data patterns, the most accurate method for estimating cost is to monitor a running job. You can measure the peak slot usage of an isolated continuous query run using INFORMATION_SCHEMA views. For detailed instructions and example queries to track slot usage over time, see View slot consumption information.

What's next

Try creating a continuous query.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page