CertLumen

Databricks Machine Learning Associate · Section 1 · 38% of the exam

Train a model with features from a feature store table.

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), then training_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?

  1. Apublish_mode="SNAPSHOT"
  2. Bpublish_mode="TRIGGERED" run once a week
  3. Cpublish_mode="CONTINUOUS"
  4. 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

← Previous objective · All 48 objectives · Next objective →