Courseiva
Model Development →mediumMultiple Choice

Databricks-ML-Pro Model Development Practice Question

A data scientist is using Databricks Feature Store to build a training set for a fraud detection model. The feature table contains a column `transaction_time` that is a timestamp. After creating the training set with `create_training_set`, the resulting DataFrame includes `transaction_time` but the model training code fails because the timestamp is not accepted by the XGBoost trainer. What is the most likely cause and correct resolution?

⚠ Common exam trap

The trap here is assuming that Databricks Feature Store automatically converts non-numeric columns like timestamps into numeric formats suitable for all model trainers.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The training set includes the timestamp column because `create_training_set` does not automatically exclude non-numeric columns; the data scientist should drop or transform the timestamp column before passing the DataFrame to the XGBoost trainer.

`create_training_set` preserves the original data types of feature columns, so a timestamp column remains a timestamp. XGBoost cannot handle timestamp types directly, causing the training failure. The data scientist must either drop the column or transform it into numeric features such as hour, day of week, or time since a reference point. This ensures compatibility while retaining useful temporal signals.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    The training set includes the timestamp column because `create_training_set` does not automatically exclude non-numeric columns; the data scientist should drop or transform the timestamp column before passing the DataFrame to the XGBoost trainer.

    Why this is correct

    `create_training_set` returns all columns from the feature table, including timestamps, without altering their types. XGBoost requires numeric or boolean inputs, so a raw timestamp causes a failure. The correct fix is to drop the timestamp or derive numeric features such as hour of day or day of week. This preserves feature lineage while making the data compatible with the trainer.

  • ✗

    The timestamp column should be excluded from the feature table and instead passed as a separate DataFrame column outside the Feature Store lookup.

    Why it's wrong here

    Excluding the timestamp from the feature table is unnecessary and may lose valuable temporal information. Feature Store supports timestamp columns; the issue is that XGBoost cannot directly consume them. Moving the column outside the lookup does not solve the type incompatibility and complicates feature lineage. A better approach is to transform the timestamp into numeric features before training.

  • ✗

    The error occurs because the Feature Store requires all features to be of type double; the data scientist must cast the timestamp to double using `.cast('double')` before creating the training set.

    Why it's wrong here

    Feature Store does not require all features to be double; it supports various data types including timestamps. Casting a timestamp directly to double would produce a meaningless numeric value (e.g., seconds since epoch) that may harm model performance. The proper approach is to engineer meaningful numeric features from the timestamp rather than a blind cast.

  • ✗

    Databricks Feature Store automatically converts timestamp columns to Unix epoch integers when creating the training set, so the trainer should accept them without modification.

    Why it's wrong here

    Feature Store does not automatically convert timestamp columns to integers; it preserves the original data types. The failure indicates that the timestamp type is incompatible with XGBoost, which expects numeric or boolean features. Simply assuming automatic conversion is incorrect and would not resolve the error. The data scientist must explicitly handle the timestamp column, for example by extracting numeric features or dropping it.

About these practice questions

This Databricks-ML-Pro question is part of Courseiva's 300-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-ML-Pro practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-ML-Pro exam.