apache/beam · warning

Setting the triggering frequency is only applicable to an…

Error message

Setting the triggering frequency is only applicable to an unbounded PCollection.

What it means

Storage API triggering frequency paces flushes of a streaming (unbounded) write. When the input PCollection is bounded, there is no ongoing stream to pace, so a configured triggering frequency cannot apply and the sink logs this warning instead of failing.

Solutions

  1. Remove withTriggeringFrequency(...) for the bounded write
  2. Verify the input PCollection is actually intended to be unbounded; if so, ensure its coder/isBounded is unbounded
  3. Switch to STORAGE_WRITE_API with a truly unbounded source if periodic flushes are required

Example fix

// before
BigQueryIO.writeTableRows().to(table).withMethod(Method.STORAGE_WRITE_API).withTriggeringFrequency(Duration.standardMinutes(1)) // bounded input
// after
BigQueryIO.writeTableRows().to(table).withMethod(Method.STORAGE_WRITE_API) // triggering frequency removed
Defensive patterns

Strategy: validation

Validate before calling

if (input.isBounded() == PCollection.IsBounded.BOUNDED && triggeringFrequency != null) { /* remove triggering frequency */ }

Prevention

When it happens

Trigger: Calling withTriggeringFrequency(...) (so getStorageApiTriggeringFrequency != null) on a BigQueryIO write whose input PCollection is bounded.

Common situations: Batch pipelines that copied a streaming sink builder, or a pipeline whose input changed from unbounded (Pub/Sub) to bounded (batch source) without removing the frequency setting.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/d0dff76eda96442a. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:3907

            LOG.warn(
                "The setting of auto-sharding is ignored. It is only supported when writing an"
                    + " unbounded PCollection via FILE_LOADS, STREAMING_INSERTS or"
                    + " STORAGE_WRITE_API, but the method was {}.",
                method);
          }
        }
      } else { // PCollection is bounded
        checkArgument(
            getTriggeringFrequency() == null,
            "Triggering frequency is only applicable to an unbounded PCollection.");
        checkArgument(
            !getAutoSharding(), "Auto-sharding is only applicable to an unbounded PCollection.");
        checkArgument(
            getNumFileShards() == 0,
            "Number of file shards is only applicable to an unbounded PCollection.");

        if (getStorageApiTriggeringFrequency(bqOptions) != null) {
          LOG.warn(
              "Setting the triggering frequency is only applicable to an unbounded PCollection.");
        }
        if (getStorageApiNumStreams(bqOptions) != 0) {
          LOG.warn(
              "Setting the number of Storage API streams is only applicable to an unbounded PCollection.");
        }
      }

      if (method == Method.STORAGE_API_AT_LEAST_ONCE && getStorageApiNumStreams(bqOptions) != 0) {
        LOG.warn(
            "Setting a number of Storage API streams is only supported when using STORAGE_WRITE_API");
      }

      if (method != Method.STORAGE_WRITE_API && method != Method.STORAGE_API_AT_LEAST_ONCE) {
        checkArgument(
            !getAutoSchemaUpdate(),
            "withAutoSchemaUpdate only supported when using STORAGE_WRITE_API or STORAGE_API_AT_LEAST_ONCE.");
        checkArgument(

View on GitHub (pinned to 12126d8942)