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.
entitiesarrayThe entity columns for the feature, used as aggregation keys and for query-time lookup.
filter_conditionstringDeprecated: Use DeltaTableSource.filter_condition or KafkaSource.filter_condition instead. Kept for backwards compatibility. The filter condition applied to the source data before aggregation.
functionobjectThe function by which the feature is computed.
inputsarrayDeprecated: Use AggregationFunction.inputs instead. Kept for backwards compatibility. The input columns from which the feature is computed.
lineage_contextobjectLineage context information for this feature. WARNING: 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_windowobjectDeprecated: Use Function.aggregation_function.time_window instead. Kept for backwards compatibility. The time window in which the feature is computed.
timeseries_columnobjectColumn recording time, used for point-in-time joins, backfills, and aggregations.

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,
entities,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window,
timeseries_column
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,
entities,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window,
timeseries_column
;

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,
entities,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window,
timeseries_column;

DELETE examples

Delete a Feature.

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