apache / apache/beam

[Feature Request]: BigqueryIO.java WriteTableRows RangePartitioning support

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

Description

### What would you like to happen?

Currently when using beam java sdk to write table rows to big query we only have the ability to use TimePartitioning. I would like for the ability to use RangePartitioning

### current example:

tableRows.apply(BigQueryIO.writeTableRows()
.to(getTableReference(options.getAnalyticsProject(), dataset, table))
.withExtendedErrorInfo()
.withCustomGcsTempLocation(ValueProvider.StaticValueProvider.of(options.getGcpTempLocation()))
.withClustering(cluster)
**.withTimePartitioning(partition)**
.withSchema(tableSchema)
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED)
.withWriteDisposition(writeDisposition)
.withMethod(BigQueryIO.Write.Method.FILE_LOADS));

### Request Example:

tableRows.apply(BigQueryIO.writeTableRows()
.to(getTableReference(options.getAnalyticsProject(), dataset, table))
.withExtendedErrorInfo()
.withCustomGcsTempLocation(ValueProvider.StaticValueProvider.of(options.getGcpTempLocation()))
.withClustering(cluster)
**.withRangePartitioning(partition)**
.withSchema(tableSchema)
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED)
.withWriteDisposition(writeDisposition)
.withMethod(BigQueryIO.Write.Method.FILE_LOADS));

### Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

### 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.