CustomerProfiles / Client / get_calculated_attribute_definition

get_calculated_attribute_definition

CustomerProfiles.Client.get_calculated_attribute_definition(**kwargs)

Provides more information on a calculated attribute definition for Customer Profiles.

See also: AWS API Documentation

Request Syntax

response = client.get_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string'
)
Parameters:
  • DomainName (string) –

    [REQUIRED]

    The unique name of the domain.

  • CalculatedAttributeName (string) –

    [REQUIRED]

    The unique name of the calculated attribute.

Return type:

dict

Returns:

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE',
    'Filter': {
        'Include': 'ALL'|'ANY'|'NONE',
        'Groups': [
            {
                'Type': 'ALL'|'ANY'|'NONE',
                'Dimensions': [
                    {
                        'Attributes': {
                            'string': {
                                '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': [
                                    'string',
                                ]
                            }
                        }
                    },
                ]
            },
        ]
    },
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS',
            'ValueRange': {
                'Start': 123,
                'End': 123
            },
            'TimestampSource': 'string',
            'TimestampFormat': 'string'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'UseHistoricalData': True|False,
    'Status': 'PREPARING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
    'Readiness': {
        'ProgressPercentage': 123,
        'Message': 'string'
    },
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    • CalculatedAttributeName (string) –

      The unique name of the calculated attribute.

    • DisplayName (string) –

      The display name of the calculated attribute.

    • Description (string) –

      The description of the calculated attribute.

    • CreatedAt (datetime) –

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) –

      The timestamp of when the calculated attribute definition was most recently edited.

    • Statistic (string) –

      The aggregation operation to perform for the calculated attribute.

    • Filter (dict) –

      The filter assigned to this calculated attribute definition.

      • Include (string) –

        Define whether to include or exclude objects for Calculated Attributed calculation that fit the filter groups criteria.

      • Groups (list) –

        Holds the list of Filter groups within the Filter definition.

        • (dict) –

          Object that holds the dimensions to filter on.

          • Type (string) –

            The type of logical relationship between the dimensions of the Filter group.

          • Dimensions (list) –

            Object that holds the attributes to filter on.

            • (dict) –

              Contains the map of attribute names to attribute dimensions.

              • Attributes (dict) –

                Is the attribute within the FilterDimension map

                • (string) –

                  • (dict) –

                    Object that defines how to filter the incoming objects for the calculated attribute.

                    • DimensionType (string) –

                      The action to filter with.

                    • Values (list) –

                      The values to apply the DimensionType on.

                      • (string) –

    • Conditions (dict) –

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) –

        The relative time period over which data is included in the aggregation.

        • Value (integer) –

          The amount of time of the specified unit.

        • Unit (string) –

          The unit of time.

        • ValueRange (dict) –

          A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute. Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.

          • Start (integer) –

            The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

          • End (integer) –

            The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

        • TimestampSource (string) –

          An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of "{ObjectTypeName.<Location of timestamp field in JSON pointer format>}". E.g. if your object type is MyType and source JSON is {“generatedAt”: {“timestamp”: “1737587945945”}}, then TimestampSource should be “{MyType.generatedAt.timestamp}”.

        • TimestampFormat (string) –

          The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {“generatedAt”: {“timestamp”: “2001-07-04T12:08:56.235-0700”}}, then TimestampFormat should be “ISO_8601”.

      • ObjectCount (integer) –

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) –

        The threshold for the calculated attribute.

        • Value (string) –

          The value of the threshold.

        • Operator (string) –

          The operator of the threshold.

    • AttributeDetails (dict) –

      Mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) –

        A list of attribute items specified in the mathematical expression.

        • (dict) –

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) –

            The name of an attribute defined in a profile object type.

      • Expression (string) –

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • UseHistoricalData (boolean) –

      Whether historical data ingested before the Calculated Attribute was created should be included in calculations.

    • Status (string) –

      Status of the Calculated Attribute creation (whether all historical data has been indexed).

    • Readiness (dict) –

      Information indicating if the Calculated Attribute is ready for use by confirming all historical data has been processed and reflected.

      • ProgressPercentage (integer) –

        Approximately how far the Calculated Attribute creation is from completion.

      • Message (string) –

        Any customer messaging.

    • Tags (dict) –

      The tags used to organize, track, or control access for this resource.

      • (string) –

        • (string) –

Exceptions

  • CustomerProfiles.Client.exceptions.BadRequestException

  • CustomerProfiles.Client.exceptions.ResourceNotFoundException

  • CustomerProfiles.Client.exceptions.AccessDeniedException

  • CustomerProfiles.Client.exceptions.ThrottlingException

  • CustomerProfiles.Client.exceptions.InternalServerException