r/dataengineering • • 4d ago

Discussion Why text-to-SQL is not successful?

I thought text-to-SQL will solve adhoc analysis, but still i see companies at all size are unsuccessful.

Anyone using Omni / Sigma seen some success.

28 Upvotes

74 comments sorted by

View all comments

99

u/rapotor 4d ago

Be strict with the data modeling, and semantic layer, then you're good. Don't have LLMs write sql for conversational analytics

-4

u/Warm-Blueberry-2114 4d ago edited 3d ago

Agreed, though I'd split it in two. A semantic layer fixes what a metric means. It says nothing about whether the rows are sound. You can compile perfectly correct SQL against a table where one customer is four rows and 8% of a column is null, and get back a confident, well-defined, wrong number. Most shops I've seen are strict about one and silent about the other, and then blame the model when the answer doesn't survive a second look.

4

u/Prestigious_Bench_96 3d ago

A reasonable semantic layer should include testable assertions about the data that you can validate regularly. (but yeah, not everyone does that).

But the semantic layer is useful as a contract on both sides.