SageMakerFeatureStoreRuntime / Client / batch_get_record

batch_get_record#

SageMakerFeatureStoreRuntime.Client.batch_get_record(**kwargs)#

Retrieves a batch of Records from a FeatureGroup.

See also: AWS API Documentation

Request Syntax

response = client.batch_get_record(
    Identifiers=[
        {
            'FeatureGroupName': 'string',
            'RecordIdentifiersValueAsString': [
                'string',
            ],
            'FeatureNames': [
                'string',
            ]
        },
    ],
    ExpirationTimeResponse='Enabled'|'Disabled'
)
Parameters:
  • Identifiers (list) –

    [REQUIRED]

    A list containing the name or Amazon Resource Name (ARN) of the FeatureGroup, the list of names of Feature``s to be retrieved, and the corresponding ``RecordIdentifier values as strings.

    • (dict) –

      The identifier that identifies the batch of Records you are retrieving in a batch.

      • FeatureGroupName (string) – [REQUIRED]

        The name or Amazon Resource Name (ARN) of the FeatureGroup containing the records you are retrieving in a batch.

      • RecordIdentifiersValueAsString (list) – [REQUIRED]

        The value for a list of record identifiers in string format.

        • (string) –

      • FeatureNames (list) –

        List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.

        • (string) –

  • ExpirationTimeResponse (string) – Parameter to request ExpiresAt in response. If Enabled, BatchGetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, BatchGetRecord will return null.

Return type:

dict

Returns:

Response Syntax

{
    'Records': [
        {
            'FeatureGroupName': 'string',
            'RecordIdentifierValueAsString': 'string',
            'Record': [
                {
                    'FeatureName': 'string',
                    'ValueAsString': 'string',
                    'ValueAsStringList': [
                        'string',
                    ]
                },
            ],
            'ExpiresAt': 'string'
        },
    ],
    'Errors': [
        {
            'FeatureGroupName': 'string',
            'RecordIdentifierValueAsString': 'string',
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ],
    'UnprocessedIdentifiers': [
        {
            'FeatureGroupName': 'string',
            'RecordIdentifiersValueAsString': [
                'string',
            ],
            'FeatureNames': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) –

    • Records (list) –

      A list of Records you requested to be retrieved in batch.

      • (dict) –

        The output of records that have been retrieved in a batch.

        • FeatureGroupName (string) –

          The FeatureGroupName containing Records you retrieved in a batch.

        • RecordIdentifierValueAsString (string) –

          The value of the record identifier in string format.

        • Record (list) –

          The Record retrieved.

          • (dict) –

            The value associated with a feature.

            • FeatureName (string) –

              The name of a feature that a feature value corresponds to.

            • ValueAsString (string) –

              The value in string format associated with a feature. Used when your CollectionType is None. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

            • ValueAsStringList (list) –

              The list of values in string format associated with a feature. Used when your CollectionType is a List, Set, or Vector. Note that features types can be String, Integral, or Fractional. These values represents all three types as a string.

              • (string) –

        • ExpiresAt (string) –

          The ExpiresAt ISO string of the requested record.

    • Errors (list) –

      A list of errors that have occurred when retrieving a batch of Records.

      • (dict) –

        The error that has occurred when attempting to retrieve a batch of Records.

        • FeatureGroupName (string) –

          The name of the feature group that the record belongs to.

        • RecordIdentifierValueAsString (string) –

          The value for the RecordIdentifier in string format of a Record from a FeatureGroup that is causing an error when attempting to be retrieved.

        • ErrorCode (string) –

          The error code of an error that has occurred when attempting to retrieve a batch of Records. For more information on errors, see Errors.

        • ErrorMessage (string) –

          The error message of an error that has occurred when attempting to retrieve a record in the batch.

    • UnprocessedIdentifiers (list) –

      A unprocessed list of FeatureGroup names, with their corresponding RecordIdentifier value, and Feature name.

      • (dict) –

        The identifier that identifies the batch of Records you are retrieving in a batch.

        • FeatureGroupName (string) –

          The name or Amazon Resource Name (ARN) of the FeatureGroup containing the records you are retrieving in a batch.

        • RecordIdentifiersValueAsString (list) –

          The value for a list of record identifiers in string format.

          • (string) –

        • FeatureNames (list) –

          List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.

          • (string) –

Exceptions

  • SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError

  • SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure

  • SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailable

  • SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden