segment_estimates
Creates, updates, deletes, gets or lists a segment_estimates resource.
Overview
| Name | segment_estimates |
| Type | Resource |
| Id | aws.customer_profiles.segment_estimates |
Fields
The following fields are returned by SELECT queries:
- get_segment_estimate
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The unique name of the domain. (pattern: <code>^[a-zA-Z0-9_-]+$</code>) |
estimate | string | The estimated number of profiles contained in the segment. |
estimate_id | string | The QueryId which is the same as the value passed in QueryId. |
message | string | The error message if there is any error. |
status | string | The current status of the query. (RUNNING, SUCCEEDED, FAILED) |
status_code | integer | The status code of the segment estimate. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_segment_estimate | select | domain_name, estimate_id, region | Gets the result of a segment estimate query. | |
create_segment_estimate | insert | domain_name, region | Creates 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.
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The unique name of the domain. |
estimate_id | string | The query Id passed by a previous CreateSegmentEstimate operation. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_segment_estimate
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
- create_segment_estimate
- Manifest
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
;
# Description fields are for documentation purposes
- name: segment_estimates
props:
- name: domain_name
value: "{{ domain_name }}"
description: Required parameter for the segment_estimates resource.
- name: region
value: "{{ region }}"
description: Required parameter for the segment_estimates resource.
- name: SegmentQuery
description: |
Contains all groups of the segment definition.
value:
Groups:
- Dimensions: "{{ Dimensions }}"
SourceSegments: "{{ SourceSegments }}"
SourceType: "{{ SourceType }}"
Type: "{{ Type }}"
Include: "{{ Include }}"
- name: SegmentSqlQuery
value: "{{ SegmentSqlQuery }}"