Skip to content

aws.pinpoint.get_segment_version

Example SQL Queries

SELECT * FROM
aws.pinpoint.get_segment_version
WHERE
"segment_id" = 'VALUE'
AND "version" = 'VALUE'
AND "application_id" = 'VALUE';

Description

Retrieves information about the configuration, dimension, and other settings for a specific version of a segment that's associated with an application.

Table Definition

Column NameColumn Data Type
application_id Required Input Column

The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

VARCHAR
segment_id Required Input Column

The unique identifier for the segment.

VARCHAR
version Required Input Column

The unique version number (Version property) for the campaign version.

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
segment_response

Provides information about the configuration, dimension, and other settings for a segment.

STRUCT(
"application_id" VARCHAR,
"arn" VARCHAR,
"creation_date" VARCHAR,
"dimensions" STRUCT(
"attributes" MAP(VARCHAR, STRUCT(
"attribute_type" VARCHAR,
"values" VARCHAR[]
)),
"behavior" STRUCT(
"recency" STRUCT(
"duration" VARCHAR,
"recency_type" VARCHAR
)
),
"demographic" STRUCT(
"app_version" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"channel" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"device_type" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"make" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"model" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"platform" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
)
),
"location" STRUCT(
"country" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"gps_point" STRUCT(
"coordinates" STRUCT(
"latitude" DOUBLE,
"longitude" DOUBLE
),
"range_in_kilometers" DOUBLE
)
),
"metrics" MAP(VARCHAR, STRUCT(
"comparison_operator" VARCHAR,
"value" DOUBLE
)),
"user_attributes" MAP(VARCHAR, STRUCT(
"attribute_type" VARCHAR,
"values" VARCHAR[]
))
),
"id" VARCHAR,
"import_definition" STRUCT(
"channel_counts" MAP(VARCHAR, BIGINT),
"external_id" VARCHAR,
"format" VARCHAR,
"role_arn" VARCHAR,
"s3_url" VARCHAR,
"size" BIGINT
),
"last_modified_date" VARCHAR,
"name" VARCHAR,
"segment_groups" STRUCT(
"groups" STRUCT(
"dimensions" STRUCT(
"attributes" MAP(VARCHAR, STRUCT(
"attribute_type" VARCHAR,
"values" VARCHAR[]
)),
"behavior" STRUCT(
"recency" STRUCT(
"duration" VARCHAR,
"recency_type" VARCHAR
)
),
"demographic" STRUCT(
"app_version" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"channel" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"device_type" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"make" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"model" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"platform" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
)
),
"location" STRUCT(
"country" STRUCT(
"dimension_type" VARCHAR,
"values" VARCHAR[]
),
"gps_point" STRUCT(
"coordinates" STRUCT(
"latitude" DOUBLE,
"longitude" DOUBLE
),
"range_in_kilometers" DOUBLE
)
),
"metrics" MAP(VARCHAR, STRUCT(
"comparison_operator" VARCHAR,
"value" DOUBLE
)),
"user_attributes" MAP(VARCHAR, STRUCT(
"attribute_type" VARCHAR,
"values" VARCHAR[]
))
)[],
"source_segments" STRUCT(
"id" VARCHAR,
"version" BIGINT
)[],
"source_type" VARCHAR,
"type" VARCHAR
)[],
"include" VARCHAR
),
"segment_type" VARCHAR,
"tags" MAP(VARCHAR, VARCHAR),
"version" BIGINT
)
Show child fields
segment_response.application_id

The unique identifier for the application that the segment is associated with.

segment_response.arn

The Amazon Resource Name (ARN) of the segment.

segment_response.creation_date

The date and time when the segment was created.

segment_response.dimensions

The dimension settings for the segment.

Show child fields
segment_response.dimensions.attributes

One or more custom attributes to use as criteria for the segment.

segment_response.dimensions.behavior

The behavior-based criteria, such as how recently users have used your app, for the segment.

Show child fields
segment_response.dimensions.behavior.recency

The dimension settings that are based on how recently an endpoint was active.

Show child fields
segment_response.dimensions.behavior.recency.duration

The duration to use when determining whether an endpoint is active or inactive.

segment_response.dimensions.behavior.recency.recency_type

The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren't active within the specified duration are included in the segment.

segment_response.dimensions.demographic

The demographic-based criteria, such as device platform, for the segment.

Show child fields
segment_response.dimensions.demographic.app_version

The app version criteria for the segment.

Show child fields
segment_response.dimensions.demographic.app_version.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.demographic.app_version.values[]
segment_response.dimensions.demographic.channel

The channel criteria for the segment.

Show child fields
segment_response.dimensions.demographic.channel.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.demographic.channel.values[]
segment_response.dimensions.demographic.device_type

The device type criteria for the segment.

Show child fields
segment_response.dimensions.demographic.device_type.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.demographic.device_type.values[]
segment_response.dimensions.demographic.make

The device make criteria for the segment.

Show child fields
segment_response.dimensions.demographic.make.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.demographic.make.values[]
segment_response.dimensions.demographic.model

The device model criteria for the segment.

Show child fields
segment_response.dimensions.demographic.model.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.demographic.model.values[]
segment_response.dimensions.demographic.platform

The device platform criteria for the segment.

Show child fields
segment_response.dimensions.demographic.platform.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.demographic.platform.values[]
segment_response.dimensions.location

The location-based criteria, such as region or GPS coordinates, for the segment.

