Databricks Machine Learning Associate Question 433
Select 3You are working on a machine learning project in Databricks and have a preprocessed DataFrame containing features you want to store in the Databricks Feature Store. Which of the following steps are required to write data to a feature store table?
- A
Initialize a FeatureStoreClient instance to interact with the feature store.
- B
Ensure the DataFrame includes a unique primary key column for each record.
- C
Use the
write_tablemethod of the FeatureStoreClient to save the DataFrame. - D
Register the feature store table in a Delta Lake database before writing data.
- E
Convert the DataFrame to a Spark SQL table before writing to the feature store.
Show answer and explanation
Correct answers: A, B, C
Explanation
To write data to a Databricks Feature Store table, you must use the FeatureStoreClient, which provides the necessary methods for interacting with the feature store. The DataFrame should contain a unique primary key column to identify records, and the write_table method is used to save the data. Additional steps like manual Delta Lake registration or converting to a Spark SQL table are not required.
- A. Correct.
Correct. Initializing a FeatureStoreClient instance is required to interact with the Databricks Feature Store API.
- B. Correct.
Correct. A unique primary key column is essential to identify individual feature records in the feature store.
- C. Correct.
Correct. The
write_tablemethod of the FeatureStoreClient is used to write the DataFrame to a feature store table. - D. Incorrect.
Incorrect. While the feature store table is stored in Delta format, you do not need to register it in a Delta Lake database manually before writing data; this is handled automatically by the Feature Store.
- E. Incorrect.
Incorrect. There is no need to convert the DataFrame to a Spark SQL table before writing it to the feature store. The FeatureStoreClient can directly accept a DataFrame.