Exam Certified Machine Learning Professional All QuestionsBrowse all questions from this 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?

    Correct Answer: A

    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
BokNinjaOption: A

A is correct

Joy999Option: A

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

victorcolomeOption: A

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.