v2/common/src/main/java/com/google/cloud/teleport/v2/utils/SpannerUtils.java [152:169]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static SpannerSchema getSpannerSchemaFromFile(ValueProvider<String> schemaFilename) {
    if (schemaFilename == null) {
      throw new RuntimeException("No schema file provided!");
    }
    try {
      ReadableByteChannel readableByteChannel =
          FileSystems.open(FileSystems.matchNewResource(schemaFilename.get(), false));
      String schemaString =
          new String(
              StreamUtils.getBytesWithoutClosing(Channels.newInputStream(readableByteChannel)));

      SpannerSchema spannerSchema = new SpannerSchema(schemaString);

      return spannerSchema;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



v1/src/main/java/com/google/cloud/teleport/templates/TextToSpanner.java [416:433]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SpannerSchema getSpannerSchemaFromFile(ValueProvider<String> schemaFilename) {
      if (schemaFilename == null) {
        throw new RuntimeException("No schema file provided!");
      }
      try {
        ReadableByteChannel readableByteChannel =
            FileSystems.open(FileSystems.matchNewResource(schemaFilename.get(), false));
        String schemaString =
            new String(
                StreamUtils.getBytesWithoutClosing(Channels.newInputStream(readableByteChannel)));

        SpannerSchema spannerSchema = new SpannerSchema(schemaString);

        return spannerSchema;
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



