Databricks Machine Learning Associate Question 83
Select 3You are working on a machine learning project in Databricks and have calculated a set of features that you want to store in a feature store table for future use. Which of the following steps are necessary to write data to a feature store table in Databricks?
- A
Create a FeatureStoreClient instance to access the feature store.
- B
Define a Spark DataFrame that contains the feature data to be written.
- C
Directly write the feature data to the feature store table using the
writemethod of the Spark DataFrame. - D
Specify the primary keys and feature table name when writing to the feature store table.
- E
Ensure that the feature store table schema is registered in the Databricks Feature Store before writing.
Show answer and explanation
Correct answers: A, B, D
Explanation
To write data to a feature store table in Databricks, you need to use the FeatureStoreClient for interacting with the feature store. A Spark DataFrame is required to hold the feature data, and you must specify the primary keys and table name during the write operation. The schema does not need to be pre-registered, and the DataFrame's write method is not used for this purpose.
- A. Correct.
Correct: A FeatureStoreClient instance is required to interact with the Databricks Feature Store API and perform operations like writing feature data.
- B. Correct.
Correct: A Spark DataFrame is used to represent the feature data that needs to be written to the feature store.
- C. Incorrect.
Incorrect: The Spark DataFrame
writemethod is not used for writing to the feature store. Instead, you use thewrite_tablemethod provided by the FeatureStoreClient. - D. Correct.
Correct: When writing data to the feature store, you must specify the primary key(s) and the feature table name so that the data can be properly organized and stored.
- E. Incorrect.
Incorrect: The schema is not required to be pre-registered in the feature store; it is inferred from the DataFrame during the write operation.