Intermediate

Tecton - Enterprise Feature Platform

Explore Tecton's managed feature platform for real-time features, stream processing, automated monitoring, and enterprise-grade collaboration.

What is Tecton?

Tecton is a managed feature platform founded by the creators of Uber's Michelangelo. It handles the infrastructure complexity of real-time feature engineering, letting teams focus on defining feature logic rather than managing streaming pipelines and online stores.

Defining Features in Tecton

Python - Batch Feature View
from tecton import Entity, BatchSource, FileConfig, batch_feature_view
from datetime import timedelta

# Define entity
user = Entity(name="user", join_keys=["user_id"])

# Define data source
user_transactions = BatchSource(
    name="user_transactions",
    batch_config=FileConfig(
        uri="s3://data/transactions/",
        file_format="parquet",
        timestamp_field="timestamp"
    )
)

# Define batch feature view
@batch_feature_view(
    sources=[user_transactions],
    entities=[user],
    mode="spark_sql",
    batch_schedule=timedelta(days=1),
    ttl=timedelta(days=30),
    online=True,
    offline=True,
    description="User spending features computed daily"
)
def user_spending_features(transactions):
    return f"""
        SELECT
            user_id,
            SUM(amount) AS total_spend_30d,
            COUNT(*) AS tx_count_30d,
            AVG(amount) AS avg_tx_amount,
            MAX(timestamp) AS timestamp
        FROM {transactions}
        WHERE timestamp > current_timestamp() - INTERVAL 30 DAYS
        GROUP BY user_id
    """

Real-time Stream Features

Python - Stream Feature View
from tecton import StreamSource, KinesisConfig, stream_feature_view
from tecton.aggregation_functions import last_distinct_n

# Stream source from Kinesis (or Kafka)
transaction_stream = StreamSource(
    name="transaction_stream",
    stream_config=KinesisConfig(
        stream_name="transactions",
        region="us-east-1",
        timestamp_field="timestamp"
    )
)

@stream_feature_view(
    sources=[transaction_stream],
    entities=[user],
    mode="spark_sql",
    aggregation_interval=timedelta(minutes=5),
    aggregations=[
        Aggregation(column="amount", function="sum", time_window=timedelta(hours=1)),
        Aggregation(column="amount", function="mean", time_window=timedelta(hours=1)),
        Aggregation(column="amount", function="count", time_window=timedelta(minutes=15)),
    ],
    online=True,
    description="Real-time transaction features updated every 5 minutes"
)
def realtime_tx_features(transactions):
    return f"SELECT user_id, amount, timestamp FROM {transactions}"

Feature Retrieval

Python - Getting Features from Tecton
import tecton

# Online serving (real-time)
fs = tecton.get_feature_service("fraud_detection_features")
features = fs.get_online_features(join_keys={"user_id": "u123"})
print(features.to_dict())

# Offline training (historical)
training_data = fs.get_historical_features(
    spine=entity_df,        # Entities with timestamps
    timestamp_key="event_timestamp"
).to_pandas()

Feast vs Tecton

AspectFeastTecton
HostingSelf-managedFully managed SaaS
Real-time featuresBasic (push-based)Advanced (stream processing built-in)
MonitoringDIYBuilt-in data quality and drift monitoring
CostFree (infra costs only)SaaS pricing + infra
Feature computationExternal (you manage)Built-in (Spark/Flink managed)
Best forSmall-medium teams, batch featuresEnterprise, complex real-time features
When to choose Tecton: Choose Tecton when you need complex real-time streaming features (windowed aggregations, joins across streams) and don't want to manage the streaming infrastructure. Choose Feast when you want full control, have mostly batch features, or are budget-constrained.

Ready to Go Deeper?

Live instructor-led courses from our partners. Affiliate disclosure.