【问题标题】:How to delete Databricks feature tables through the Python API如何通过 Python API 删除 Databricks 特征表
【发布时间】:2022-12-21 01:06:15
【问题描述】:

该文档解释了如何delete feature tables through the UI

是否可以使用 Python 做同样的事情FeatureStoreClient?我在文档中找不到任何内容:https://docs.databricks.com/_static/documents/feature-store-python-api-reference-0-3-7.pdf

用例:我们使用临时开发环境进行开发,并且当环境被拆除时我们会自动删除资源。现在正在考虑使用feature store,但是不知道如何自动删除。

【问题讨论】:

    标签: python databricks feature-store


    【解决方案1】:

    您可以使用特征存储 Python API 删除特征表。
    它在这里描述: http://docs.databricks.com.s3-website-us-west-1.amazonaws.com/applications/machine-learning/feature-store/feature-tables.html#delete-a-feature-table

    使用 drop_table 删除一个特征表。当您使用 drop_table 删除表时,基础增量表也会被删除。

    fs.drop_table(
      name='recommender_system.customer_features'
    )
    

    【讨论】:

    • 请注意,这需要 DBR 10.5+
    【解决方案2】:

    上面的答案是正确的,但请注意,根据 Feature Store Client API 的数据块文档,drop_table() 函数是实验性的,因此可以随时将其删除。除此之外,fs 还参考了:

    from databricks.feature_store import FeatureStoreClient
    fs = FeatureStoreClient()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-18
      • 1970-01-01
      • 1970-01-01
      • 2013-07-12
      • 1970-01-01
      • 2020-11-29
      • 1970-01-01
      • 2019-06-24
      相关资源
      最近更新 更多