Skip to main content

feature_materialized

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

Overview

Namefeature_materialized
TypeResource
Iddatabricks_workspace.ml.feature_materialized

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
materialized_feature_idstringUnique identifier for the materialized feature.
feature_namestringThe full name of the feature in Unity Catalog.
table_namestringThe fully qualified Unity Catalog path to the table containing the materialized feature (Delta table or Lakebase table). Output only.
cron_schedulestringThe quartz cron expression that defines the schedule of the materialization pipeline. The schedule is evaluated in the UTC timezone.
last_materialization_timestringThe 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_configobjectConfiguration for offline store destination.
online_store_configobjectConfiguration for online store destination.
pipeline_schedule_statestringThe schedule state of the materialization pipeline. (ACTIVE, PAUSED, SNAPSHOT)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectmaterialized_feature_id, deployment_nameGet a materialized feature.
listselectdeployment_namefeature_name, page_size, page_tokenList materialized features.
createinsertdeployment_name, materialized_featureCreate a materialized feature.
updateupdatematerialized_feature_id, update_mask, deployment_name, materialized_featureUpdate a materialized feature (pause/resume).
deletedeletematerialized_feature_id, deployment_nameDelete a materialized feature.
batch_createexecdeployment_name, requestsBatch 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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
materialized_feature_idstringThe ID of the materialized feature to delete.
update_maskstringProvide the materialization feature fields which should be updated. Currently, only the pipeline_state field can be updated.
feature_namestringFilter by feature name. If specified, only materialized features materialized from this feature will be returned.
page_sizeintegerThe maximum number of results to return. Defaults to 100 if not specified. Cannot be greater than 1000.
page_tokenstringPagination token to go to the next page based on a previous query.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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 materialized features.

EXEC databricks_workspace.ml.feature_materialized.batch_create 
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"requests": "{{ requests }}"
}'
;