Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
AI SQL Generation: Overcoming Dialect-Specific Syntax (gavinray97.github.io)
3 points by gavinray 10 months ago | hide | past | favorite | 1 comment


In response to the recent Google Cloud post "Getting AI to write good SQL" [0] and some comments I've seen here lately [1], I wanted to share an approach that I've found useful for portable, dialect-agnostic SQL generation.

tl;dr = Use an abstract Query IR/AST as your generation target, rather than embedding dialect-specific syntax rules. Then render the IR to a target dialect programmatically.

Hopefully this is useful for other folks working in the "need to support multiple SQL dialects for my product" space.

- [0] https://news.ycombinator.com/item?id=44009848

- [1] https://news.ycombinator.com/item?id=43812675




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: