Serve declarative features
important
Feature Serving endpoints are not supported for Declarative Feature Engineering. To serve features online, deploy a model serving endpoint using a model logged through Unity Catalog.
Models that are trained using features from Databricks automatically track lineage to the features they were trained on. When deployed as model serving endpoints, these models use Unity Catalog to look up features from online stores.
Deploy a model serving endpoint
Use an existing model serving endpoint, or use the MLflow Deployments SDK to create a new one. The model must be registered in Unity Catalog.
The following code shows how to create a new model serving endpoint. For more information, see Create custom model serving endpoints.
Python
import mlflow.deployments
client = mlflow.deployments.get_deploy_client("databricks")
# Create a serving endpoint for a UC model
endpoint = client.create_endpoint(
name="fraud-detection-endpoint",
config={
"served_entities": [
{
"entity_name": "main.ecommerce.fraud_model",
"entity_version": "1",
"workload_size": "Small",
"scale_to_zero_enabled": True,
}
]
},
)
Query the endpoint
Python
import mlflow.deployments
client = mlflow.deployments.get_deploy_client("databricks")
response = client.predict(
endpoint="fraud-detection-endpoint",
inputs={
"dataframe_records": [
{"user_id": "user_123", "transaction_time": "2026-03-01T12:00:00"},
]
},
)