artsheiko
Databricks Employee
Databricks Employee

you can use the feature tables API to update your table in a "overwrite" the existing one :

fs.write_table(
  name='recommender_system.customer_features',
  df = customer_features_df,
  mode = 'overwrite'
)

If this don't work for your use-case, each feature store table is represented by a traditional Delta Table under the hood. So, you can do the next :

df.write.option("mergeSchema", "true")
.format("delta")
.mode(mode="overwrite")
.saveAsTable(delta_table_name)

Finally, you can register an existing Delta table as a feature table :

fs.register_table(
  delta_table='recommender.customer_features',
  primary_keys='customer_id',
  description='Customer features'
)

View solution in original post