feast icon indicating copy to clipboard operation
feast copied to clipboard

feat: Implement Databricks Unity Catalog offline store integration

Open falloficaruss opened this issue 5 months ago • 1 comments

What this PR does / why we need it:

  • Implemented DatabricksUCOfflineStoreConfig (inheriting from SparkOfflineStoreConfig) to specify workspace, token, cluster_id, default_catalog, and default_schema.
  • Implemented get_databricks_session helper that securely handles active sessions or connects remotely using Databricks Connect V2 configurations.
  • Implemented DatabricksUCOfflineStore which inherits from SparkOfflineStore, overriding operations to guarantee Databricks session initialization before executing queries.
  • Registered "databricks_uc" in the first-class OFFLINE_STORE_CLASS_FOR_TYPE mapping.

Which issue(s) this PR fixes:

Partially Fixes - #6499

Checks

  • [x] I've made sure the tests are passing.
  • [x] My commits are signed off (git commit -s)
  • [x] My PR title follows conventional commits format

Testing Strategy

  • [x] Unit tests
  • [ ] Integration tests
  • [x] Manual tests
  • [ ] Testing is not required for this change

falloficaruss avatar Jun 14 '26 10:06 falloficaruss

@codex review

franciscojavierarceo avatar Jun 16 '26 03:06 franciscojavierarceo

@falloficaruss Let's refactor this as:

  • Rename get_databricks_session helper and use it as the Spark session factory when SparkOfflineStore needs to connect to Databricks.
  • Move to DataSource: The UC connection config (workspace host, catalog, schema, token) should become part of a new UnityCatalogSource (or IcebergRestCatalogSource).
  • Enhance SparkOfflineStore: Teach SparkOfflineStore.get_historical_features() to handle IcebergRestCatalogSource - when it sees one, use the Databricks Connect session to query the UC table via Spark.
  • The DatabricksUCOfflineStore subclass and "databricks_uc" type registration not needed if SparkOfflineStore itself handles the new DataSource.

ntkathole avatar Jun 29 '26 14:06 ntkathole

@ntkathole review

falloficaruss avatar Jun 30 '26 09:06 falloficaruss