apache / apache/beam

[Feature Request]: [Java BQ] Support storageApiAppendThresholdRecordCount option when streaming with STORAGE_WRITE_API

Open
#27,847 1 comment 0 reactions 0 assignees View on GitHub
awaiting triage io java new feature P3 stale
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What would you like to happen?

When streaming with STORAGE_WRITE_API, we use the [StorageApiWritesShardedRecords](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWritesShardedRecords.java) path, which splits the messages in terms of the byte size threshold (`storageApiAppendThresholdBytes`). However, the record count threshold (`storageApiAppendThresholdRecordCount`) is essentially ignored.

The splitting logic exists in [SplittingIterable](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/SplittingIterable.java). We should be making a similar check as [here](https://github.com/apache/beam/blob/1f90261aef435d947db5eff30172afa3e7d4fd27/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/SplittingIterable.java#L146-L148), but for accumulated record count.

### Issue Priority

Priority: 3 (nice-to-have improvement)

### Issue Components

- [ ] Component: Python SDK
- [X] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [X] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.