Class SpannerIO.ReadAll

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    SpannerIO

    public abstract static class SpannerIO.ReadAll
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<ReadOperation>,​org.apache.beam.sdk.values.PCollection<com.google.cloud.spanner.Struct>>
    Implementation of SpannerIO.readAll().
    See Also:
    Serialized Form
    • Constructor Detail

      • ReadAll

        public ReadAll()
    • Method Detail

      • withProjectId

        public SpannerIO.ReadAll withProjectId​(java.lang.String projectId)
        Specifies the Cloud Spanner project.
      • withProjectId

        public SpannerIO.ReadAll withProjectId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)
        Specifies the Cloud Spanner project.
      • withInstanceId

        public SpannerIO.ReadAll withInstanceId​(java.lang.String instanceId)
        Specifies the Cloud Spanner instance.
      • withInstanceId

        public SpannerIO.ReadAll withInstanceId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)
        Specifies the Cloud Spanner instance.
      • withDatabaseId

        public SpannerIO.ReadAll withDatabaseId​(java.lang.String databaseId)
        Specifies the Cloud Spanner database.
      • withHost

        public SpannerIO.ReadAll withHost​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host)
        Specifies the Cloud Spanner host.
      • withEmulatorHost

        public SpannerIO.ReadAll withEmulatorHost​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> emulatorHost)
        Specifies the Cloud Spanner emulator host.
      • withEmulatorHost

        public SpannerIO.ReadAll withEmulatorHost​(java.lang.String emulatorHost)
      • withExperimentalHost

        public SpannerIO.ReadAll withExperimentalHost​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> experimentalHost)
        Specifies the SpannerOptions experimental host (setExperimentalHost).
      • withExperimentalHost

        public SpannerIO.ReadAll withExperimentalHost​(java.lang.String experimentalHost)
      • withUsingPlainTextChannel

        public SpannerIO.ReadAll withUsingPlainTextChannel​(org.apache.beam.sdk.options.ValueProvider<java.lang.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.ReadAll withUsingPlainTextChannel​(boolean plainText)
        Specifies whether to use plaintext channel.

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

      • withClientCert

        public SpannerIO.ReadAll withClientCert​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> certPath,
                                                org.apache.beam.sdk.options.ValueProvider<java.lang.String> keyPath)
        Specifies certificate paths to use for mTLS channel.

        Note: These parameters are only valid when using Spanner Omni (set via withExperimentalHost).

        Parameters:
        certPath - Path to the client certificate file.
        keyPath - Path to the client certificate key file.
      • withClientCert

        public SpannerIO.ReadAll withClientCert​(java.lang.String certPath,
                                                java.lang.String keyPath)
        Specifies certificate paths to use for mTLS channel.

        Note: These parameters are only valid when using Spanner Omni (set via withExperimentalHost).

        Parameters:
        certPath - Path to the client certificate file.
        keyPath - Path to the client certificate key file.
      • withDatabaseId

        public SpannerIO.ReadAll withDatabaseId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseId)
        Specifies the Cloud Spanner database.
      • withTimestamp

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

        public SpannerIO.ReadAll withTimestampBound​(com.google.cloud.spanner.TimestampBound timestampBound)
      • withBatching

        public SpannerIO.ReadAll withBatching​(boolean batching)
        By default the PartitionQuery API is used to read data from Cloud Spanner. It is useful to disable batching when the underlying query is not root-partitionable.
      • expand

        public org.apache.beam.sdk.values.PCollection<com.google.cloud.spanner.Struct> expand​(org.apache.beam.sdk.values.PCollection<ReadOperation> input)
        Specified by:
        expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<ReadOperation>,​org.apache.beam.sdk.values.PCollection<com.google.cloud.spanner.Struct>>