IoTSiteWise / Client / get_query_results

get_query_results

IoTSiteWise.Client.get_query_results(**kwargs)

Retrieves the paginated results of a query. Returns empty rows if the query is not yet complete.

See also: AWS API Documentation

Request Syntax

response = client.get_query_results(
    workspaceName='string',
    queryId='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • workspaceName (string) –

    [REQUIRED]

    The name of the workspace associated with the query.

  • queryId (string) –

    [REQUIRED]

    The unique identifier for the query execution.

  • maxResults (integer) – The maximum number of results to return for each paginated request.

  • nextToken (string) – The token to be used for the next set of paginated results.

Return type:

dict

Returns:

Response Syntax

{
    'columnInfo': [
        {
            'name': 'string',
            'type': 'string'
        },
    ],
    'rows': [
        [
            'string',
        ],
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    Contains the response for the GetQueryResults operation.

    • columnInfo (list) –

      A list of column metadata for the query results. Each entry contains the column name and data type. Present when the query status is COMPLETED.

      • (dict) –

        Contains metadata about a column in the query results.

        • name (string) –

          The name of the column.

        • type (string) –

          The data type of the column. Valid values are STRING, DOUBLE, BOOLEAN, INTEGER, TIMESTAMP, and VARIANT.

    • rows (list) –

      The result rows. Each row is a list of string column values, positional to match the columnInfo order. Present when the query status is COMPLETED.

      • (list) –

        A single row of query results containing column values. Each element is a string-encoded column value, positional to match the columnInfo order.

        • (string) –

          A string-encoded column value.

    • nextToken (string) –

      The token for the next set of results, or null if there are no additional results.

Exceptions

  • IoTSiteWise.Client.exceptions.InternalFailureException

  • IoTSiteWise.Client.exceptions.AccessDeniedException

  • IoTSiteWise.Client.exceptions.InvalidRequestException

  • IoTSiteWise.Client.exceptions.ResourceNotFoundException

  • IoTSiteWise.Client.exceptions.ThrottlingException