feature_materialized
Creates, updates, deletes, gets or lists a feature_materialized resource.
Overview
| Name | feature_materialized |
| Type | Resource |
| Id | databricks_workspace.ml.feature_materialized |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
materialized_feature_id | string | Unique identifier for the materialized feature. |
feature_name | string | The full name of the feature in Unity Catalog. |
table_name | string | The fully qualified Unity Catalog path to the table containing the materialized feature (Delta table or Lakebase table). Output only. |
cron_schedule | string | The quartz cron expression that defines the schedule of the materialization pipeline. The schedule is evaluated in the UTC timezone. |
last_materialization_time | string | The timestamp when the pipeline last ran and updated the materialized feature values. If the pipeline has not run yet, this field will be null. |
offline_store_config | object | Configuration for offline store destination. |
online_store_config | object | Configuration for online store destination. |
pipeline_schedule_state | string | The schedule state of the materialization pipeline. (ACTIVE, PAUSED, SNAPSHOT) |
| Name | Datatype | Description |
|---|---|---|
materialized_feature_id | string | Unique identifier for the materialized feature. |
feature_name | string | The full name of the feature in Unity Catalog. |
table_name | string | The fully qualified Unity Catalog path to the table containing the materialized feature (Delta table or Lakebase table). Output only. |
cron_schedule | string | The quartz cron expression that defines the schedule of the materialization pipeline. The schedule is evaluated in the UTC timezone. |
last_materialization_time | string | The timestamp when the pipeline last ran and updated the materialized feature values. If the pipeline has not run yet, this field will be null. |
offline_store_config | object | Configuration for offline store destination. |
online_store_config | object | Configuration for online store destination. |
pipeline_schedule_state | string | The schedule state of the materialization pipeline. (ACTIVE, PAUSED, SNAPSHOT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | materialized_feature_id, deployment_name | Get a materialized feature. | |
list | select | deployment_name | feature_name, page_size, page_token | List materialized features. |
create | insert | deployment_name, materialized_feature | Create a materialized feature. | |
update | update | materialized_feature_id, update_mask, deployment_name, materialized_feature | Update a materialized feature (pause/resume). | |
delete | delete | materialized_feature_id, deployment_name | Delete a materialized feature. | |
batch_create | exec | deployment_name, requests | Batch create materialized features. |
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) |
materialized_feature_id | string | The ID of the materialized feature to delete. |
update_mask | string | Provide the materialization feature fields which should be updated. Currently, only the pipeline_state field can be updated. |
feature_name | string | Filter by feature name. If specified, only materialized features materialized from this feature will be returned. |
page_size | integer | The maximum number of results to return. Defaults to 100 if not specified. Cannot be greater than 1000. |
page_token | string | Pagination token to go to the next page based on a previous query. |
SELECT examples
- get
- list
Get a materialized feature.
SELECT
materialized_feature_id,
feature_name,
table_name,
cron_schedule,
last_materialization_time,
offline_store_config,
online_store_config,
pipeline_schedule_state
FROM databricks_workspace.ml.feature_materialized
WHERE materialized_feature_id = '{{ materialized_feature_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
List materialized features.
SELECT
materialized_feature_id,
feature_name,
table_name,
cron_schedule,
last_materialization_time,
offline_store_config,
online_store_config,
pipeline_schedule_state
FROM databricks_workspace.ml.feature_materialized
WHERE deployment_name = '{{ deployment_name }}' -- required
AND feature_name = '{{ feature_name }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Create a materialized feature.
INSERT INTO databricks_workspace.ml.feature_materialized (
materialized_feature,
deployment_name
)
SELECT
'{{ materialized_feature }}' /* required */,
'{{ deployment_name }}'
RETURNING
materialized_feature_id,
feature_name,
table_name,
cron_schedule,
last_materialization_time,
offline_store_config,
online_store_config,
pipeline_schedule_state
;
# Description fields are for documentation purposes
- name: feature_materialized
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the feature_materialized resource.
- name: materialized_feature
description: |
The materialized feature to create.
value:
feature_name: "{{ feature_name }}"
cron_schedule: "{{ cron_schedule }}"
last_materialization_time: "{{ last_materialization_time }}"
materialized_feature_id: "{{ materialized_feature_id }}"
offline_store_config:
catalog_name: "{{ catalog_name }}"
schema_name: "{{ schema_name }}"
table_name_prefix: "{{ table_name_prefix }}"
online_store_config:
catalog_name: "{{ catalog_name }}"
schema_name: "{{ schema_name }}"
table_name_prefix: "{{ table_name_prefix }}"
online_store_name: "{{ online_store_name }}"
pipeline_schedule_state: "{{ pipeline_schedule_state }}"
table_name: "{{ table_name }}"
UPDATE examples
- update
Update a materialized feature (pause/resume).
UPDATE databricks_workspace.ml.feature_materialized
SET
materialized_feature = '{{ materialized_feature }}'
WHERE
materialized_feature_id = '{{ materialized_feature_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND materialized_feature = '{{ materialized_feature }}' --required
RETURNING
materialized_feature_id,
feature_name,
table_name,
cron_schedule,
last_materialization_time,
offline_store_config,
online_store_config,
pipeline_schedule_state;
DELETE examples
- delete
Delete a materialized feature.
DELETE FROM databricks_workspace.ml.feature_materialized
WHERE materialized_feature_id = '{{ materialized_feature_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;
Lifecycle Methods
- batch_create
Batch create materialized features.
EXEC databricks_workspace.ml.feature_materialized.batch_create
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"requests": "{{ requests }}"
}'
;