{"record":{"id":"8a65f6236a04d75a","repo":"apache/beam","slug":"storage-api-triggering-frequency-option-will-be-ignored-is","errorCode":null,"errorMessage":"Storage API triggering frequency option will be ignored is it can only be specified only when writing via STORAGE_WRITE_API, but the method was {}.","messagePattern":"Storage API triggering frequency option will be ignored is it can only be specified only when writing via STORAGE_WRITE_API, but the method was (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java","lineNumber":3874,"sourceCode":"          checkArgument(\n              triggeringFrequency != null,\n              \"When writing an unbounded PCollection via FILE_LOADS or STORAGE_WRITE_API, \"\n                  + \"triggering frequency must be specified\");\n        } else {\n          checkArgument(\n              getTriggeringFrequency() == null,\n              \"Triggering frequency can be specified only when writing via FILE_LOADS or STORAGE_WRITE_API, but the method was %s.\",\n              method);\n        }\n        if (method != Method.FILE_LOADS) {\n          checkArgument(\n              getNumFileShards() == 0,\n              \"Number of file shards can be specified only when writing via FILE_LOADS, but the method was %s.\",\n              method);\n        }\n        if (method == Method.STORAGE_API_AT_LEAST_ONCE\n            && getStorageApiTriggeringFrequency(bqOptions) != null) {\n          LOG.warn(\n              \"Storage API triggering frequency option will be ignored is it can only be specified only \"\n                  + \"when writing via STORAGE_WRITE_API, but the method was {}.\",\n              method);\n        }\n        if (getAutoSharding()) {\n          if (method == Method.STORAGE_WRITE_API && getStorageApiNumStreams(bqOptions) > 0) {\n            LOG.warn(\n                \"Both numStorageWriteApiStreams and auto-sharding options are set. Will default to auto-sharding.\"\n                    + \" To set a fixed number of streams, do not enable auto-sharding.\");\n          } else if (method == Method.FILE_LOADS && getNumFileShards() > 0) {\n            LOG.warn(\n                \"Both numFileShards and auto-sharding options are set. Will default to auto-sharding.\"\n                    + \" To set a fixed number of file shards, do not enable auto-sharding.\");\n          } else if (method == Method.STORAGE_API_AT_LEAST_ONCE) {\n            LOG.warn(\n                \"The setting of auto-sharding is ignored. It is only supported when writing an\"\n                    + \" unbounded PCollection via FILE_LOADS, STREAMING_INSERTS or\"\n                    + \" STORAGE_WRITE_API, but the method was {}.\",","sourceCodeStart":3856,"sourceCodeEnd":3892,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java#L3856-L3892","documentation":"BigQueryIO supports withStorageApiTriggeringFrequencyOnly... this option (set via withTriggeringFrequency in the storage-write path) only controls flush cadence when the write method is STORAGE_WRITE_API. When a different method is selected, the triggering frequency has no effect, so the sink logs this warning instead of silently ignoring it.","triggerScenarios":"Using write().withMethod(STORAGE_API_AT_LEAST_ONCE) (or another non-STORAGE_WRITE_API method) while getStorageApiTriggeringFrequency resolves to a non-null value — typically because withTriggeringFrequency(Duration) was set for a streaming insert path.","commonSituations":"Migrating a pipeline from legacy STREAMING_INSERTS with a triggering frequency to the Storage API at-least-once mode and leaving the frequency setter in place.","solutions":["Switch the write method to Method.STORAGE_WRITE_API if triggering frequency is required","Remove the withTriggeringFrequency(...) call when using STORAGE_API_AT_LEAST_ONCE or other methods","Note that STORAGE_API_AT_LEAST_ONCE flushes per bundle; rely on auto-sharding/streams for throughput instead"],"exampleFix":"// before\nBigQueryIO.writeTableRows().to(table).withMethod(Method.STORAGE_API_AT_LEAST_ONCE).withTriggeringFrequency(Duration.standardSeconds(10))\n// after\nBigQueryIO.writeTableRows().to(table).withMethod(Method.STORAGE_API_AT_LEAST_ONCE) // triggering frequency removed","handlingStrategy":"validation","validationCode":"if (method != Method.STORAGE_WRITE_API && triggeringFrequency != null) { log.warn(\"triggeringFrequency ignored for method \" + method); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only set withTriggeringFrequency when method == STORAGE_WRITE_API","Keep sink option builders per method to avoid cross-method option leakage","Treat BigQueryIO startup warnings as config-review signals in CI logs"],"tags":["java","apache-beam","bigquery","configuration"],"backgroundTag":"conflicting-config-options","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}