Skip to main content

feature_engineering

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

Overview

Namefeature_engineering
TypeResource
Iddatabricks_workspace.ml.feature_engineering

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
full_namestring
descriptionstringThe description of the feature.
filter_conditionstringThe filter condition applied to the source data before aggregation.
functionobjectThe function by which the feature is computed.
inputsarrayThe input columns from which the feature is computed.
lineage_contextobjectWARNING: This field is primarily intended for internal use by Databricks systems and is automatically populated when features are created through Databricks notebooks or jobs. Users should not manually set this field as incorrect values may lead to inaccurate lineage tracking or unexpected behavior. This field will be set by feature-engineering client and should be left unset by SDK and terraform users.
sourceobjectThe data source of the feature.
time_windowobjectThe time window in which the feature is computed.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfull_name, deployment_nameGet a Feature.
listselectdeployment_namepage_size, page_tokenList Features.
createinsertdeployment_name, featureCreate a Feature.
updateupdatefull_name, update_mask, deployment_name, featureUpdate a Feature.
deletedeletefull_name, deployment_nameDelete a Feature.

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)
full_namestringName of the feature to delete.
update_maskstringThe list of fields to update.
page_sizeintegerThe maximum number of results to return.
page_tokenstringPagination token to go to the next page based on a previous query.

SELECT examples

Get a Feature.

SELECT
full_name,
description,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window
FROM databricks_workspace.ml.feature_engineering
WHERE full_name = '{{ full_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;

INSERT examples

Create a Feature.

INSERT INTO databricks_workspace.ml.feature_engineering (
feature,
deployment_name
)
SELECT
'{{ feature }}' /* required */,
'{{ deployment_name }}'
RETURNING
full_name,
description,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window
;

UPDATE examples

Update a Feature.

UPDATE databricks_workspace.ml.feature_engineering
SET
feature = '{{ feature }}'
WHERE
full_name = '{{ full_name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND feature = '{{ feature }}' --required
RETURNING
full_name,
description,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window;

DELETE examples

Delete a Feature.

DELETE FROM databricks_workspace.ml.feature_engineering
WHERE full_name = '{{ full_name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;