QuestionQ25

VerifiedDatabricks Machine Learning

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

Question Image

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

Which of the following code blocks can be used to create and populate the Feature Store table with the Feature Store Client fs?

Explanation

FeatureStoreClient.create_table uses the df argument to insert feature data into the new feature table, while primary_keys="customer_id" declares the entity key. Supplying schema=features_df.schema is compatible with this call. A schema-only invocation creates table metadata without inserting the DataFrame’s rows. Databricks Feature Store basic example

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!