Use cases

ML in SQL: real-time fraud detection

ML in SQL means calling a trained model as a SQL function, next to the data. In Otterstax Enterprise, you put an ONNX model in S3, register it through SQL and call it in any query — for example, to score each transaction from Kafka for fraud in real time.

ENTERPRISE
Situation
A trading company detected fraud about 2 hours after it happened.
With Otterstax
Transactions stream in from Kafka, and an ONNX model scores each one as a SQL function.
ONNX model as a SQL function · Enterprise
SELECT tx_id, fraud_score(tx.*) AS risk
FROM kafka.transactions tx
WHERE fraud_score(tx.*) > 0.9;
Result
−36.8%
fraud
Read the customer story →
For engineering leaders

Less infrastructure. Faster delivery. No lock-in.

From heavy to light infrastructure

AI workloads multiply data volume. With Otterstax you don’t need a central warehouse or data copies, and you run fewer pipelines and pay for fewer licenses.

30–50%

faster time-to-production for ML features

payments company
Fewer Kafka and database instancesafter replacing multi-step pipelinespayments company
Enterprise capabilities

Enterprise capabilities

ENTERPRISE

ML models as SQL functions

Put an ONNX model with its weights in S3, register it through SQL and call it like any function. New models go live without a restart and run on CPU or GPU nodes. Training stays outside.

ENTERPRISE

GPU acceleration

Up to 10× faster aggregations, sorts and ML inference on 100M–1B rows (NVIDIA H100 / H200 vs CPU).

10×
ENTERPRISE

CDC with guarantees

Change data capture and dual writes with delivery guarantees, running in a cluster. Open source has CDC without guarantees.

ML models as SQL functions (ONNX) — Otterstax: ✓ (Enterprise) · Trino: — · Spice.ai: AI via LLM gateway. See all comparisons →

Guide

SQL on Kafka, five ways

ksqlDB, Flink SQL, the ClickHouse Kafka engine, the Trino Kafka connector and Otterstax, with code and a stream-to-table JOIN for each.

FAQ

Frequently asked questions

All questions →

How do ML models run in SQL?

In Enterprise, you put an ONNX model with its weights in S3, register it through SQL and call it as a SQL function. New models go live without a restart and run on Otterstax CPU or GPU nodes. Only inference runs inside Otterstax. Training happens elsewhere, and the model must fit in a node's memory. Any external feature store can read from Otterstax over SQL.

Can it handle transactional and analytical load together?

Yes. Otterstax sends transactions to row-store databases and analytics to column stores such as ClickHouse or ColumnStore, or runs heavy analytics itself on its columnar engine and GPUs. Query priorities and queues, resource limits, replicas and separate cluster nodes keep analytics from slowing down transactions. It works poorly for transactions that span several databases, analytics on an OLTP database with no replicas, and large JOINs over a slow network.

See Otterstax on your own data sources

In a 30-minute call we'll map your stack and show a working query across your data sources.