describe_scheduled_query
(**kwargs)¶Provides detailed information about a scheduled query.
See also: AWS API Documentation
Request Syntax
response = client.describe_scheduled_query(
ScheduledQueryArn='string'
)
[REQUIRED]
The ARN of the scheduled query.
{
'ScheduledQuery': {
'Arn': 'string',
'Name': 'string',
'QueryString': 'string',
'CreationTime': datetime(2015, 1, 1),
'State': 'ENABLED'|'DISABLED',
'PreviousInvocationTime': datetime(2015, 1, 1),
'NextInvocationTime': datetime(2015, 1, 1),
'ScheduleConfiguration': {
'ScheduleExpression': 'string'
},
'NotificationConfiguration': {
'SnsConfiguration': {
'TopicArn': 'string'
}
},
'TargetConfiguration': {
'TimestreamConfiguration': {
'DatabaseName': 'string',
'TableName': 'string',
'TimeColumn': 'string',
'DimensionMappings': [
{
'Name': 'string',
'DimensionValueType': 'VARCHAR'
},
],
'MultiMeasureMappings': {
'TargetMultiMeasureName': 'string',
'MultiMeasureAttributeMappings': [
{
'SourceColumn': 'string',
'TargetMultiMeasureAttributeName': 'string',
'MeasureValueType': 'BIGINT'|'BOOLEAN'|'DOUBLE'|'VARCHAR'|'TIMESTAMP'
},
]
},
'MixedMeasureMappings': [
{
'MeasureName': 'string',
'SourceColumn': 'string',
'TargetMeasureName': 'string',
'MeasureValueType': 'BIGINT'|'BOOLEAN'|'DOUBLE'|'VARCHAR'|'MULTI',
'MultiMeasureAttributeMappings': [
{
'SourceColumn': 'string',
'TargetMultiMeasureAttributeName': 'string',
'MeasureValueType': 'BIGINT'|'BOOLEAN'|'DOUBLE'|'VARCHAR'|'TIMESTAMP'
},
]
},
],
'MeasureNameColumn': 'string'
}
},
'ScheduledQueryExecutionRoleArn': 'string',
'KmsKeyId': 'string',
'ErrorReportConfiguration': {
'S3Configuration': {
'BucketName': 'string',
'ObjectKeyPrefix': 'string',
'EncryptionOption': 'SSE_S3'|'SSE_KMS'
}
},
'LastRunSummary': {
'InvocationTime': datetime(2015, 1, 1),
'TriggerTime': datetime(2015, 1, 1),
'RunStatus': 'AUTO_TRIGGER_SUCCESS'|'AUTO_TRIGGER_FAILURE'|'MANUAL_TRIGGER_SUCCESS'|'MANUAL_TRIGGER_FAILURE',
'ExecutionStats': {
'ExecutionTimeInMillis': 123,
'DataWrites': 123,
'BytesMetered': 123,
'RecordsIngested': 123,
'QueryResultRows': 123
},
'ErrorReportLocation': {
'S3ReportLocation': {
'BucketName': 'string',
'ObjectKey': 'string'
}
},
'FailureReason': 'string'
},
'RecentlyFailedRuns': [
{
'InvocationTime': datetime(2015, 1, 1),
'TriggerTime': datetime(2015, 1, 1),
'RunStatus': 'AUTO_TRIGGER_SUCCESS'|'AUTO_TRIGGER_FAILURE'|'MANUAL_TRIGGER_SUCCESS'|'MANUAL_TRIGGER_FAILURE',
'ExecutionStats': {
'ExecutionTimeInMillis': 123,
'DataWrites': 123,
'BytesMetered': 123,
'RecordsIngested': 123,
'QueryResultRows': 123
},
'ErrorReportLocation': {
'S3ReportLocation': {
'BucketName': 'string',
'ObjectKey': 'string'
}
},
'FailureReason': 'string'
},
]
}
}
Response Structure
The scheduled query.
Scheduled query ARN.
Name of the scheduled query.
The query to be run.
Creation time of the scheduled query.
State of the scheduled query.
Last time the query was run.
The next time the scheduled query is scheduled to run.
Schedule configuration.
An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.
Notification configuration.
Details on SNS configuration.
SNS topic ARN that the scheduled query status notifications will be sent to.
Scheduled query target store configuration.
Configuration needed to write data into the Timestream database and table.
Name of Timestream database to which the query result will be written.
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
This is to allow mapping column(s) from the query result to the dimension in the destination table.
This type is used to map column(s) from the query result to a dimension in the destination table.
Column name from query result.
Type for the dimension.
Multi-measure mappings.
The name of the target multi-measure name in the derived table. This input is required when measureNameColumn is not provided. If MeasureNameColumn is provided, then value from that column will be used as multi-measure name.
Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.
Attribute mapping for MULTI value measures.
Source column from where the attribute value is to be read.
Custom name to be used for attribute name in derived table. If not provided, source column name would be used.
Type of the attribute to be read from the source column.
Specifies how to map measures to multi-measure records.
MixedMeasureMappings are mappings that can be used to ingest data into a mixture of narrow and multi measures in the derived table.
Refers to the value of measure_name in a result row. This field is required if MeasureNameColumn is provided.
This field refers to the source column from which measure-value is to be read for result materialization.
Target measure name to be used. If not provided, the target measure name by default would be measure-name if provided, or sourceColumn otherwise.
Type of the value that is to be read from sourceColumn. If the mapping is for MULTI, use MeasureValueType.MULTI.
Required when measureValueType is MULTI. Attribute mappings for MULTI value measures.
Attribute mapping for MULTI value measures.
Source column from where the attribute value is to be read.
Custom name to be used for attribute name in derived table. If not provided, source column name would be used.
Type of the attribute to be read from the source column.
Name of the measure column.
IAM role that Timestream uses to run the schedule query.
A customer provided KMS key used to encrypt the scheduled query resource.
Error-reporting configuration for the scheduled query.
The S3 configuration for the error reports.
Name of the S3 bucket under which error reports will be created.
Prefix for the error report key. Timestream by default adds the following prefix to the error report path.
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.
Runtime summary for the last scheduled query run.
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime
can be used in the query to get the value.
The actual time when the query was run.
The status of a scheduled query run.
Runtime statistics for a scheduled run.
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
Data writes metered for records ingested in a single scheduled query run.
Bytes metered for a single scheduled query run.
The number of records ingested for a single scheduled query run.
Number of rows present in the output from running a query before ingestion to destination data source.
S3 location for error report.
The S3 location where error reports are written.
S3 bucket name.
S3 key.
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
Runtime summary for the last five failed scheduled query runs.
Run summary for the scheduled query
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime
can be used in the query to get the value.
The actual time when the query was run.
The status of a scheduled query run.
Runtime statistics for a scheduled run.
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
Data writes metered for records ingested in a single scheduled query run.
Bytes metered for a single scheduled query run.
The number of records ingested for a single scheduled query run.
Number of rows present in the output from running a query before ingestion to destination data source.
S3 location for error report.
The S3 location where error reports are written.
S3 bucket name.
S3 key.
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
Exceptions
TimestreamQuery.Client.exceptions.AccessDeniedException
TimestreamQuery.Client.exceptions.InternalServerException
TimestreamQuery.Client.exceptions.ResourceNotFoundException
TimestreamQuery.Client.exceptions.ThrottlingException
TimestreamQuery.Client.exceptions.ValidationException
TimestreamQuery.Client.exceptions.InvalidEndpointException