Show child fields
segment_response.dimensions.location.country

The country or region code, in ISO 3166-1 alpha-2 format, for the segment.

Show child fields
segment_response.dimensions.location.country.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.dimensions.location.country.values[]
segment_response.dimensions.location.gps_point

The GPS location and range for the segment.

Show child fields
segment_response.dimensions.location.gps_point.coordinates

The GPS coordinates to measure distance from.

Show child fields
segment_response.dimensions.location.gps_point.coordinates.latitude

The latitude coordinate of the location.

segment_response.dimensions.location.gps_point.coordinates.longitude

The longitude coordinate of the location.

segment_response.dimensions.location.gps_point.range_in_kilometers

The range, in kilometers, from the GPS coordinates.

segment_response.dimensions.metrics

One or more custom metrics to use as criteria for the segment.

segment_response.dimensions.user_attributes

One or more custom user attributes to use as criteria for the segment.

segment_response.id

The unique identifier for the segment.

segment_response.import_definition

The settings for the import job that's associated with the segment.

Show child fields
segment_response.import_definition.channel_counts

The number of channel types in the endpoint definitions that were imported to create the segment.

segment_response.import_definition.external_id

(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.

segment_response.import_definition.format

The format of the files that were imported to create the segment. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.

segment_response.import_definition.role_arn

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.

segment_response.import_definition.s3_url

The URL of the Amazon Simple Storage Service (Amazon S3) bucket that the endpoint definitions were imported from to create the segment.

segment_response.import_definition.size

The number of endpoint definitions that were imported successfully to create the segment.

segment_response.last_modified_date

The date and time when the segment was last modified.

segment_response.name

The name of the segment.

segment_response.segment_groups

A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base segments and the dimensions that are applied to those base segments.

Show child fields
segment_response.segment_groups.groups[]
Show child fields
segment_response.segment_groups.groups[].dimensions[]
Show child fields
segment_response.segment_groups.groups[].dimensions[].attributes

One or more custom attributes to use as criteria for the segment.

segment_response.segment_groups.groups[].dimensions[].behavior

The behavior-based criteria, such as how recently users have used your app, for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].behavior.recency

The dimension settings that are based on how recently an endpoint was active.

Show child fields
segment_response.segment_groups.groups[].dimensions[].behavior.recency.duration

The duration to use when determining whether an endpoint is active or inactive.

segment_response.segment_groups.groups[].dimensions[].behavior.recency.recency_type

The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren't active within the specified duration are included in the segment.

segment_response.segment_groups.groups[].dimensions[].demographic

The demographic-based criteria, such as device platform, for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.app_version

The app version criteria for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.app_version.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].demographic.app_version.values[]
segment_response.segment_groups.groups[].dimensions[].demographic.channel

The channel criteria for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.channel.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].demographic.channel.values[]
segment_response.segment_groups.groups[].dimensions[].demographic.device_type

The device type criteria for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.device_type.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].demographic.device_type.values[]
segment_response.segment_groups.groups[].dimensions[].demographic.make

The device make criteria for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.make.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].demographic.make.values[]
segment_response.segment_groups.groups[].dimensions[].demographic.model

The device model criteria for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.model.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].demographic.model.values[]
segment_response.segment_groups.groups[].dimensions[].demographic.platform

The device platform criteria for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].demographic.platform.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].demographic.platform.values[]
segment_response.segment_groups.groups[].dimensions[].location

The location-based criteria, such as region or GPS coordinates, for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].location.country

The country or region code, in ISO 3166-1 alpha-2 format, for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].location.country.dimension_type

The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.

segment_response.segment_groups.groups[].dimensions[].location.country.values[]
segment_response.segment_groups.groups[].dimensions[].location.gps_point

The GPS location and range for the segment.

Show child fields
segment_response.segment_groups.groups[].dimensions[].location.gps_point.coordinates

The GPS coordinates to measure distance from.

Show child fields
segment_response.segment_groups.groups[].dimensions[].location.gps_point.coordinates.latitude

The latitude coordinate of the location.

segment_response.segment_groups.groups[].dimensions[].location.gps_point.coordinates.longitude

The longitude coordinate of the location.

segment_response.segment_groups.groups[].dimensions[].location.gps_point.range_in_kilometers

The range, in kilometers, from the GPS coordinates.

segment_response.segment_groups.groups[].dimensions[].metrics

One or more custom metrics to use as criteria for the segment.

segment_response.segment_groups.groups[].dimensions[].user_attributes

One or more custom user attributes to use as criteria for the segment.

segment_response.segment_groups.groups[].source_segments[]
Show child fields
segment_response.segment_groups.groups[].source_segments[].id

The unique identifier for the segment.

segment_response.segment_groups.groups[].source_segments[].version

The version number of the segment.

segment_response.segment_groups.groups[].source_type

Specifies how to handle multiple base segments for the segment. For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.

segment_response.segment_groups.groups[].type

Specifies how to handle multiple dimensions for the segment. For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.

segment_response.segment_groups.include

Specifies how to handle multiple segment groups for the segment. For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.

segment_response.segment_type

The segment type. Valid values are:

  • DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on endpoint data that's reported by your app. Dynamic segments can change over time.

  • IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on endpoint definitions that you import from a file. Imported segments are static; they don't change over time.

segment_response.tags

A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag consists of a required tag key and an associated tag value.

segment_response.version

The version number of the segment.