static protected JsonNode getQueryResultJSON(String queryId,
                                               SFSession session)
  throws SFException, SnowflakeSQLException
  {
    String getResultPath = String.format(SF_PATH_QUERY_RESULT, queryId);
    StmtInput stmtInput = new StmtInput()
        .setServerUrl(session.getServerUrl())
        .setSessionToken(session.getSessionToken())
        .setNetworkTimeoutInMillis(session.getNetworkTimeoutInMilli())
        .setMediaType(SF_MEDIA_TYPE)
        .setServiceName(session.getServiceName());

    String resultAsString = getQueryResult(getResultPath, stmtInput);

    StmtOutput stmtOutput = pollForOutput(resultAsString, stmtInput, null);
    return stmtOutput.getResult();
  }
static protected JsonNode getQueryResultJSON ( String queryId , SFSession session ) throws SFException , SnowflakeSQLException { String getResultPath = String . format ( SF_PATH_QUERY_RESULT , queryId ) ; StmtInput stmtInput = new StmtInput ( ) . setServerUrl ( session . getServerUrl ( ) ) . setSessionToken ( session . getSessionToken ( ) ) . setNetworkTimeoutInMillis ( session . getNetworkTimeoutInMilli ( ) ) . setMediaType ( SF_MEDIA_TYPE ) . setServiceName ( session . getServiceName ( ) ) ; String resultAsString = getQueryResult ( getResultPath , stmtInput ) ; StmtOutput stmtOutput = pollForOutput ( resultAsString , stmtInput , null ) ; return stmtOutput . getResult ( ) ; }
Issue get-result call to get query result given an in progress response.
<p>

@param queryId id of query to get results for
@param session the current session
@return results in JSON
@throws SFException           exception raised from Snowflake components
@throws SnowflakeSQLException exception raised from Snowflake components