proomt

Search

Search posts, papers, and topics

All posts

DatabricksKent Marten, Sergei Fedorov5 min readintermediate

"Regex for Rows": Simplifying Pattern Detection in SQL with MATCH_RECOGNIZE

Summary

Databricks announces MATCH_RECOGNIZE, a preview‑only SQL clause that lets you write regex‑style patterns over ordered rows. The post walks through four industry‑level use cases (security login‑failure sequences, V‑shaped stock trends, e‑commerce cart abandonment, IoT sensor‑driven failure prediction) and claims the operator replaces complex CTEs, window functions, and self‑joins. No actual syntax…

  • MATCH_RECOGNIZE adds a pattern‑matching clause to Databricks SQL, exposing FIRST, PREV, NEXT, and the end‑of‑partition anchor ($) for row‑level sequence detection.
  • The blog argues the operator can replace typical “gaps‑and‑islands” or window‑function logic for detecting consecutive failures, V‑shaped trends, abandonment, and sensor spikes.
  • Examples are described only conceptually; no concrete query syntax, execution plans, or benchmark results are shown.
  • The feature is in public preview and tied to Databricks Lakehouse Real‑Time compute.

If you already use Databricks for time‑series or event‑log analytics, MATCH_RECOGNIZE could reduce query complexity and maintenance overhead. However, without concrete syntax or performance data, it’s unclear how it compares to existing window‑function approaches or what limitations exist (e.g., su…

4/10

Related reading

  1. Labeled matches: why is this not in every regex engine?

    The author shows how to label tokens (dates, money, emails, etc.) with a single regex pass using extended operators (`&` for intersection, `~` for complement) in the resharp library. A tiny benchmark compares 10 patterns against spaCy’s NER, reporting ~1.9 GB/s (≈4500× faster) on 8 threads. The post lists the concrete patterns and argues that for deterministic, regular‑language entities regex can…

    Lobstersiev.ee7 minHN5lobste.rs27
  2. Database for AI Agents: 5 Evaluation Criteria

    Databricks outlines five criteria for a production‑ready database for AI agents—branch‑per‑agent isolation, serverless scale‑to‑zero, hybrid search, ACID guarantees, and a unified platform that eliminates ETL lag—illustrating each with features of its Lakebase offering and brief customer anecdotes.

    Databricksdatabricks.com10 min
  3. RADAR: Catch gray failures with anomaly detection

    Databricks built RADAR, a four‑stage, metric‑agnostic pipeline that uses streaming anomaly detection (SPOT) to surface gray failures in minutes with >90% precision. The blog shows how to recreate the system on Databricks for any metric, from billing to model drift.

    Databricksdatabricks.com7 min
  4. Introducing TIN: full-text search for Postgres

    PlanetScale’s TIN is a new PostgreSQL extension that implements a full‑text search index supporting Boolean, phrase, span, fuzzy, wildcard, regex, case/accent folding, COUNT(*) and BM25 top‑k queries. In a suite of benchmarks on an i7i.8xlarge EC2 instance (8 vCPU, 32 GB RAM), TIN built in 8 min 10 s (50.7 GB index) and outperformed ParadeDB, pg_textsearch and the built‑in GIN index by large marg…

    PlanetScaleplanetscale.com15 minHN20175
  5. How Databricks’ marketers use data 3x more with Genie, an AI analytics assistant

    Databricks built Marge, a Genie‑powered conversational analytics assistant on a governed Marketing Lakehouse. By starting with a single high‑value use case (email campaign performance), documenting data, encoding verified answers, teaching business terminology, and embedding the tool in existing ticket workflows, they achieved 85% adoption, 3× higher data usage in decisions, 50% QoQ usage growth,…

    Databricksdatabricks.com10 min
  6. How energy teams turn theft detection into governed action with Genie and AI business processes

    Databricks shows how to turn energy‑theft ML scores into a governed, end‑to‑end workflow using a Databricks App, Lakebase for live case state, Unity Catalog for data governance, and Genie One for natural‑language executive reporting. The pattern lets utilities act on alerts faster while staying compliant, and can be reused for other fraud‑type use cases.

    Databricksdatabricks.com6 min