metric_attributions
Creates, updates, deletes, gets or lists a metric_attributions resource.
Overview
| Name | metric_attributions |
| Type | Resource |
| Id | aws.personalize.metric_attributions |
Fields
The following fields are returned by SELECT queries:
- describe_metric_attribution
- list_metric_attributions
| Name | Datatype | Description |
|---|---|---|
name | string | The metric attribution's name. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
creation_date_time | string (date-time) | The metric attribution's creation date time. |
dataset_group_arn | string | The metric attribution's dataset group Amazon Resource Name (ARN). (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
failure_reason | string | The metric attribution's failure reason. |
last_updated_date_time | string (date-time) | The metric attribution's last updated date time. |
metric_attribution_arn | string | The metric attribution's Amazon Resource Name (ARN). (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
metrics_output_config | object | The metric attribution's output configuration. |
status | string | The metric attribution's status. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the metric attribution. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
creation_date_time | string (date-time) | The metric attribution's creation date time. |
failure_reason | string | The metric attribution's failure reason. |
last_updated_date_time | string (date-time) | The metric attribution's last updated date time. |
metric_attribution_arn | string | The metric attribution's Amazon Resource Name (ARN). (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The metric attribution's status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_metric_attribution | select | region | Describes a metric attribution. | |
list_metric_attributions | select | region | Lists metric attributions. | |
create_metric_attribution | insert | region, name, datasetGroupArn, metrics, metricsOutputConfig | Creates a metric attribution. A metric attribution creates reports on the data that you import into Amazon Personalize. Depending on how you imported the data, you can view reports in Amazon CloudWatch or Amazon S3. For more information, see Measuring impact of recommendations. | |
update_metric_attribution | update | region | Updates a metric attribution. | |
delete_metric_attribution | delete | region | Deletes a metric attribution. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_metric_attribution
- list_metric_attributions
Describes a metric attribution.
SELECT
name,
creation_date_time,
dataset_group_arn,
failure_reason,
last_updated_date_time,
metric_attribution_arn,
metrics_output_config,
status
FROM aws.personalize.metric_attributions
WHERE region = '{{ region }}' -- required
;
Lists metric attributions.
SELECT
name,
creation_date_time,
failure_reason,
last_updated_date_time,
metric_attribution_arn,
status
FROM aws.personalize.metric_attributions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_metric_attribution
- Manifest
Creates a metric attribution. A metric attribution creates reports on the data that you import into Amazon Personalize. Depending on how you imported the data, you can view reports in Amazon CloudWatch or Amazon S3. For more information, see Measuring impact of recommendations.
INSERT INTO aws.personalize.metric_attributions (
name,
datasetGroupArn,
metrics,
metricsOutputConfig,
region
)
SELECT
'{{ name }}' /* required */,
'{{ datasetGroupArn }}' /* required */,
'{{ metrics }}' /* required */,
'{{ metricsOutputConfig }}' /* required */,
'{{ region }}'
RETURNING
metric_attribution_arn
;
# Description fields are for documentation purposes
- name: metric_attributions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the metric_attributions resource.
- name: name
value: "{{ name }}"
description: |
A name for the metric attribution.
- name: datasetGroupArn
value: "{{ datasetGroupArn }}"
description: |
The Amazon Resource Name (ARN) of the destination dataset group for the metric attribution.
- name: metrics
description: |
A list of metric attributes for the metric attribution. Each metric attribute specifies an event type to track and a function. Available functions are SUM() or SAMPLECOUNT(). For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
value:
- eventType: "{{ eventType }}"
metricName: "{{ metricName }}"
expression: "{{ expression }}"
- name: metricsOutputConfig
description: |
The output configuration details for the metric attribution.
value:
s3DataDestination:
path: "{{ path }}"
kmsKeyArn: "{{ kmsKeyArn }}"
roleArn: "{{ roleArn }}"
UPDATE examples
- update_metric_attribution
Updates a metric attribution.
UPDATE aws.personalize.metric_attributions
SET
addMetrics = '{{ addMetrics }}',
removeMetrics = '{{ removeMetrics }}',
metricsOutputConfig = '{{ metricsOutputConfig }}',
metricAttributionArn = '{{ metricAttributionArn }}'
WHERE
region = '{{ region }}' --required
RETURNING
metric_attribution_arn;
DELETE examples
- delete_metric_attribution
Deletes a metric attribution.
DELETE FROM aws.personalize.metric_attributions
WHERE region = '{{ region }}' --required
;