Skip to content

aws.kendra.get_snapshots

Example SQL Queries

SELECT * FROM
aws.kendra.get_snapshots
WHERE
"index_id" = 'VALUE'
AND "interval" = 'VALUE'
AND "metric_type" = 'VALUE';

Description

Retrieves search metrics data. The data provides a snapshot of how your users interact with your search application and how effective the application is.

Table Definition

Column NameColumn Data Type
index_id Required Input Column

The identifier of the index to get search metrics data.

VARCHAR
interval Required Input Column

The time interval or time window to get search metrics data. The time interval uses the time zone of your index. You can view data in the following time windows:

  • THIS_WEEK: The current week, starting on the Sunday and ending on the day before the current date.

  • ONE_WEEK_AGO: The previous week, starting on the Sunday and ending on the following Saturday.

  • TWO_WEEKS_AGO: The week before the previous week, starting on the Sunday and ending on the following Saturday.

  • THIS_MONTH: The current month, starting on the first day of the month and ending on the day before the current date.

  • ONE_MONTH_AGO: The previous month, starting on the first day of the month and ending on the last day of the month.

  • TWO_MONTHS_AGO: The month before the previous month, starting on the first day of the month and ending on last day of the month.

VARCHAR
metric_type Required Input Column

The metric you want to retrieve. You can specify only one metric per call.

For more information about the metrics you can view, see Gaining insights with search analytics.

VARCHAR
max_results Input Column

The maximum number of returned data for the metric.

BIGINT
next_token Input Column

If the response is truncated, Amazon Kendra returns this token, which you can use in a later request to retrieve the next set of search metrics data.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
snap_shot_time_filter

The Unix timestamp for the beginning and end of the time window for the search metrics data.

STRUCT(
"start_time" TIMESTAMP_S,
"end_time" TIMESTAMP_S
)
Show child fields
snap_shot_time_filter.end_time

The Unix timestamp for the end of the time range.

snap_shot_time_filter.start_time

The Unix timestamp for the beginning of the time range.

snapshots_data

The search metrics data. The data returned depends on the metric type you requested.

VARCHAR[][]
Show child fields
snapshots_data[][]
snapshots_data_header

The column headers for the search metrics data.

VARCHAR[]
Show child fields
snapshots_data_header[]