Monday
Hi Databricks Community,
I’m trying to deploy a model serving endpoint that uses Databricks Feature Store (Unity Catalog, online tables).
Environment:
How I logged the model:
Questions:
How is it possible to use the Online feature tables in a model trained and logged with the FeatureEngineeringClient?
What is this _USER suffix parameter that is required and why was it not packaged properly be the FeatureEngineeringClient? I'm running the processes from pipeline so the service principal is the creator and thus the owner of both the model, offline and online feature tables, why is the automatic lookup not working?
Any help or guidance would be greatly appreciated!
Tuesday - last edited Tuesday
1) Use the Databricks Online Feature Store path end‑to‑end
2) Confirm platform and client versions
3) Re‑publish feature tables correctly (if in doubt, redo)
4) Re‑log and redeploy the model for automatic lookup
5) Remove third‑party store credentials and env vars
6) Validate endpoint permissions for the auto service principal
If you apply the steps above, the “_USER not found” path will no longer be taken and the endpoint will use OAuth-based access to Lakebase online tables automatically.
# DBR 16.4 LTS ML (or serverless) + databricks-feature-engineering >= 0.13.0
from databricks.feature_engineering import FeatureEngineeringClient, FeatureLookup
from databricks.ml_features.entities.online_store import DatabricksOnlineStore
fe = FeatureEngineeringClient()
# Ensure offline table has PK + CDF, then publish to Lakebase
online_store = fe.get_online_store(name="my-online-store")
fe.publish_table(
online_store=online_store,
source_table_name="catalog.schema.nyc_taxi_pickup_features_spn",
online_table_name="catalog.schema.nyc_taxi_pickup_features_spn_online",
)
# Log model with feature lookups for automatic online serving
feature_lookups = [
FeatureLookup(
table_name="catalog.schema.nyc_taxi_pickup_features_spn",
lookup_key="pickup_location_id",
feature_names=["avg_wait_time", "pickup_demand_score"],
)
]
# Train on training_set.load_df(), then:
fe.log_model(
model=trained_model,
artifact_path="model",
registered_model_name="catalog.schema.nyc_taxi_model",
feature_lookups=feature_lookups,
)
yesterday
Thanks for the reply It is very useful and comprehensive.
I managed to find another solution to the problem so I wanted to share some additional details on this topic:
I was using 15.4 LTS ML Runtime, this could have caused the problem - I did not switch to 16.4 since that might have other breaking changes on other parts of my project.
My solution was: I realized that in the container created by Databricks for the serving endpoint behind the scenes it installs a package 'databricks-feature-lookup==1.*' inside the container and for my usecase it defaulted to version 1.4 which is an older version. Instead for the automatic authentication to Online tables to work 'databricks-feature-lookup==1.9' is required. -> I have not found any documentation that mentioned this dependency so I wanted to share this - it might be useful to mention this somewhere in the docs as it was a bit hidden and hard to debug.
By packaging the model with this dependency fixed inside the FeatureEngineeringClient.log_model() we can ensure that the right version of this package gets installed inside the serving-endpoint's docker and we won't get the auth error again.
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now