CustomerProfiles / Client / create_recommender_schema

create_recommender_schema

CustomerProfiles.Client.create_recommender_schema(**kwargs)

Creates a recommender schema. A recommender schema defines the set of data columns available for training recommenders and filters under a domain.

See also: AWS API Documentation

Request Syntax

response = client.create_recommender_schema(
    DomainName='string',
    RecommenderSchemaName='string',
    Fields={
        'string': [
            {
                'TargetFieldName': 'string',
                'ContentType': 'STRING'|'NUMBER',
                'FeatureType': 'TEXTUAL'|'CATEGORICAL'
            },
        ]
    },
    Tags={
        'string': 'string'
    }
)
Parameters:
  • DomainName (string) –

    [REQUIRED]

    The unique name of the domain.

  • RecommenderSchemaName (string) –

    [REQUIRED]

    The name of the recommender schema. The name must be unique within the domain.

  • Fields (dict) –

    [REQUIRED]

    A map of dataset type to column definitions that specifies which data columns to include in the schema. Currently only the _webAnalytics key is supported.

    • (string) –

      • (list) –

        • (dict) –

          Defines a column in a recommender schema, including the target field name and optional feature and content type settings for training.

          • TargetFieldName (string) – [REQUIRED]

            The name of the target field in the dataset, such as Location.City or Attributes.MealTime.

          • ContentType (string) –

            The data type of the column value. Valid values are String and Number. The default value is String.

          • FeatureType (string) –

            How the column is treated for model training. Valid values are CATEGORICAL and TEXTUAL.

  • Tags (dict) –

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

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'RecommenderSchemaArn': 'string',
    'RecommenderSchemaName': 'string',
    'Fields': {
        'string': [
            {
                'TargetFieldName': 'string',
                'ContentType': 'STRING'|'NUMBER',
                'FeatureType': 'TEXTUAL'|'CATEGORICAL'
            },
        ]
    },
    'CreatedAt': datetime(2015, 1, 1),
    'Status': 'ACTIVE'|'DELETING',
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    • RecommenderSchemaArn (string) –

      The Amazon Resource Name (ARN) of the recommender schema.

    • RecommenderSchemaName (string) –

      The name of the recommender schema.

    • Fields (dict) –

      A map of dataset type to column definitions included in the schema.

      • (string) –

        • (list) –

          • (dict) –

            Defines a column in a recommender schema, including the target field name and optional feature and content type settings for training.

            • TargetFieldName (string) –

              The name of the target field in the dataset, such as Location.City or Attributes.MealTime.

            • ContentType (string) –

              The data type of the column value. Valid values are String and Number. The default value is String.

            • FeatureType (string) –

              How the column is treated for model training. Valid values are CATEGORICAL and TEXTUAL.

    • CreatedAt (datetime) –

      The timestamp of when the recommender schema was created.

    • Status (string) –

      The status of the recommender schema.

    • Tags (dict) –

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

      • (string) –

        • (string) –

Exceptions