TimestreamQuery / Client / execute_scheduled_query

execute_scheduled_query#

TimestreamQuery.Client.execute_scheduled_query(**kwargs)#

You can use this API to run a scheduled query manually.

If you enabled QueryInsights, this API also returns insights and metrics related to the query that you executed as part of an Amazon SNS notification. QueryInsights helps with performance tuning of your query. For more information about QueryInsights, see Using query insights to optimize queries in Amazon Timestream.

See also: AWS API Documentation

Request Syntax

response = client.execute_scheduled_query(
    ScheduledQueryArn='string',
    InvocationTime=datetime(2015, 1, 1),
    ClientToken='string',
    QueryInsights={
        'Mode': 'ENABLED_WITH_RATE_CONTROL'|'DISABLED'
    }
)
Parameters:
  • ScheduledQueryArn (string) –

    [REQUIRED]

    ARN of the scheduled query.

  • InvocationTime (datetime) –

    [REQUIRED]

    The timestamp in UTC. Query will be run as if it was invoked at this timestamp.

  • ClientToken (string) –

    Not used.

    This field is autopopulated if not provided.

  • QueryInsights (dict) –

    Encapsulates settings for enabling QueryInsights.

    Enabling QueryInsights returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use QueryInsights to tune your query performance and cost.

    • Mode (string) – [REQUIRED]

      Provides the following modes to enable ScheduledQueryInsights:

      • ENABLED_WITH_RATE_CONTROL – Enables ScheduledQueryInsights for the queries being processed. This mode also includes a rate control mechanism, which limits the QueryInsights feature to 1 query per second (QPS).

      • DISABLED – Disables ScheduledQueryInsights.

Returns:

None

Exceptions