java/src/main/java/com/google/cloud/dataproc/templates/jdbc/JDBCToGCSConfig.java [197:215]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public String getSQL() {
    if (StringUtils.isNotBlank(jdbcSQL)) {
      if (jdbcURL.contains("oracle")) {
        return "(" + jdbcSQL + ")";
      } else {
        return "(" + jdbcSQL + ") as a";
      }
    } else {
      Matcher matches = java.util.regex.Pattern.compile("gs://(.*?)/(.*)").matcher(jdbcSQLFile);
      matches.matches();
      String bucket = matches.group(1);
      String objectPath = matches.group(2);

      Storage storage = StorageOptions.getDefaultInstance().getService();
      Blob blob = storage.get(bucket, objectPath);
      String fileContent = new String(blob.getContent());
      return "(" + fileContent + ") as a";
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/src/main/java/com/google/cloud/dataproc/templates/jdbc/JDBCToSpannerConfig.java [237:255]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public String getSQL() {
    if (StringUtils.isNotBlank(jdbcSQL)) {
      if (jdbcURL.contains("oracle")) {
        return "(" + jdbcSQL + ")";
      } else {
        return "(" + jdbcSQL + ") as a";
      }
    } else {
      Matcher matches = java.util.regex.Pattern.compile("gs://(.*?)/(.*)").matcher(jdbcSQLFile);
      matches.matches();
      String bucket = matches.group(1);
      String objectPath = matches.group(2);

      Storage storage = StorageOptions.getDefaultInstance().getService();
      Blob blob = storage.get(bucket, objectPath);
      String fileContent = new String(blob.getContent());
      return "(" + fileContent + ") as a";
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



