AI Agent Builds Models from SQL History

James Davidson · Friday Demos · April 10, 2026 · 3:04

A bunch of new work we're experimenting with to accelerate building data models. Here we use the SQL logs to bootstrap model concepts.

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. All right, one more quick uh demo that is also not uh immediately available, but more of a you know, general direction I think is interesting. But here, you know, I'm in uh the, you know, new IDE uh AI modeling agent um and I've added some new functionality to it. So, um this is a Snowflake instance actually connected to our demo database, too.

  2. So, it's got a rich history of SQL uh maybe from a BI tool, so maybe not not uh every random ad hoc query, but um you can actually now uh use that rich SQL history. Uh Omni will parse it, pull out reusable objects, and effectively recommend uh both specific joins and topics to uh to the modeling uh AI uh or modeling agent, um and also do things like recommend scalar transformations and uh you know, for dimensions and aggregations for measures, too.

  3. So, what this is in effect doing is going and querying the audit logs inside Snowflake use you know, using uh both parsing and sort of deterministic patterns, things like, you know, table usage and uh field usage and whatnot um to help inform it. And it takes a a little minute uh and it's n- n- natively integrated into uh our our uh experience.

  4. So, here you can see we've got this query history uh you know, chip now that uh we've got a thousand queries, 900 of them have parsed some uh basically large queries. I think Snowflake uh limits the uh query text blob to I think 100 kilobytes, something like that. So, for large queries, uh a number are going to be truncated uh naturally, and then some may be more complicated than what we were were you know, able to to directly parse uh as well, but you can see, you know, here tables, you know, the e-commerce inventory items, the the uh oh info schema products, users.

  5. So, you know, we're going to use that the ones that aren't basically present inside this the this model will will ignore. It'll find things like dimensions and measure candidates and give you a bunch of sort of descriptive stats effectively for for this. And then it really is tied into the model agent directly. So, in this case it's now created a branch already modeling from Aquarius 3 V2.

  6. I've I've done this a few times locally and it will effectively go and augment, you know, it's read the the files directly. It will go and augment the those files as as it has learned from from the the existing SQL audit logs. This is sort of a broader attempt to uh learn as much context we possibly can from whatever data source might be.

  7. So, from your databases, from your existing analytics tools, and all of the above.