Creates a new calculated attribute definition¶
Description¶
Creates a new calculated attribute definition. After creation, new object data ingested into Customer Profiles will be included in the calculated attribute, which can be retrieved for a profile using the get_calculated_attribute_for_profile API. Defining a calculated attribute makes it available for all profiles within a domain. Each calculated attribute can only reference one ObjectType and at most, two fields from that ObjectType.
Usage¶
customerprofiles_create_calculated_attribute_definition(DomainName,
CalculatedAttributeName, DisplayName, Description, AttributeDetails,
Conditions, Filter, Statistic, UseHistoricalData, Tags)
Arguments¶
-
DomainName[required] The unique name of the domain.
-
CalculatedAttributeName[required] The unique name of the calculated attribute.
-
DisplayNameThe display name of the calculated attribute.
-
DescriptionThe description of the calculated attribute.
-
AttributeDetails[required] Mathematical expression and a list of attribute items specified in that expression.
-
ConditionsThe conditions including range, object count, and threshold for the calculated attribute.
-
FilterDefines how to filter incoming objects to include part of the Calculated Attribute.
-
Statistic[required] The aggregation operation to perform for the calculated attribute.
-
UseHistoricalDataWhether historical data ingested before the Calculated Attribute was created should be included in calculations.
-
TagsThe tags used to organize, track, or control access for this resource.
Value¶
A list with the following syntax:
list(
CalculatedAttributeName = "string",
DisplayName = "string",
Description = "string",
AttributeDetails = list(
Attributes = list(
list(
Name = "string"
)
),
Expression = "string"
),
Conditions = list(
Range = list(
Value = 123,
Unit = "DAYS",
ValueRange = list(
Start = 123,
End = 123
),
TimestampSource = "string",
TimestampFormat = "string"
),
ObjectCount = 123,
Threshold = list(
Value = "string",
Operator = "EQUAL_TO"|"GREATER_THAN"|"LESS_THAN"|"NOT_EQUAL_TO"
)
),
Filter = list(
Include = "ALL"|"ANY"|"NONE",
Groups = list(
list(
Type = "ALL"|"ANY"|"NONE",
Dimensions = list(
list(
Attributes = list(
list(
DimensionType = "INCLUSIVE"|"EXCLUSIVE"|"CONTAINS"|"BEGINS_WITH"|"ENDS_WITH"|"BEFORE"|"AFTER"|"BETWEEN"|"NOT_BETWEEN"|"ON"|"GREATER_THAN"|"LESS_THAN"|"GREATER_THAN_OR_EQUAL"|"LESS_THAN_OR_EQUAL"|"EQUAL",
Values = list(
"string"
)
)
)
)
)
)
)
),
Statistic = "FIRST_OCCURRENCE"|"LAST_OCCURRENCE"|"COUNT"|"SUM"|"MINIMUM"|"MAXIMUM"|"AVERAGE"|"MAX_OCCURRENCE"|"RECENT_OCCURRENCES",
CreatedAt = as.POSIXct(
"2015-01-01"
),
LastUpdatedAt = as.POSIXct(
"2015-01-01"
),
UseHistoricalData = TRUE|FALSE,
Status = "PREPARING"|"IN_PROGRESS"|"COMPLETED"|"FAILED",
Readiness = list(
ProgressPercentage = 123,
Message = "string"
),
Tags = list(
"string"
)
)
Request syntax¶
svc$create_calculated_attribute_definition(
DomainName = "string",
CalculatedAttributeName = "string",
DisplayName = "string",
Description = "string",
AttributeDetails = list(
Attributes = list(
list(
Name = "string"
)
),
Expression = "string"
),
Conditions = list(
Range = list(
Value = 123,
Unit = "DAYS",
ValueRange = list(
Start = 123,
End = 123
),
TimestampSource = "string",
TimestampFormat = "string"
),
ObjectCount = 123,
Threshold = list(
Value = "string",
Operator = "EQUAL_TO"|"GREATER_THAN"|"LESS_THAN"|"NOT_EQUAL_TO"
)
),
Filter = list(
Include = "ALL"|"ANY"|"NONE",
Groups = list(
list(
Type = "ALL"|"ANY"|"NONE",
Dimensions = list(
list(
Attributes = list(
list(
DimensionType = "INCLUSIVE"|"EXCLUSIVE"|"CONTAINS"|"BEGINS_WITH"|"ENDS_WITH"|"BEFORE"|"AFTER"|"BETWEEN"|"NOT_BETWEEN"|"ON"|"GREATER_THAN"|"LESS_THAN"|"GREATER_THAN_OR_EQUAL"|"LESS_THAN_OR_EQUAL"|"EQUAL",
Values = list(
"string"
)
)
)
)
)
)
)
),
Statistic = "FIRST_OCCURRENCE"|"LAST_OCCURRENCE"|"COUNT"|"SUM"|"MINIMUM"|"MAXIMUM"|"AVERAGE"|"MAX_OCCURRENCE"|"RECENT_OCCURRENCES",
UseHistoricalData = TRUE|FALSE,
Tags = list(
"string"
)
)