Class SpannerIO.Read

java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PBegin,PCollection<com.google.cloud.spanner.Struct>>
org.apache.beam.sdk.io.gcp.spanner.SpannerIO.Read
All Implemented Interfaces:
Serializable, HasDisplayData
Enclosing class:
SpannerIO

public abstract static class SpannerIO.Read extends PTransform<PBegin,PCollection<com.google.cloud.spanner.Struct>>
Implementation of SpannerIO.read().
See Also:
  • Constructor Details

    • Read

      public Read()
  • Method Details

    • withBeamRowConverters

      public SpannerIO.Read withBeamRowConverters(TypeDescriptor<com.google.cloud.spanner.Struct> typeDescriptor, org.apache.beam.sdk.io.gcp.spanner.SpannerIO.Read.ToBeamRowFunction toRowFn, org.apache.beam.sdk.io.gcp.spanner.SpannerIO.Read.FromBeamRowFunction fromRowFn)
    • withSpannerConfig

      public SpannerIO.Read withSpannerConfig(SpannerConfig spannerConfig)
      Specifies the Cloud Spanner configuration.
    • withProjectId

      public SpannerIO.Read withProjectId(String projectId)
      Specifies the Cloud Spanner project.
    • withProjectId

      public SpannerIO.Read withProjectId(ValueProvider<String> projectId)
      Specifies the Cloud Spanner project.
    • withInstanceId

      public SpannerIO.Read withInstanceId(String instanceId)
      Specifies the Cloud Spanner instance.
    • withInstanceId

      public SpannerIO.Read withInstanceId(ValueProvider<String> instanceId)
      Specifies the Cloud Spanner instance.
    • withDatabaseId

      public SpannerIO.Read withDatabaseId(String databaseId)
      Specifies the Cloud Spanner database.
    • withDatabaseId

      public SpannerIO.Read withDatabaseId(ValueProvider<String> databaseId)
      Specifies the Cloud Spanner database.
    • withHost

      public SpannerIO.Read withHost(ValueProvider<String> host)
      Specifies the Cloud Spanner host.
    • withHost

      public SpannerIO.Read withHost(String host)
    • withEmulatorHost

      public SpannerIO.Read withEmulatorHost(ValueProvider<String> emulatorHost)
      Specifies the Cloud Spanner emulator host.
    • withEmulatorHost

      public SpannerIO.Read withEmulatorHost(String emulatorHost)
    • withExperimentalHost

      public SpannerIO.Read withExperimentalHost(ValueProvider<String> experimentalHost)
      Specifies the SpannerOptions experimental host (setExperimentalHost).
    • withExperimentalHost

      public SpannerIO.Read withExperimentalHost(String experimentalHost)
    • withUsingPlainTextChannel

      public SpannerIO.Read withUsingPlainTextChannel(ValueProvider<Boolean> plainText)
      Specifies whether to use plaintext channel.

      Note: This parameter is only valid when using an experimental host (set via withExperimentalHost).

    • withUsingPlainTextChannel

      public SpannerIO.Read withUsingPlainTextChannel(boolean plainText)
      Specifies whether to use plaintext channel.

      Note: This parameter is only valid when using an experimental host (set via withExperimentalHost).

    • withBatching

      public SpannerIO.Read withBatching(boolean batching)
      If true the uses Cloud Spanner batch API.
    • withTransaction

      public SpannerIO.Read withTransaction(PCollectionView<Transaction> transaction)
    • withTimestamp

      public SpannerIO.Read withTimestamp(com.google.cloud.Timestamp timestamp)
    • withTimestampBound

      public SpannerIO.Read withTimestampBound(com.google.cloud.spanner.TimestampBound timestampBound)
    • withTable

      public SpannerIO.Read withTable(String table)
    • withReadOperation

      public SpannerIO.Read withReadOperation(ReadOperation operation)
    • withColumns

      public SpannerIO.Read withColumns(String... columns)
    • withColumns

      public SpannerIO.Read withColumns(List<String> columns)
    • withQuery

      public SpannerIO.Read withQuery(com.google.cloud.spanner.Statement statement)
    • withQuery

      public SpannerIO.Read withQuery(String sql)
    • withQueryName

      public SpannerIO.Read withQueryName(String queryName)
    • withKeySet

      public SpannerIO.Read withKeySet(com.google.cloud.spanner.KeySet keySet)
    • withIndex

      public SpannerIO.Read withIndex(String index)
    • withPartitionOptions

      public SpannerIO.Read withPartitionOptions(com.google.cloud.spanner.PartitionOptions partitionOptions)
      Note that PartitionOptions are currently ignored. See PartitionOptions in RPC documents
    • withLowPriority

      public SpannerIO.Read withLowPriority()
    • withHighPriority

      public SpannerIO.Read withHighPriority()
    • expand

      public PCollection<com.google.cloud.spanner.Struct> expand(PBegin input)
      Description copied from class: PTransform
      Override this method to specify how this PTransform should be expanded on the given InputT.

      NOTE: This method should not be called directly. Instead apply the PTransform should be applied to the InputT using the apply method.

      Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).

      Specified by:
      expand in class PTransform<PBegin,PCollection<com.google.cloud.spanner.Struct>>