Skip to main content

segment_estimates

Creates, updates, deletes, gets or lists a segment_estimates resource.

Overview

Namesegment_estimates
TypeResource
Idaws.customer_profiles.segment_estimates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
domain_namestringThe unique name of the domain. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)
estimatestringThe estimated number of profiles contained in the segment.
estimate_idstringThe QueryId which is the same as the value passed in QueryId.
messagestringThe error message if there is any error.
statusstringThe current status of the query. (RUNNING, SUCCEEDED, FAILED)
status_codeintegerThe status code of the segment estimate.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_segment_estimateselectdomain_name, estimate_id, regionGets the result of a segment estimate query.
create_segment_estimateinsertdomain_name, regionCreates a segment estimate query.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_namestringThe unique name of the domain.
estimate_idstringThe query Id passed by a previous CreateSegmentEstimate operation.
regionstringAWS region (default: us-east-1)

SELECT examples

Gets the result of a segment estimate query.

SELECT
domain_name,
estimate,
estimate_id,
message,
status,
status_code
FROM aws.customer_profiles.segment_estimates
WHERE domain_name = '{{ domain_name }}' -- required
AND estimate_id = '{{ estimate_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a segment estimate query.

INSERT INTO aws.customer_profiles.segment_estimates (
SegmentQuery,
SegmentSqlQuery,
domain_name,
region
)
SELECT
'{{ SegmentQuery }}',
'{{ SegmentSqlQuery }}',
'{{ domain_name }}',
'{{ region }}'
RETURNING
domain_name,
estimate_id,
status_code
;