Certified Machine Learning Professional Exam QuestionsBrowse all questions from this exam

Certified Machine Learning Professional Exam - Question 29


A data scientist has created a Python function compute_features that returns a Spark DataFrame with the following schema:

The resulting DataFrame is assigned to the features_df variable. The data scientist wants to create a Feature Store table using features_df.

Which of the following code blocks can they use to create and populate the Feature Store table using the Feature Store Client fs?

Show Answer
Correct Answer: AD

To create and populate a Feature Store table using the Feature Store Client fs in Databricks, you can use the create_table method which requires setting the table name, primary keys, and the dataframe. The code provided in option A aligns with the Databricks documentation for creating a Feature Store table and includes specifying the primary keys and the dataframe. This correctly follows the necessary process to create the table within the Feature Store.

Discussion

3 comments
Sign in to comment
BokNinjaOption: A
Dec 19, 2023

A is correct

victorcolomeOption: A
Jan 19, 2024

A is correct according to documentation https://docs.databricks.com/en/machine-learning/feature-store/workspace-feature-store/feature-tables.html#create-a-feature-table-in-databricks-feature-store.

Joy999Option: A
Jun 26, 2024

create_table(name: str, primary_keys: Union[str, List[str]], df: Optional[pyspark.sql.dataframe.DataFrame] = None, *, timestamp_keys: Union[str, List[str], None] = None, partition_columns: Union[str, List[str], None] = None, schema: Optional[pyspark.sql.types.StructType] = None, description: Optional[str] = None, tags: Optional[Dict[str, str]] = None, **kwargs) → databricks.feature_store.entities.feature_table.FeatureTable Right Answer A