Skip to main content

feature_store

Creates, updates, deletes, gets or lists a feature_store resource.

Overview

Namefeature_store
TypeResource
Iddatabricks_workspace.ml.feature_store

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the online store. This is the unique identifier for the online store.
usage_policy_idstringThe usage policy applied to the online store to track billing.
capacitystringThe capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8".
creation_timestringThe timestamp when the online store was created.
creatorstringThe email of the creator of the online store.
read_replica_countintegerThe number of read replicas for the online store. Defaults to 0.
statestringThe current state of the online store. (AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectname, deployment_nameGet an Online Feature Store.
listselectdeployment_namepage_size, page_tokenList Online Feature Stores.
publish_tableinsertsource_table_name, deployment_name, publish_specPublish features.
createinsertdeployment_name, online_storeCreate an Online Feature Store.
updateupdatename, update_mask, deployment_name, online_storeUpdate an Online Feature Store.
deletedeletename, deployment_nameDelete an Online Feature Store.
delete_tabledeleteonline_table_name, deployment_nameDelete online table.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
namestringName of the online store to delete.
online_table_namestringThe full three-part (catalog, schema, table) name of the online table.
source_table_namestringThe full three-part (catalog, schema, table) name of the source table.
update_maskstringThe list of fields to update.
page_sizeintegerThe maximum number of results to return. Defaults to 100 if not specified.
page_tokenstringPagination token to go to the next page based on a previous query.

SELECT examples

Get an Online Feature Store.

SELECT
name,
usage_policy_id,
capacity,
creation_time,
creator,
read_replica_count,
state
FROM databricks_workspace.ml.feature_store
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;

INSERT examples

Publish features.

INSERT INTO databricks_workspace.ml.feature_store (
publish_spec,
source_table_name,
deployment_name
)
SELECT
'{{ publish_spec }}' /* required */,
'{{ source_table_name }}',
'{{ deployment_name }}'
RETURNING
pipeline_id,
online_table_name
;

UPDATE examples

Update an Online Feature Store.

UPDATE databricks_workspace.ml.feature_store
SET
online_store = '{{ online_store }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND online_store = '{{ online_store }}' --required
RETURNING
name,
usage_policy_id,
capacity,
creation_time,
creator,
read_replica_count,
state;

DELETE examples

Delete an Online Feature Store.

DELETE FROM databricks_workspace.ml.feature_store
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;