
Answer-first summary for fast verification
Answer: By adding `primary_keys` parameter inside `fs.create_table`. ```python fs.create_table( name=table_name, primary_keys=['column1', 'column2'], schema=airbnb_df.schema, description="All Errors are captured in this table" ) ```
The correct answer is to add the `primary_keys` parameter inside `fs.create_table`. This is because the `create_table` method requires the specification of primary keys to uniquely identify records in the table. The provided code snippet lacks this essential parameter, leading to the error.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
After instantiating FeatureStoreClient as fs, the following code snippet results in an error. What is the correct way to fix this code?
fs.create_table(
name=table_name,
schema=airbnb_df.schema,
description="All Errors are captured in this table"
)
fs.create_table(
name=table_name,
schema=airbnb_df.schema,
description="All Errors are captured in this table"
)
A
By changing fs.create_table to fs.write_table.
B
By adding the df parameter inside fs.create_table.
fs.create_table(
name=table_name,
df=airbnb_df,
schema=airbnb_df.schema,
description="All Errors are captured in this table"
)
fs.create_table(
name=table_name,
df=airbnb_df,
schema=airbnb_df.schema,
description="All Errors are captured in this table"
)
C
By changing fs.create_table to fs.createtable.
D
By adding primary_keys parameter inside fs.create_table.
fs.create_table(
name=table_name,
primary_keys=['column1', 'column2'],
schema=airbnb_df.schema,
description="All Errors are captured in this table"
)
fs.create_table(
name=table_name,
primary_keys=['column1', 'column2'],
schema=airbnb_df.schema,
description="All Errors are captured in this table"
)
No comments yet.