Skip to content

Feature Tables

A FeatureTable allow you to ingest features into Tecton that you've already transformed outside of Tecton (say in your data lake or data warehouse). In contrast to FeatureViews, you are responsible for transforming raw data into feature values and ingesting those feature values into Tecton via its API.

Feature Table Beta

Support for Feature Tables is currently in beta. Known limitations:

  • May fail when processing a large number of feature values, such as more than one million rows.
  • No way to view ingestion job status.

Use a FeatureTable if:

  • you already have feature data pipelines running outside of Tecton and you want to make those feature values available for consistent offline and online consumption
  • you need to run a feature transformation that's not supported by Tecton's FeatureViews. A FeatureTable provides you with a flexible escape hatch to bring arbitrary features into Tecton

Common Examples:

  • You manage a pipeline outside of Tecton that generates user embeddings and you want to make those available for online and/or offline serving
  • You're just getting started with Tecton and already run Airflow pipelines that produce batch features. Now you want to bring them to Tecton for online and/or offline serving

Within a single FeatureService, you can include a FeatureTable alongside a FeatureView. This capability provides an easy way for you to use Tecton to develop new features, while continuing to leverage your existing feature pipelines.

Feature Definition Example

For more examples see Examples here.

Ingest Data into the Feature Table

Once theĀ FeatureTableĀ has been added to your feature repository, you can use the Tecton python SDK to push feature data into Tecton.

To do so, you'll simply pass a Spark or Pandas dataframe to theĀ FeatureTable.ingest()Ā method within your Spark environment. This dataframe must contain all the columns that were declared in the schema.

Use your Databricks or EMR notebook to ingest a simple dataframe to theĀ FeatureTableĀ defined above.

import pandas
import tecton
from datetime import datetime, timedelta
df = pandas.DataFrame([{"user_id": "user_1",
                        "timestamp": pandas.Timestamp(,
                        "user_login_count_7d": 15,
                        "user_login_count_30d": 35}])

ft = tecton.get_feature_table("user_login_counts")

Usage Example

See a full example on how to use an Feature Table in this notebook here.

Please reach out to Tecton support if you need to push feature values to Tecton using a REST API.

How they work

Behind the scenes, Tecton ingests your dataframe directly into the Online and Offline Store. If you submit duplicate features for the same join_keys and timestamps, the last write will win.