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?
A)

B)

C)
features_df.write.mode("fs").path("new_table")
D)

Suggested Answer: D
Get Premium Databricks Machine Learning Professional Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
33 comments · newest first
LO
Loreta
1 year ago
Not sure about Option E, that "feature" mode seems weird.
LO
Lonny
1 year ago
Definitely leaning towards Option D, it seems right.
KR
Kristine
1 year ago
Wait, can you really use "fs" in Option C? Sounds off.
RE
Reta
1 year ago
I think Option B is the way to go!
RA
Raelene
1 year ago
Option A looks solid for creating the Feature Store table.
RE
Reynalda
1 year ago
I vaguely remember that we should use a specific method for the Feature Store, but I can't remember if it's in option D or E.
LE
Levi
1 year ago
Option C seems off to me; I don't think "fs" is a valid mode for writing to a Feature Store.
SY
Sylvia
1 year ago
I think options A and B look similar to the examples we practiced, but I can't recall the exact syntax for creating a Feature Store table.
HU
Huey
1 year ago
I remember we discussed how to use the Feature Store Client, but I'm not sure which option correctly uses it here.
MI
Mitsue
1 year ago
This seems straightforward. I think Option B is the correct answer, as it uses the Feature Store Client `fs` to create and write the table.
SH
Shantay
1 year ago
Okay, let's think this through step-by-step. The key is to use the Feature Store Client `fs` to create and populate the table. I'll need to compare the code blocks and see which one matches that requirement.
TH
Thurman
1 year ago
Hmm, I'm a bit unsure about the different options here. I'll need to carefully read through the code blocks and the question to make sure I understand the correct approach.
DI
Dick
1 year ago
This looks like a straightforward question about creating a Feature Store table from a Spark DataFrame. I think I can handle this one.
ST
Stephane
1 year ago
I'm feeling a bit confused by the different options. I'll need to review the Feature Store documentation to make sure I understand the correct syntax and approach for this task.
GU
Gussie
1 year ago
I'm pretty confident this is about using vMotion to migrate VMs without downtime, so I'll go with option A.
MY
Myong
2 years ago
Haha, Option E? 'features_df.write.mode(feature).path(new_table)'? Is that like, a special 'feature-flavored' write mode or something?
BE
Bette
2 years ago
Option A is the winner here. The `fs.write_table()` method is the way to go. Although, I have to say, the 'new_table' name is a bit uninspired. How about 'feature_extravaganza'?
KI
Kirk
2 years ago
Let's go with Option A and name the table 'feature_extravaganza' for some added flair.
RO
Rory
2 years ago
Yes, Option A with the 'feature_extravaganza' table name sounds like a great combination.
VA
Van
2 years ago
I think the 'feature_extravaganza' name suggestion is fun and creative!
VA
Valentine
2 years ago
I agree, Option A is the best choice for creating and populating the Feature Store table.
HY
Hyman
2 years ago
Option C? Really? 'features_df.write.mode(fs).path(new_table)'? That's not how you interact with the Feature Store, my dude.
AN
Annette
2 years ago
Hmm, I'd go with Option D. The `fs.create_feature_table()` method looks like it's specifically designed for this use case.
TY
Ty
2 years ago
I think Option D is the correct one as well. The `fs.create_feature_table()` method seems to be the way to go.
ED
Edna
2 years ago
I agree, Option D seems to be the most appropriate for creating and populating the Feature Store table.
SH
Shala
2 years ago
Option D looks good to me too. The `fs.create_feature_table()` method seems like the right choice.
AL
Alease
2 years ago
Hmm, that makes sense. Let's see what others think before making a final decision.
CA
Catrice
2 years ago
I disagree, I believe Option B is the right choice because it uses the Feature Store Client fs.
NY
Nydia
2 years ago
Option B seems the most straightforward way to create the Feature Store table. No need to overcomplicate things.
DE
Devora
2 years ago
Yeah, Option B seems like the most straightforward solution.
CH
Chan
2 years ago
I agree, Option B looks simple and effective.
CA
Carey
2 years ago
I think Option B is the best choice.
AL
Alease
2 years ago
I think Option A is the correct code block to create the Feature Store table.