Skip to main content

results

Creates, updates, deletes, gets or lists a results resource.

Overview​

Nameresults
TypeResource
Idsnowflake.sqlapi.results

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
codestring (example: 000123)
createdOninteger (int64)Timestamp that specifies when the statement execution started.‌ The timestamp is expressed in milliseconds since the epoch.‌
dataarrayResult set data.
messagestring (example: successfully executed)
resultSetMetaDataobject
sqlStatestring (example: 42601)
statementHandlestring (uuid) (example: 536fad38-b564-4dc5-9892-a4543504df6c)
statementStatusUrlstring (uri)
statsobjectthese stats might not be available for each request.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
fetch_resultselectresult_handler, endpointpageGet result status or the result when it is ready.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringOrganization and account identifier (orgname-accountname) (default: orgname-accountname)
result_handlerstringThe opaque result id.
pageinteger (int64)Number of the page of results to return. The number can range from 0 to the total number of pages minus 1.

SELECT examples​

Get result status or the result when it is ready.

SELECT
code,
createdOn,
data,
message,
resultSetMetaData,
sqlState,
statementHandle,
statementStatusUrl,
stats
FROM snowflake.sqlapi.results
WHERE result_handler = '{{ result_handler }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND page = '{{ page }}'
;