IoTSiteWise / Client / start_query

start_query

IoTSiteWise.Client.start_query(**kwargs)

Starts an asynchronous SQL query against workspace telemetry, annotations, data segment, and dataset data.

See also: AWS API Documentation

Request Syntax

response = client.start_query(
    clientToken='string',
    workspaceName='string',
    queryStatement='string'
)
Parameters:
  • clientToken (string) –

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don’t reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

  • workspaceName (string) –

    [REQUIRED]

    The name of the workspace to query.

  • queryStatement (string) –

    [REQUIRED]

    The SQL query to execute against the workspace telemetry, annotations, data segment, and dataset data.

Return type:

dict

Returns:

Response Syntax

{
    'queryId': 'string',
    'status': 'SUBMITTED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELED'|'CANCELING'
}

Response Structure

  • (dict) –

    Contains the response for the StartQuery operation.

    • queryId (string) –

      The unique identifier for the query execution.

    • status (string) –

      The initial query status. The value is always SUBMITTED upon creation.

Exceptions