class BigQueryOutputConfiguration {

  public static String getJobProjectId(Configuration conf) throws IOException {
    // Reference the default project ID as a backup.
    String projectId = PROJECT_ID.get(conf, conf::get);
    if (Strings.isNullOrEmpty(projectId)) {
      projectId = OUTPUT_PROJECT_ID.get(conf, conf::get);
    }
    if (Strings.isNullOrEmpty(projectId)) {
      throw new IOException(
          "Must supply a value for configuration setting: " + PROJECT_ID.getKey());
    }
    return projectId;
  }

}