Class SpannerCredentials

java.lang.Object
io.github.flink.gcp.connector.spanner.SpannerCredentials

@Internal public final class SpannerCredentials extends Object
Loads credentials shared by every direction of this connector: the sink writer, the bounded source's planner and readers, the Change Streams coordinator and query clients, and the table lookup path.
  • Method Details

    • load

      @Nullable public static com.google.auth.oauth2.GoogleCredentials load(@Nullable String serviceAccountKeyFile) throws IOException
      Loads a service-account key file, or returns null to preserve application-default credentials.

      A failure names only the product, never the path or the parser's exception; ServiceAccountKeys.load(String, java.util.Collection, String) owns that rule.

      Parameters:
      serviceAccountKeyFile - the configured key-file path, or null for ADC
      Returns:
      scoped service-account credentials, or null for ADC
      Throws:
      IOException - if the configured file cannot be read as a service-account key