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
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
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
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
| Aspect | Feast | Tecton |
|---|---|---|
| Hosting | Self-managed | Fully managed SaaS |
| Real-time features | Basic (push-based) | Advanced (stream processing built-in) |
| Monitoring | DIY | Built-in data quality and drift monitoring |
| Cost | Free (infra costs only) | SaaS pricing + infra |
| Feature computation | External (you manage) | Built-in (Spark/Flink managed) |
| Best for | Small-medium teams, batch features | Enterprise, complex real-time features |
Ready to Go Deeper?
Live instructor-led courses from our partners. Affiliate disclosure.
AI & ML Courses - 30% Off
Live instructor-led AI, machine learning, data science, and cloud courses for working professionals. Use code Limited30 at checkout.
EdurekaDataCamp - AI & Data Science
Hands-on Python, machine learning, and AI courses with interactive exercises and real projects.
DataCampedX - Top AI Courses
University-level AI courses from MIT, Harvard, Stanford. Earn certificates that employers recognize.
edX