Databricks Machine Learning Associate Question 432
Select 4You have trained a machine learning model and would like to store its features in a Databricks Feature Store table for reuse in other pipelines. Which of the following steps are required to write data to a Feature Store table in Databricks?
- A
Create a FeatureStoreClient instance to interact with the feature store.
- B
Ensure the feature data is stored as a DataFrame before writing to the feature store.
- C
Use the
write_tablemethod of the FeatureStoreClient to write the DataFrame to the feature store. - D
Manually create a Delta table before writing features to the feature store.
- E
Specify a unique primary key and timestamp column when writing to the feature store table.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
To write data to a Databricks Feature Store table, you need to use the FeatureStoreClient class, prepare your data as a Spark DataFrame, and use the write_table method. Additionally, you must define a unique primary key and timestamp column for the feature store table. Manually creating Delta tables is unnecessary as the feature store manages table creation internally.
- A. Correct.
Correct: You need to create a FeatureStoreClient instance to interact with the Databricks Feature Store.
- B. Correct.
Correct: The feature data must be in the form of a Spark DataFrame before it can be written to the feature store.
- C. Correct.
Correct: The
write_tablemethod of the FeatureStoreClient is used to write the features to the feature store table. - D. Incorrect.
Incorrect: The feature store automatically handles table creation, so you do not need to manually create a Delta table.
- E. Correct.
Correct: A unique primary key and timestamp column are required when writing features to a feature store table to ensure data consistency and versioning.