Retrieving features from feature groups
Once feature groups are populated, to retrieve features from the feature store, there are two APIs available – get_record
and batch_get_record
. The following code block shows retrieving a single record from a feature group using the get_record
API:
record_identifier_value = str('300') response = sagemaker_fs_runtime_client.get_record (FeatureGroupName=weather_feature_group_name_online, RecordIdentifierValueAsString=record_identifier_value) response Response from the code block looks similar to the following figure: {'ResponseMetadata': {'RequestId': '195debf2-3b10-4116-98c7-142dc13e9df3', Â Â 'HTTPStatusCode': 200, Â Â 'HTTPHeaders': {'x-amzn-requestid': '195debf2-3b10-4116-98c7-142dc13e9df3', Â Â Â 'content-type': 'application/json', Â Â Â 'content-length': '214', Â Â ...