Aashish-Jha-11 commented on code in PR #35876: URL: https://github.com/apache/beam/pull/35876#discussion_r2279366877
########## sdks/go/pkg/beam/io/xlang/bigtableio/bigtable.go: ########## @@ -135,3 +138,36 @@ func Read(s beam.Scope, projectId string, instanceId string, table string, opts outs := xlschema.Transform(s, btConfig, readURN, xlschema.ExpansionAddr(addr), xlschema.UnnamedOutputType(typex.New(reflect.TypeOf(Row{})))) return outs[beam.UnnamedOutputTag()] } + +type WriteOption func(*writeConfig) +type writeConfig struct { + addr string +} + +// WriteExpansionAddr specifies the address of a persistent expansion service to use for a Write +// transform. If this is not provided, or if an empty string is provided, the transform will +// automatically start an appropriate expansion service instead. +func WriteExpansionAddr(addr string) WriteOption { + return func(wc *writeConfig) { + wc.addr = addr + } +} + +// Write writes rows to a Bigtable table. +func Write(s beam.Scope, projectId string, instanceId string, table string, col beam.PCollection, opts ...WriteOption) { Review Comment: Added a test for the Write transform configuration options as requested. The test verifies that WriteExpansionAddr properly configures the expansion service address. Thank you for the feedback! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org