class BigQueryHelper {

  public boolean tableExists(TableReference tableRef) throws IOException {
    try {
      Table fetchedTable =
          service
              .tables()
              .get(tableRef.getProjectId(), tableRef.getDatasetId(), tableRef.getTableId())
              .execute();
      logger.atFine().log(
          "Successfully fetched table '%s' for tableRef '%s'", fetchedTable, tableRef);
      return true;
    } catch (IOException ioe) {
      if (errorExtractor.itemNotFound(ioe)) {
        return false;
      }
      throw new IOException(
          String.format("Unhandled exception trying to get table '%s'", tableRef), ioe);
    }
  }

  public  BigQueryHelper(Bigquery service);

}