feature_engineering
Creates, updates, deletes, gets or lists a feature_engineering resource.
Overview
| Name | feature_engineering |
| Type | Resource |
| Id | databricks_workspace.ml.feature_engineering |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
full_name | string | |
description | string | The description of the feature. |
filter_condition | string | The filter condition applied to the source data before aggregation. |
function | object | The function by which the feature is computed. |
inputs | array | The input columns from which the feature is computed. |
lineage_context | object | 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. |
source | object | The data source of the feature. |
time_window | object | The time window in which the feature is computed. |
| Name | Datatype | Description |
|---|---|---|
full_name | string | |
description | string | The description of the feature. |
filter_condition | string | The filter condition applied to the source data before aggregation. |
function | object | The function by which the feature is computed. |
inputs | array | The input columns from which the feature is computed. |
lineage_context | object | 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. |
source | object | The data source of the feature. |
time_window | object | The time window in which the feature is computed. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | full_name, deployment_name | Get a Feature. | |
list | select | deployment_name | page_size, page_token | List Features. |
create | insert | deployment_name, feature | Create a Feature. | |
update | update | full_name, update_mask, deployment_name, feature | Update a Feature. | |
delete | delete | full_name, deployment_name | Delete 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
full_name | string | Name of the feature to delete. |
update_mask | string | The list of fields to update. |
page_size | integer | The maximum number of results to return. |
page_token | string | Pagination token to go to the next page based on a previous query. |
SELECT examples
- get
- list
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
;
List Features.
SELECT
full_name,
description,
filter_condition,
function,
inputs,
lineage_context,
source,
time_window
FROM databricks_workspace.ml.feature_engineering
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: feature_engineering
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the feature_engineering resource.
- name: feature
description: |
Feature to create.
value:
full_name: "{{ full_name }}"
source:
delta_table_source:
full_name: "{{ full_name }}"
entity_columns:
- "{{ entity_columns }}"
timeseries_column: "{{ timeseries_column }}"
kafka_source:
name: "{{ name }}"
entity_column_identifiers:
- variant_expr_path: "{{ variant_expr_path }}"
timeseries_column_identifier:
variant_expr_path: "{{ variant_expr_path }}"
inputs:
- "{{ inputs }}"
function:
function_type: "{{ function_type }}"
extra_parameters:
- key: "{{ key }}"
value: "{{ value }}"
description: "{{ description }}"
filter_condition: "{{ filter_condition }}"
lineage_context:
job_context:
job_id: {{ job_id }}
job_run_id: {{ job_run_id }}
notebook_id: {{ notebook_id }}
time_window:
continuous:
window_duration: "{{ window_duration }}"
offset: "{{ offset }}"
sliding:
window_duration: "{{ window_duration }}"
slide_duration: "{{ slide_duration }}"
tumbling:
window_duration: "{{ window_duration }}"
UPDATE examples
- update
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
Delete a Feature.
DELETE FROM databricks_workspace.ml.feature_engineering
WHERE full_name = '{{ full_name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;