{"id":4453,"library":"azureml-featurestore","title":"Azure Machine Learning Feature Store SDK","description":"The `azureml-featurestore` package is the core SDK interface for Azure ML Feature Store, working alongside `azure-ai-ml` to provide a managed feature store experience. It enables the development of feature set specifications in Spark, listing and retrieving feature sets, generating and resolving feature retrieval specifications, and performing offline feature retrieval with point-in-time joins. The library is actively developed, with its current version being 1.2.2.","status":"active","version":"1.2.2","language":"en","source_language":"en","source_url":"https://github.com/Azure/azureml-examples/tree/main/sdk/python/featurestore-sample","tags":["azure","machine-learning","feature-store","MLOps","data-engineering"],"install":[{"cmd":"pip install azureml-featurestore azure-ai-ml mltable","lang":"bash","label":"Install core SDK and dependencies"}],"dependencies":[{"reason":"Required for core Azure ML client operations, including Feature Store CRUD operations.","package":"azure-ai-ml","optional":false},{"reason":"Often used in conjunction with feature store for data handling in examples and tutorials.","package":"mltable","optional":true}],"imports":[{"symbol":"FeatureStoreClient","correct":"from azureml.featurestore import FeatureStoreClient"},{"note":"As of breaking changes around version 0.1.0b3, `init_online_lookup` was moved from a method of `FeatureStoreClient` to a standalone function in the module.","wrong":"from azureml.featurestore import FeatureStoreClient; client.init_online_lookup(...)","symbol":"init_online_lookup","correct":"from azureml.featurestore import init_online_lookup"},{"note":"As of breaking changes around version 0.1.0b3, `shutdown_online_lookup` was moved from a method of `FeatureStoreClient` to a standalone function in the module.","wrong":"from azureml.featurestore import FeatureStoreClient; client.shutdown_online_lookup(...)","symbol":"shutdown_online_lookup","correct":"from azureml.featurestore import shutdown_online_lookup"},{"note":"As of breaking changes around version 0.1.0b3, `get_online_features` was moved from a method of `FeatureStoreClient` to a standalone function in the module.","wrong":"from azureml.featurestore import FeatureStoreClient; client.get_online_features(...)","symbol":"get_online_features","correct":"from azureml.featurestore import get_online_features"}],"quickstart":{"code":"import os\nfrom azure.ai.ml import MLClient\nfrom azure.ai.ml.entities import FeatureStore, FeatureStoreEntity\nfrom azure.identity import DefaultAzureCredential\nfrom azureml.featurestore import FeatureStoreClient\n\n# Replace with your actual subscription, resource group, and feature store name\nsubscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', 'your-subscription-id')\nresource_group_name = os.environ.get('AZURE_RESOURCE_GROUP', 'your-resource-group')\nfeature_store_name = os.environ.get('AZURE_FEATURE_STORE_NAME', 'my-feature-store')\nfeature_store_location = os.environ.get('AZURE_LOCATION', 'eastus')\n\n# Authenticate and create MLClient for managing Azure ML resources\ntry:\n    credential = DefaultAzureCredential()\n    ml_client = MLClient(\n        credential=credential,\n        subscription_id=subscription_id,\n        resource_group_name=resource_group_name\n    )\nexcept Exception as e:\n    print(f\"Could not authenticate or create MLClient: {e}\")\n    print(\"Please ensure AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, and AZURE_LOCATION environment variables are set or replaced.\")\n    exit(1)\n\n# Create a Feature Store if it doesn't exist (this step typically requires Azure CLI or a separate script to run once)\n# For a runnable quickstart, we assume the feature store might already be created or we just define it.\n# In a real scenario, you'd check for existence and create if necessary.\nprint(f\"Attempting to get or define Feature Store '{feature_store_name}'...\")\nfeature_store = FeatureStore(\n    name=feature_store_name,\n    location=feature_store_location,\n    description=\"My first Azure ML Feature Store\"\n)\n\n# This line would typically be ml_client.feature_stores.begin_create_or_update(feature_store).result()\n# However, for a quickstart that focuses on the azureml-featurestore SDK, we will mock the client initialization\n# assuming the feature store exists.\nprint(\"Assuming feature store is created. Initializing FeatureStoreClient...\")\n\n# Initialize FeatureStoreClient\n# This client is used for developing and consuming features.\nfs_client = FeatureStoreClient(\n    credential=credential,\n    subscription_id=subscription_id,\n    resource_group_name=resource_group_name,\n    name=feature_store_name\n)\n\nprint(f\"Successfully initialized FeatureStoreClient for '{feature_store_name}'.\")\n\n# Example: List existing feature sets (requires a feature store to be set up and contain feature sets)\n# In a real scenario, you would have feature sets defined and registered.\n# This is a placeholder to demonstrate client usage.\nprint(\"Attempting to list feature sets (this might return empty if no feature sets exist)...\")\nfeature_sets = fs_client.feature_sets.list()\nfor fs in feature_sets:\n    print(f\"  - Found Feature Set: {fs.name} (Version: {fs.version})\")\n\nprint(\"Quickstart finished. For advanced usage, refer to Azure ML Feature Store documentation.\")","lang":"python","description":"This quickstart demonstrates how to initialize the `MLClient` for managing Azure ML resources (including creating a Feature Store if needed) and then the `FeatureStoreClient` from `azureml-featurestore` for interacting with feature sets. It includes a placeholder for listing feature sets to show basic client usage. Authentication uses `DefaultAzureCredential` and expects Azure environment variables or hardcoded values."},"warnings":[{"fix":"Update your code to import these functions directly from `azureml.featurestore` (e.g., `from azureml.featurestore import get_online_features`) and ensure your data handling for `get_online_features` uses `pyarrow.Table`.","message":"The online feature retrieval functions `init_online_lookup`, `shutdown_online_lookup`, and `get_online_features` were moved from being methods of `FeatureStoreClient` to standalone module-level functions. Additionally, the contract for `get_online_features` changed from accepting/returning `pandas.DataFrame` to `pyarrow.Table`.","severity":"breaking","affected_versions":"Around 0.1.0b3 and later versions (current 1.2.2)."},{"fix":"Ensure the user identity or managed identity running the operations has the `AzureML Data Scientist` role on the feature store and `Storage Blob Data Reader` on relevant source and offline store storage accounts. Consult Azure ML documentation for detailed RBAC requirements for each operation.","message":"Many operations with Azure ML Feature Store, including creating the feature store itself, retrieving features, and materialization jobs, require specific Azure Role-Based Access Control (RBAC) permissions. Common errors arise from insufficient permissions.","severity":"gotcha","affected_versions":"All versions."},{"fix":"Before updating the offline materialization store, disable offline materialization on all affected feature sets. After the store update, you must re-enable materialization and resubmit all materialization (backfill) jobs to regenerate the data.","message":"Updating an offline materialization store at the feature store level requires disabling offline materialization for all feature sets within that store first. Disabling materialization resets the status of already materialized data, rendering it unusable.","severity":"gotcha","affected_versions":"All versions."}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}