Automatic Cube Planning and Management

TJ Banghart · Friday Demos · August 28, 2026 · 5:55

Building more into the cubing layer to allow Blobby to smartly build roll-ups to improve performance and cost for dashboards.

Try it yourselfThe full week on docsaicubingdashboards

Transcript

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

  1. Greetings. I'm going to demonstrate a cube work that I've been exploring for the last couple of weeks. Last time we looked at it, it was just coding, and now there are changes to make it a real product. So, I have this application . It is based on a user attribute , namely—state. This will be built-in, and depending on who is logging in, it will be a completely different application.

  2. It is themed like the Borg from Star Trek, whose ship, as you may recall, is a cube. So let's stick to the chosen topic. I'm going to ask Bobby this question: "I want to embed this application for many users, can I optimize the queries?" Let's launch. The system will turn to the cube planner—an endpoint that analyzes the content and all queries used to find the minimum number of cubes to cover the most tiles.

  3. In this case, the application is quite simple, and it offers one cube. This is a partially deterministic process to achieve this result. There is a cube query planner, and the other part is evaluating whether it is worth doing. Bobby says, "Yes, it's worth doing, because all these requests can be served by a single cube." Now I'll ask you to add it, okay?

  4. Go ahead, add it. I hope he writes this into the workbook model. This will take a second. Dashboard planning. Good. Add a cube to the workbook model. Perfectly. It does what I hoped it would. Suggests adding cubes. Maybe it's taking a little longer than I wanted. Okay, next step. So, it will add this to the workbook model, but it won't start the build yet.

  5. There is still a lot to figure out here. But if I go to my workbook model and update it. Oh my God. Okay, I see he correctly added it to the right topic. Ahem. And for this simple application, it looks like a set of all these fields. Um, but now the nice thing is , and this also explains why it took a while, is that we used the existing caching layer to implement these cubes and then treated them as special within the existing data file index tables .

  6. Um, we brought it into their own schemes. So there are two tables that handle the actual process of creating the cubes and then checking the cache. So this new cube management page will allow us to see the status of the cubes that you have defined in the workbook model. Um, I have one. It is defined in the order items topic .

  7. It powers this commercial geoscientist workbook. It has never been created, so I will create it now. It should work. This will take a second. And now I can see the size. So, that's about 33,000 lines, almost 4 megabytes. Um, so now it's created. If I go back to the actual workbook, this is the workbook that powers that application.

  8. And I'm updating. Some of these will be exact matches, as we have reviewed the app before. It probably should have cleared the cache. So, it's an exact match. Income by state, you can see I'm referring to the cube re-query here. Um, it could just be repeated server requests, yes. Because when creating a cube, we will first check the server's result cache.

  9. So the cube creation process will actually place this, or sorry, this initial query also sets the cache. So, you create the cube once and then set up a cache for subsequent queries. This works for my user because I filter by California. Now, if I come back here , let's see if I can see how it looks like this is a test user.

  10. View as an automated test user. We'll see when it loads. And so now I'm actually filtering for New York, and that should also apply to the cube requery. Let's see. I'll reload this. Accurate hit on the cache. Cache hit due to re-query of the cube, which is two re- queries of the server. So, what is new is the ability to have this tool.

  11. We can also make it an external API. Now it's just in Blobby to look at your queries, use that first deterministic pass to see what the minimum number of cubes worth creating would be, and then suggest whether it's worth doing. And then the next thing is this actual control page. And, you know, there's a lot that can be done here, but this is just my first attempt at organizing everything so that you can see if it assembled, if there was an error during assembly, and so on .

  12. Um, and we also need to do some stress testing, because in some examples, you know, 4 megabytes—that's really not much. And for analytics, it will be much more. And we still need to determine whether it's worth doing, but I just want to make it easy to understand what the hell is going on when you put all this together.

  13. Um, and then you don't have to invent the cubes yourself. I think it's a very difficult task—thinking through all the filters that need to be added, all the fields. So today the situation is roughly like this . And I will think about doing more. I do n't know. I think we need to discuss this.