NashTech Blog

Processing Billions of Events for UBI with Delta Lake

Table of Contents

The auto insurance industry is undergoing a fundamental shift. Traditionally, insurers relied on static factors such as age, vehicle type, location, credit history, and claims experience to assess risk and determine premiums. While these factors remain important, they only provide a snapshot of a driver’s risk profile.

Modern telematics programs are changing that equation. Connected vehicles, mobile applications, onboard diagnostic devices, and IoT sensors continuously generate driving data that captures how policyholders actually drive. Speeding events, harsh braking patterns, rapid acceleration, mileage, cornering behavior, and time-of-day driving habits provide insurers with an unprecedented view of risk in near real time.

This has fueled the growth of Usage-Based Insurance (UBI), where premiums are influenced by actual driving behavior rather than solely by traditional underwriting criteria.

However, the scale of telematics data introduces significant engineering challenges. Any insurance provider with a million plus drivers covered by them, can easily generate billions of events every month. Storing, processing, and analyzing this data efficiently requires a platform capable of handling both streaming and historical analytics workloads.

This is where Delta Lake becomes a powerful foundation. In this article, we’ll explore how insurers can use Delta Lake to ingest, process, and analyze massive telematics datasets while enabling real-time driver scoring and underwriting insights.

What’s the Challenge?

A single driving session can generate hundreds (or even thousands) of events. For instance, consider a typical telematics stream:

Event TypeExample
GPS LocationLatitude, longitude
Speed EventCurrent speed exceeds threshold
Harsh BrakingDeceleration exceeds limit
Rapid AccelerationAggressive acceleration detected
Cornering EventSharp turn at high speed
Mileage ReadingTotal distance traveled
Device HealthSensor battery and connectivity

When multiplied across millions of active drivers, insurers quickly face challenges around:

  • Continuous data ingestion
  • Real-time analytics
  • Storage costs
  • Data quality management
  • Historical analysis for underwriting audits

Traditional data warehouses often struggle to support both streaming workloads and long-term analytical requirements without introducing significant complexity and cost.

Delta Lake to the Rescue

Delta Lake combines the scalability of a data lake with the reliability of a data warehouse. For telematics workloads, several capabilities stand out.

I. Streaming Ingestion at Scale

Telematics devices continuously produce data streams. Delta Lake integrates seamlessly with Apache Spark Structured Streaming, allowing insurers to ingest millions of records per minute while maintaining ACID transaction guarantees.

Benefits:

  • Continuous event processing
  • Exactly-once delivery semantics
  • Reliable checkpointing

As new driving events arrive, underwriting and risk systems can immediately consume updated insights without waiting for overnight batch jobs.

II. Incremental Processing

Driver scores do not need to be recalculated from scratch every time a new event arrives. Delta Lake supports incremental data processing, enabling applications to process only newly arrived records.

Advantages:

  • Faster computation
  • Lower infrastructure costs
  • Reduced operational complexity

Instead of scanning petabytes of historical telematics data, processing jobs only handle recent changes.

III. Cost-Efficient Storage

Telematics platforms frequently retain years of driving history for:

  • Risk modeling
  • Regulatory requirements
  • Fraud investigations
  • Claims analysis
  • Customer dispute resolution

Storing such massive datasets in traditional warehouse platforms can become prohibitively expensive. Delta Lake leverages low-cost cloud object storage while providing:

  • Efficient compression
  • Schema enforcement
  • Data versioning

Organizations gain warehouse-like reliability without warehouse-level storage costs.

Delta Lake Architecture for Telematics Analytics

A Medallion Architecture (i.e., Bronze -> Silver -> Gold) works particularly well for telematics environments.

Bronze Layer: Raw Driving Events

The Bronze layer captures incoming telematics feeds without transformation.

Schema

CREATE TABLE bronze.telematics_raw (
    event_id STRING,
    driver_id STRING,
    vehicle_id STRING,
    event_type STRING,
    speed DOUBLE,
    latitude DOUBLE,
    longitude DOUBLE,
    event_time TIMESTAMP
)
USING DELTA;
Event IDDriver IDVehicle IDEvent TypeSpeedLatitudeLongitudeEvent Time
bc984716-5620-400d-b0ca-5c3731a5d355DRV008VEH008speeding95.0143.46317-79.36252026-01-05T00:02:57.000Z
7c6dc120-d327-4d5b-adc4-85cea199cedcDRV010VEH010speeding117.9543.09576-79.48242026-01-05T00:03:25.000Z
3ac859d8-aae9-459c-9dbf-bebddeb974deDRV009VEH009harsh_brake10.4242.77594-79.60062026-01-05T00:05:01.000Z

