3

The documentation explains how to delete feature tables through the UI.

Is it possible to do the same using the Python FeatureStoreClient? I cannot find anything in the docs: https://docs.databricks.com/_static/documents/feature-store-python-api-reference-0-3-7.pdf

Use case: we use ephemeral dev environments for development and we have automated deletion of resources when the environment is torn down. Now we are considering using the feature store, but we don't know how to automate deletion.

burubum
  • 640
  • 1
  • 6
  • 18

2 Answers2

1

You can delete a feature table using the Feature Store Python API.
It is described here: http://docs.databricks.com.s3-website-us-west-1.amazonaws.com/applications/machine-learning/feature-store/feature-tables.html#delete-a-feature-table

Use drop_table to delete a feature table. When you delete a table with drop_table, the underlying Delta table is also dropped.

fs.drop_table(
  name='recommender_system.customer_features'
)
Vega
  • 27,856
  • 27
  • 95
  • 103
1

The answer above is correct, but note that the drop_table() function is experimental according to databricks documentation for the Feature Store Client API so it could be removed at any time. Besides that fs is also in reference to:

from databricks.feature_store import FeatureStoreClient
fs = FeatureStoreClient()

fs.drop_table(name='recommender_system.customer_features')
  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/33459819) – Thayne Dec 22 '22 at 08:16
  • I upvoted since it is relevant: however, It is not working for me - and on the precise table that you show in the example. The table is not apparently dropped – WestCoastProjects Jan 26 '23 at 00:37