Application Programming Interface Guide > Web Services Operations > Operations Reference > getTabularResult
 
getTabularResult
Get the tabular result associated with the resultId returned from a call to executeNativeSql or executeSql, or contained within the outputs element of a call to executeProcedure or executeSqlScript.
If isBlocking is TRUE, this operation does not return until the processing associated with the execution has completed and the result element is set. Otherwise, this operation returns immediately and the result element is only set if the completed element is TRUE.
If includeMetadata is TRUE, the response includes the metadata element. The metadata element describes the names and types of the column data that are provided in the result, either in this call or in a later call to getTabularResult.
The completed element reports whether all possible results have been retrieved.
The requestStatus element reports the status of the server request associated with the execution. The request status can be one of the following:
STARTED: The request has started. The request was created, but is not yet running.
WAITING: The request is waiting in a queue for the server to process the request. RUNNING: The request is currently being executed by the server.
COMPLETED: The execution associated with the request has completed. Results can now be acquired.
CLOSING: The request is closing.
SUCCESS: The request closed with success.
FAILURE: The request closed with failure.
TERMINATED: The request was terminated.
If skipRows is set, that number of rows is skipped in the execution output before returning any results. If skipRows is greater than the total possible number of rows, no rows are returned.
If maxRows is set, result contains at most maxRows number of rows. If maxRows is smaller than the total number of rows of data available, additional calls to getTabularResult need to be made to get the rest of the available data. Use hasMoreRows element in result to determine if additional data is available. This is more accurate than comparing the number of rows returned with maxRows because the server might opt to return fewer than maxRows.
If consumeRemainingRows is set and TRUE, all remaining rows in excess of maxRows are consumed.
The rowsAffected element is set if it is known how many rows were affected by this execution. This includes a count of rows that were skipped (see skipRows element) or consumed (see consumedRemainingRows element).
Location
/services/webservices/system/admin/execute/operations/
Request Elements
resultId: The result ID.
isBlocking (optional): If TRUE (the default), do not return until the execution completes.
includeMetadata (optional): If TRUE, the response contains information about the column names and their types. Defaults to FALSE.
skipRows (optional): The number of rows to skip in the execution output before generating results. If not set, no rows are skipped.
maxRows (optional): The maximum number of rows to return. If not set, all rows are returned.
consumeRemainingRows (optional): If set and TRUE, all remaining rows after maxRows are consumed.
Response Elements
completed: If TRUE, all processing associated with execution has completed.
requestStatus: Status of the server request performing the execution.
metadata (optional): Table metadata listing the column names and types within the result:
column: See Column Element.
rowsAffected (optional): If known, the number of rows affected by the execution; otherwise unset.
result (optional): The result data.
hasMoreRows: TRUE if the table has more rows than the number affected (rowsAffected, above).
totalRowCount: Total number of rows in the table.
Faults
IllegalArgument: If the isBlocking, includeMetadata, or maxRows elements are malformed.
NotFound: If the resultId does not exist within the current transaction or has already been closed.
RuntimeError: If an error occurs during execution. The resultId is closed if this occurs.