Feature Table

Classes

class databricks.ml_features.entities.feature_table.FeatureTable(name, table_id, description, primary_keys, partition_columns, features, creation_timestamp=None, online_stores=None, notebook_producers=None, job_producers=None, table_data_sources=None, path_data_sources=None, custom_data_sources=None, timestamp_keys=None, tags=None)

Note

Aliases:databricks.feature_engineering.entities.feature_table.FeatureTable, databricks.feature_store.entities.feature_table.FeatureTable

Value class describing one feature table.

This will typically not be instantiated directly, instead the create_table() will create FeatureTable objects.

Time Windows

class databricks.ml_features.entities.time_window.TimeWindow(*, duration: timedelta, delay: Optional[timedelta] = None, _start_inclusive: bool = True, _end_inclusive: bool = False)

Bases: _FeatureStoreObject

Abstract base class for aggregation time windows.

Cannot be instantiated directly. Use one of the concrete subclasses: RollingWindow, TumblingWindow, or SlidingWindow.

Parameters
  • duration – The length of the time window. This defines how far back in time the window spans from the requested time. This must be positive. The interval defined by this window includes the start (earlier in time) endpoint, but not the end (later in time) endpoint. That is, the interval is [ts - duration, ts).

  • delay – Optional delay to shift the end of the window backwards from the requested time. This must be non-negative if provided. Defaults to 0.

__init__(*, duration: timedelta, delay: Optional[timedelta] = None, _start_inclusive: bool = True, _end_inclusive: bool = False)

Initialize a TimeWindow object. See class documentation.

property duration: timedelta

The length of the time window.

property delay: timedelta

The delay shifting the end of the window backwards (non-negative).

class databricks.ml_features.entities.time_window.TumblingWindow(*, window_duration: timedelta)

Bases: TimeWindow

Tumbling windows partition a continuous stream of data into non-overlapping, fixed-duration windows. Each event belongs to exactly one window.

Example: 5-day tumbling creates windows [Day1-5], [Day6-10], [Day11-15]

Parameters

window_duration – The length of each time window. This must be positive.

__init__(*, window_duration: timedelta)

Initialize a TumblingWindow object. See class documentation.

class databricks.ml_features.entities.time_window.SlidingWindow(*, window_duration: timedelta, slide_duration: timedelta)

Bases: TimeWindow

Sliding windows create overlapping, fixed-duration windows that advance by a specified slide interval. Data points can belong to multiple windows.

Example: 5-day window, 1-day slide creates overlapping 5-day periods: [Day1-5], [Day2-6], [Day3-7], etc.

Parameters
  • window_duration – The length of each time window. This must be positive.

  • slide_duration – The interval by which windows advance. This must be positive and less than window_duration.

__init__(*, window_duration: timedelta, slide_duration: timedelta)

Initialize a SlidingWindow object. See class documentation.

property slide_duration: timedelta

The interval by which windows advance.