Databricks Machine Learning Associate · Section 1 · 38% of the exam
Describe the differences between online and offline feature tables
One of the objectives of the Databricks Certified Machine Learning Associate exam, in the section “Databricks Machine Learning”. Here is what it covers, the points to remember and a question to try.
What it covers
A training set joins feature tables to a DataFrame of keys and labels, and fe.log_model stores the feature lookups with the model so that batch scoring needs only the keys. Real-time serving reads the same features from an online feature store, a low-latency copy of the offline Delta table.
Points to remember
FeatureLookup(table_name, lookup_key, feature_names, rename_outputs, default_values, timestamp_lookup_key)says which features to join on which key.fe.create_training_set(df, feature_lookups, label, exclude_columns), thentraining_set.load_df(), gives the joined training DataFrame.fe.log_model(model, artifact_path, flavor, training_set, registered_model_name)packages the feature spec; a signature is logged automatically for Unity Catalog feature tables.- Transformations applied after
load_df()are not reproduced at inference: put them in the model pipeline. fe.score_batch(model_uri, df)needs only the keys; output = input columns + features +prediction; missing features become NaN.
Try a question
Fraud features in the offline table ml.fraud.card_features change throughout the day, and the online copy used by the serving endpoint must reflect changes as soon as they happen. Change Data Feed is enabled on the table. Which publish_table setting fits?
- A
publish_mode="SNAPSHOT" - B
publish_mode="TRIGGERED"run once a week - C
publish_mode="CONTINUOUS" - DNo publish mode, because online stores read the Delta table directly
Show the answer
C. publish_table supports TRIGGERED (the default, incremental on demand or on a schedule), CONTINUOUS (streaming, immediate updates) and SNAPSHOT (one-time full copy). TRIGGERED and CONTINUOUS need Change Data Feed on the source table.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Training and scoring with feature tables; online vs offline teaches this objective (about 40 minutes), and 16 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Identify the best practices of an MLOps strategy
- Identify the advantages of using ML runtimes
- Identify how AutoML facilitates model/feature selection.
- Identify the advantages AutoML brings to the model development process
- Identify the benefits of creating feature store tables at the account level in Unity Catalog in Databricks vs at the workspace level
- Create a feature store table in Unity Catalog
- Write data to a feature store table
- Train a model with features from a feature store table.
- Score a model using features from a feature store table.
- Identify the best run using the MLflow Client API.
- Manually log metrics, artifacts, and models in an MLflow Run.
- Identify information available in the MLflow UI