@Override public GetQueryResultsResponse getQueryResults( String projectId, String jobId, String location, Map<Option, ?> options) { try { return bigquery .jobs() .getQueryResults(projectId, jobId) .setLocation(location) .setMaxResults(Option.MAX_RESULTS.getLong(options)) .setPageToken(Option.PAGE_TOKEN.getString(options)) .setStartIndex( Option.START_INDEX.getLong(options) != null ? BigInteger.valueOf(Option.START_INDEX.getLong(options)) : null) .setTimeoutMs(Option.TIMEOUT.getLong(options)) .execute(); } catch (IOException ex) { throw translate(ex); } }
@Override public GetQueryResultsResponse getQueryResults( String projectId, String jobId, String location, Map<Option, ?> options) { try { return bigquery .jobs() .getQueryResults(projectId, jobId) .setLocation(location) .setMaxResults(Option.MAX_RESULTS.getLong(options)) .setPageToken(Option.PAGE_TOKEN.getString(options)) .setStartIndex( Option.START_INDEX.getLong(options) != null ? BigInteger.valueOf(Option.START_INDEX.getLong(options)) : null) .setTimeoutMs(Option.TIMEOUT.getLong(options)) .execute(); } catch (IOException ex) { throw translate(ex); } }
@Override public GetQueryResultsResponse getQueryResults(String jobId, Map<Option, ?> options) { try { return bigquery.jobs().getQueryResults(this.options.projectId(), jobId) .setMaxResults(MAX_RESULTS.getLong(options)) .setPageToken(PAGE_TOKEN.getString(options)) .setStartIndex(START_INDEX.getLong(options) != null ? BigInteger.valueOf(START_INDEX.getLong(options)) : null) .setTimeoutMs(TIMEOUT.getLong(options)) .execute(); } catch (IOException ex) { BigQueryException serviceException = translate(ex); if (serviceException.code() == HTTP_NOT_FOUND) { return null; } throw serviceException; } }
@Override public GetQueryResultsResponse getQueryResults(String jobId, Map<Option, ?> options) { try { return bigquery.jobs().getQueryResults(this.options.projectId(), jobId) .setMaxResults(MAX_RESULTS.getLong(options)) .setPageToken(PAGE_TOKEN.getString(options)) .setStartIndex(START_INDEX.getLong(options) != null ? BigInteger.valueOf(START_INDEX.getLong(options)) : null) .setTimeoutMs(TIMEOUT.getLong(options)) .execute(); } catch (IOException ex) { BigQueryException serviceException = translate(ex); if (serviceException.code() == HTTP_NOT_FOUND) { return null; } throw serviceException; } }