Master Genie + System Tables for cost analytics. Numan Ali (Solutions Architect, Databricks London) demonstrates how to build a natural language cost intelligence dashboard in 15 minutes.
Source: official Databricks documentation · Databricks announcement
Key takeaways
- System tables log operational metadata with latency within couple hours, enabling cost analytics.
- Genie converts natural language questions into SQL against system tables automatically.
- Custom instructions in Genie enable discount multiplications for actual contract-based cost calculations.
- Genie suggests follow-up questions based on chat history and underlying data context.
- System tables maintain relationships; catalog explorer provides self-explanatory column metadata documentation.
- Consumption dashboards and Genie integrate; anomalies link directly to Genie debugging.
Chapters
- 0:00 — Introduction: Cost Visibility with Genie
- 2:00 — System Tables Overview: Understanding Your Costs
- 4:00 — Setting Up Genie Space: Natural Language Interface
- 6:00 — Live Demo: Asking Questions & Getting SQL
- 9:00 — Custom Instructions & Advanced Setup
- 12:00 — Deployment Options: Teams, Slack, Custom Apps
- 15:55 — Conclusion & Next Steps
Frequently asked questions
Are system tables only for cost visibility?
No. System tables contain operational metadata including job performance, user activity, and timing information. Genie can query any of this for operational insights beyond cost.
How do I account for volume discounts in Genie?
Add custom instructions as text rules (e.g., 'multiply SQL spend by 0.85 for 15% discount'). Genie will parse the instructions and apply them automatically when generating queries.
Can I publish Genie cost spaces to Microsoft Teams?
Yes. Genie spaces have APIs allowing integration with Microsoft Teams, Slack, or custom web interfaces. Users don't need Databricks access; they interact via these external platforms.
Full transcript
Auto-generated from the video and lightly edited for readability. Timestamps link to the moment in the video.
Show full transcript (42 segments)
0:04Hey, today I have the pleasure to host Nan Ali. Hi Nan. Hey you. How are you doing? V good. How are you? All good. All good. I'm very happy uh to have you with me here today. Likewise. I was reading a few days ago the uh DBSQL SMB blog and I find I found your article about how to use Genie with system
0:27tables. So can you first tell us more about you and then tell us more about your the blog? Yeah sure. First of all my name is Dan. I'm a solutions architect been working with Databricks for 2 years now. I'm based in London. Before joining Databricks I've been um you know in different companies. my expertise are mainly in data warehousing and data engineering and that is why
0:49I've gone through the time where we didn't have that you know system tables and all all those sort of observability and then I had to build all of these things by myself on the data warehouses that we built so it's u with the system table is very easy to build these kind of things on Databricks now so the blog I think the idea is very simple the concept is very simple one of the most underrated feature in datab bricks that I think is the system tables most of the
1:12people or maybe half of the user they don't know that we have system tables and if they do that that we have system tables they don't know what level of information that we log in in those system table you can go to the job level the user level you know can uh get the information out like how your jobs are you know have are doing or you know they they're working over the span of time I think we keep like a very good
1:35history of that as well and the latency is good it's within within the day I think probably couple of hours that you'll get this in so when you start when you do something in data bras within a couple of hours you'll see that reflected in in system tables which otherwise you'll have to capture that by by yourself. So all of that operational metadata, operational information we keep in system table. I think it's the as I said it's the most underrated
1:57feature in in Databricks. But the concept is that that how you make the system table more consumable, more maybe user friendly. They are very user friendly already. You have very good documentation. Even in the system table, you have very good metadata. You have you know the uh comments against all the columns, all the tables. So it's you know self-explanatory. But those system table can also be and and they have
2:19relation as well. So they they they system table they have those relationship with each other. But to an end user let's say I'm for example a platform manager or maybe engineering manager I don't want to go into system table I don't want to write queries and everything for an analyst is very easy for admin it's very easy to write query and everything but I don't want to do that. So there are two ways to expose expose that those system tables. So one
2:41is the through the dashboard. So we have AIB dashboards in Databricks and uh you know our colleague Kodi uh he's been doing a great effort making all those dashboards and those dashboards can also be imported and exported uh into your can be imported into your uh environment. So I think there there's a huge effort going on there. the other way of doing it um or consuming
3:03those system table relatively easily or in a in a userfriendly way is through genie. So genie is another feature that data intro used probably last year I think you can create a genie space on top of your on the data set that you have and then you can chat with your data. So a a very common use case in in any LLM world. Lots of user actually when when this soul LLM wave came in and then you know the chat sh one of the
3:25very first use case that users or customer that that I work with they ask us to do is to that how can I create an LLM on the data that I already have on database and I can check you know uh or interact with my data before exposing end user or before having end user on board on board to the database as a platform. So genie is the answer to uh
3:49genie is the way to that use case. Now genie you have system table very well kept information and then you have genie when you marry them together you create sort of a genie space. It's a very simple and then I can show you that it's very simple to create that and then you can just interact with your system table and you can answer you can ask a question that you know like what was my spend last day or how is my spend uh this this whole month you can add in
4:11instructions you add some discounts and more information and I can show you I can damage you how how do you do that but yeah the concept is very simple you have the system table very well kept information and then you create a genace so that end user can uh can be exposed to those gen tables in a relatively simple way yeah And you mentioned the dashboard that Kodi has released. So we did a recording about the data I
4:35think data warehousing advisor dashboard and another one developed by Johoo on the um queries cost DBSQL queries cost. So you can view the two sessions and I take on your side new so you're gonna make two PMs happy. Chiao from the Genie team and Greg from the uh from the money team regarding the observability. So can
4:57you show us how you set up the environment and uh and how the your journey looks like? Yep. Let's let me pull that up. Can you see my screen? Oh, good. So yeah, this is the genie space that I have created. You can see this is the name of the space. These are some sample question that you can ask from the uh from the start. Just quickly show you what are the tables that I have
5:19added. So how do you do that? You basically go in here, you add different tables. you pull in different tables into the into a space and then you create a gen space. You can see that I have added these tables in there. So I've added clusters, usage information, list prices, jobs and everything. And by the way, as I said uh there is a very good documentation database side uh databicks uh documentation website. You
5:42can read about what is the uh what are the what is the information that we keep in these different tables column by column at attribute information very detailed one. So if you don't know them uh I won't go through the documentation or the metadata but you can read in the databicks website. So yeah I pulled in this information and actually I started from
6:04the top. So how did I start? I said I I started with like what's what level of information generally you would need uh on a day-to-day basis from the system table. So I started I I thought that if I'm an engineering manager or a platform manager or or a manager of any sort I would like to know that okay what is my spend this year so I can ask this
6:26question. So based on that those couple of questions or set of question that I thought that a an engineering manager or an admin would ask I pulled in information from system tables and then added into into this genace. I can also show you the instruction maybe later but let's maybe let me show you that how how does it work. So I can ask a question for example what is my daily spend this
6:51month and genie what genie does is basically it only needs a SQL warehouse behind the scene. So what it does is that based on this uh it it converts this natural language into a SQL query throw the SQL query onto a SQL warehouse and then f that information back to you. You can also see that the good thing about Genie are
7:13generally in the Databricks. Databricks give you most of the features are very gloss box. So they are not black box that you can't see the code or you can't see anything behind the scene. For example, in this case you can also see the code. So the code that Genie has generated. So if you are an admin, if you are a SQL developer, you can see that if you're happy with this code or not. So this is the code that Genie has created by just reading this uh you know
7:37simple question and while it's yeah there you go this gives you the information okay what is my daily span it has created a query based on that uh you know national language and gave you this response so you know daily span so 23rd of April 22nd 12th all of that I can sort that in for example descending order I can see that 11th of April for example was
8:00the most expensive Okay. The next but and then I can ask the question what what was the most used product in on let's say 11th of April and then Genie will go down we'll go to the assistant table we'll get this information out. So you can you know do this kind of
8:22investigation using this genie space and while it's uh loading the response I'll pause for a second you do you have any comments or question? No, no, sounds good. Yeah, you can see that. Okay, the response is that the most used product is model serving. So, somebody has created the model model serving for example and then that that is the most used product that we have we can see from the from the system table. Another
8:45cool thing that he has introduced lately is the you genie also suggest the follow-up question. You can see on the at the bottom that there are some follow-up question that Genie is suggesting. So, what was total spend for the most used product? how many units of most used product and things like that. So it suggests to like follow-up question as well just like any other LLM and those those followup are like some
9:09questions you already inserted in the instructions or Jenny finding the context based on the data. It's the genie finding the contest based on my chat, based on the data and suggesting me the follow-up question and you can you show us what the instructions looks like just to show them how they can configure the same steps on their environment. So in
9:33the blog that I wrote and uh you I think yeah you'll you'll share the link as well at the bottom of this video I have added all these instruction in that blog. So you can copy paste and then start from there. One of the thing that I have learned uh using Genie is that that when you add those instruction incrementally, Genie works better as compared to adding them like all in the all at once. But I mean I have done all the hard work for
9:55you. So you can take all these uh instruction copy copy paste into your into your own to create your own genace. So you don't have to do that. So these are the instruction for example that I have added. One of the there are for example the very first one is that that uh that I have added I have the instruction is that that use billing dot usage. link origin product to answer product related question. So in database
10:17there are two or system tables there are two things there are SKUs and they are products. So SKUs are for example they are more detailed one. So we have different pricing for uh different features based on different region they become the SKUs but they are all grouped into one product. So for example, model serving health will have different SQUs but it is basically uh
10:39all of those SQ are clubed and grouped as a as one product. So that is why and that information is kept in the billing original product attribute that is why I have asked I have instructed Genie to use this column if somebody asked product related question. If somebody asks the question the same question for for example what was the most used let's
11:02say what were the most used SKUs it will give you uh a slightly different uh response based on the SKUs. So these are all the instruction that you can add in another piece of information. So these are these are simple one most of the data not most part but maybe half of the you can yeah you you know that you can use databicks as a pay as you own the pay as you basically as well but you can also have a contract
11:24with datab bricks and when you have a contract mostly for the AWS customer and maybe I think GCP customers as well then you in some cases get some kind of discount on different um different products. So while your spend the spend that the this this response you can see the spend in here this is basically based on the list prices. This is not based on the discounts that you
11:46have with Databricks and the reason is that that Databricks only keep the list prices on the system table. It can't go into the user level uh like the actual customer level and I'll add also those contract or those uh those discounts as well. So what you can do is that you can add those discounts as an instruction. So I have added those discount that I have the uh SQL discount.15 allpurpose
12:09discount.10 DLC.20 this this is just an example um you know discount and then what I have added as an instruction that multiply total spend of a you know product with their respective discounts to get the actual spend. So if I ask this question in a different way, what is my daily discounted spend this month? Then this
12:33will add this will multiply the list prices with the with the discount that I have added in here and will give me the discounted spend. And this is the information that you wouldn't you would not have otherwise in a system table. So you'll have to add that maybe as as a lookup table if you are creating a dashboard or writing a SQL query. In Genie it's very easy. You just add those uh no discounts here. Just add one line
12:56and that's it. Genie will understand and you can I can see that uh if I click on the generate code you can see that what is it doing that based on the product if it is SQL then multiply by with 85 then 085 is basically the actual one and all purpose is 90 DLC multiply by that multiply that with the actual spend the
13:20list spend list price you'll get the discounted spend and you can see that genie the response genie has created So on 1st of April for example, my total spend was 25th 25K but this is going to spend is actually 23k. This is the spend. This is the amount that I'm more uh interested in compared to the this price. Now you can either use a dashboard or use gen to understand your
13:44cost. And I think there is something also cool that was announced few days ago. So if you have the dashboard the consumption dashboard and for example you see an outlier or an anomaly you can just click and debug and gen will open and will explain what what was the source of this anomaly somewhat starts developing on work new use case. So it's
14:06something super super cool. So you see that the ecosystem is getting better and better. My advice just go read Newman's blog develop your own genie on the top of Databricks cost and if you don't have just keep in mind that the only requirement is to have system tables enabled if if it's not the case we will find the documentation below to make
14:28sure that you can enable system tables and then you will start benefiting from all those features. Anything to add nan before we close? Yeah, I mean there's a one thing that just want to add that this is just an example once I uh you'll take this instruction you'll take the genius you take this idea away you can add you know expand this idea uh based on whatever your requirement as a user
14:50or as your organization is uh and then you can create like a very good genius space that you can hand it over to like end user consumer whoever is uh the right recipient of this information you can hand it over to them and they can start that the other thing is that that this is uh genie space genie also have the APIs so you and create if you don't want the user to come onto the database platform for example and then you know interact with this particular chat
15:13interface you can expose Genie uh space to via APIs into um into an app for example or a web interface or even uh you can integrate Genie with your Microsoft team for example so there are some case studies there are some blogs as well I think I've added that link in the in at the end of my blog so there are some other blogs that you can read that how do you how do you integrate Microsoft teams with Genie So this space
15:37can be integrated with the Microsoft team so that user doesn't have to actually come into databicks platform to interact with Genie. That's perfect. Thank you so much Numan and uh see you soon maybe for our next uh your next blog post. Yeah, see you. Thank you very much. Enjoy.
Official Databricks resources
- AI/BI Genie documentation — docs
- Databricks Apps documentation — docs
- Agent Bricks — product
- Monitor usage & cost — docs
- Databricks Free Edition — product
- Monitor costs with system tables (documentation) — docs
- AI/BI Genie is now generally available (Databricks blog) — blog
Related
- Structured Streaming for Real-Time Data Engineering
- One Login, All Workspaces: Custom URLs for Databricks
- Genie ZeroOps: Find & Fix Data Pipeline Issues in Minutes
- Extract and Structure Enterprise Documents: AI Functions on Databricks
- All Databricks video guides
- All tutorials & videos
Databricks Answers
Looking for a quick, source-backed answer? Browse Databricks Answers on Genie & conversational analytics — direct, documentation-validated answers to common Databricks questions, curated by Youssef Mrini, Senior Developer Advocate at Databricks.