This layer provides a complete audit trail of all received events.

Silver Layer: Cleaned Driving Metrics

The Silver layer standardizes and enriches data. Common transformations include:

  • Duplicate removal
  • GPS validation
  • Time normalization
  • Driver identifier standardization
  • Event categorization

Example

from pyspark.sql import functions as F

silver_driving_events = (
    spark.table("bronze.telematics_raw")
    .filter(F.col("driver_id").isNotNull())
    .dropDuplicates(["event_id"])
    .withColumn(
        "is_speeding",
        F.when(F.col("speed") > 100, 1).otherwise(0)
    )
)
event_iddriver_idevent_typespeedevent_timeis_speeding
0db82957-a57c-443a-80f4-d6424138afd0DRV007harsh_brake119.672026-01-10T06:49:02.000Z1
92e282b9-4815-4f90-a80c-be6bc820e84cDRV010accelerating119.652026-01-11T19:27:06.000Z1
5127e016-4b8e-429d-802f-35fcf778124cDRV004cornering19.782026-01-09T06:41:25.000Z0

This layer becomes the trusted source for behavioral analytics.

Gold Layer: Driver Risk Profiles

The Gold layer aggregates telematics events into business-friendly metrics. Example KPIs:

  • Total mileage
  • Speeding incidents
  • Harsh braking count
  • Night driving percentage
  • Driver safety score
driver_profile = (
    silver_driving_events
    .groupBy("driver_id")
    .agg(
        F.count("*").alias("total_events"),
        F.sum("is_speeding").alias("speeding_events"),
        F.avg("speed").alias("avg_speed")
    )
)
Driver IDTotal EventsSpeeding EventsAverage Speed
DRV0091002061.06
DRV0021002367.20
DRV0071002061.08

These curated datasets can be consumed directly by underwriting, pricing, and actuarial teams.

Building a Dynamic Driver Score

One of the most common UBI use cases is driver scoring. Instead of evaluating risk annually, insurers can continuously update scores based on current driving behavior.

Example

driver_score = (
    driver_profile
    .withColumn(
        "driver_score",
        100
        - (F.col("speeding_events") * 2)
        - (F.col("avg_speed") * 3)
    )
)
Driver IDTotal EventsSpeeding EventsAverage SpeedDriver Score
DRV0091002061.0629.47
DRV0021002367.2020.40
DRV0071002061.0829.46

While production scoring models typically leverage machine learning, the principle remains the same:

Transform billions of raw events into actionable risk indicators

Real-Time Benefits for Underwriters

Historically, underwriting decisions relied on information that was often months old. With telematics-driven analytics on Delta Lake, underwriters can access:

  1. Current Risk Profiles – View how a driver’s behavior has changed over recent weeks rather than relying solely on prior claims experience.
  2. Early Risk Detection – Identify emerging risk patterns such as frequent speeding, aggressive driving, increased nighttime travel, etc.
  3. More Accurate Pricing – Premiums can better reflect actual driving behavior, creating a fairer experience for low-risk drivers.

Operational Advantages Beyond Underwriting

Telematics analytics offers value across the insurance organization, such as:

  1. Claims Investigation – Driving behavior before an incident can assist claims teams in understanding accident circumstances.
  2. Fraud Detection – Unexpected driving patterns can indicate potential fraud or policy misuse.
  3. Customer Engagement – Insurers can provide feedback and rewards to encourage safer driving habits.

In-Summary

Usage-Based Insurance (UBI) depends on the ability to process and analyze enormous volumes of telematics data efficiently. As connected vehicles and IoT adoption continue to grow, insurers need platforms that can support both real-time event processing and large-scale historical analytics.

Delta Lake provides a strong foundation by combining streaming ingestion, incremental processing, and cost-efficient storage within a unified architecture. Using a Medallion approach, insurers can turn billions of raw speed, braking, location, and driving behavior events into trusted driver scores and underwriting insights.

For organizations building the next generation of auto insurance products, Delta Lake enables a scalable path from raw telematics data to intelligent, data-driven decision making.

Picture of Himanshu Gupta

Himanshu Gupta

Himanshu is a Principal Architect at NashTech. He has worked with more than a dozen customers, helping them design and deliver mission critical systems built on modern architectures, platform engineering practices, and Cloud inspired operating models. Outside of work, he focuses on continuous learning and sharing knowledge with the tech community.

Suggested Article

Scroll to Top