feature_store
Creates, updates, deletes, gets or lists a feature_store resource.
Overview
| Name | feature_store |
| Type | Resource |
| Id | databricks_workspace.ml.feature_store |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the online store. This is the unique identifier for the online store. |
usage_policy_id | string | The usage policy applied to the online store to track billing. |
capacity | string | The capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8". |
creation_time | string | The timestamp when the online store was created. |
creator | string | The email of the creator of the online store. |
read_replica_count | integer | The number of read replicas for the online store. Defaults to 0. |
state | string | The current state of the online store. (AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the online store. This is the unique identifier for the online store. |
usage_policy_id | string | The usage policy applied to the online store to track billing. |
capacity | string | The capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8". |
creation_time | string | The timestamp when the online store was created. |
creator | string | The email of the creator of the online store. |
read_replica_count | integer | The number of read replicas for the online store. Defaults to 0. |
state | string | The current state of the online store. (AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, deployment_name | Get an Online Feature Store. | |
list | select | deployment_name | page_size, page_token | List Online Feature Stores. |
publish_table | insert | source_table_name, deployment_name, publish_spec | Publish features. | |
create | insert | deployment_name, online_store | Create an Online Feature Store. | |
update | update | name, update_mask, deployment_name, online_store | Update an Online Feature Store. | |
delete | delete | name, deployment_name | Delete an Online Feature Store. | |
delete_table | delete | online_table_name, deployment_name | Delete 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
name | string | Name of the online store to delete. |
online_table_name | string | The full three-part (catalog, schema, table) name of the online table. |
source_table_name | string | The full three-part (catalog, schema, table) name of the source table. |
update_mask | string | The list of fields to update. |
page_size | integer | The maximum number of results to return. Defaults to 100 if not specified. |
page_token | string | Pagination token to go to the next page based on a previous query. |
SELECT examples
- get
- list
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
;
List Online Feature Stores.
SELECT
name,
usage_policy_id,
capacity,
creation_time,
creator,
read_replica_count,
state
FROM databricks_workspace.ml.feature_store
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- publish_table
- create
- Manifest
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
;
Create an Online Feature Store.
INSERT INTO databricks_workspace.ml.feature_store (
online_store,
deployment_name
)
SELECT
'{{ online_store }}' /* required */,
'{{ deployment_name }}'
RETURNING
name,
usage_policy_id,
capacity,
creation_time,
creator,
read_replica_count,
state
;
# Description fields are for documentation purposes
- name: feature_store
props:
- name: source_table_name
value: "{{ source_table_name }}"
description: Required parameter for the feature_store resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the feature_store resource.
- name: publish_spec
description: |
The specification for publishing the online table from the source table.
value:
online_store: "{{ online_store }}"
online_table_name: "{{ online_table_name }}"
publish_mode: "{{ publish_mode }}"
- name: online_store
description: |
Online store to create.
value:
name: "{{ name }}"
capacity: "{{ capacity }}"
creation_time: "{{ creation_time }}"
creator: "{{ creator }}"
read_replica_count: {{ read_replica_count }}
state: "{{ state }}"
usage_policy_id: "{{ usage_policy_id }}"
UPDATE examples
- update
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
- delete_table
Delete an Online Feature Store.
DELETE FROM databricks_workspace.ml.feature_store
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;
Delete online table.
DELETE FROM databricks_workspace.ml.feature_store
WHERE online_table_name = '{{ online_table_name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;