Cascading data cubes - build errors

Hey everyone, I have one data cube that queries raw data and stores it in the warehouse.

Then I have another cube that uses the data from that first cube to do a bunch of things, and stores in a warehouse.

Sometimes, when I try to build both of these cascading data cubes, the second one fails because the first isn’t done building (yes, I’m starting #1 first, then #2). But most times - including the scheduled daily runs - I can start the first one building, and then the second one a moment later, and they run fine.

Is there a best practice for handling these types of cube builds?

1 Like

I’d like to know this as well, it’s something we do often.

Another feature request I have is for some way to chain the builds. So I would set that when cube #1 finishes then cube #2 should start, and then I could click once and the whole cascade would process in order.

1 Like

Second this also. It would be an amazing feature if we could chain the build of cubes :slight_smile:

1 Like

Hi Everyone,

We understand a feature like this would be of a great help. However, I’m not sure of the version of DundasBI you’re using currently but, I’m happy to inform that our R&D team has addressed this issue in version 9, with better support! :slight_smile:

2 Likes

Great.
When is the beta of version 9 due out?

1 Like

Hey David,

We are planning to have it released sometime around mid/end of third Quarter this year.

1 Like

If you don’t want to wait for release 9, you could do this the old fashioned way by building a dashboard with a button that sequences the data cube warehousing you need. Here’s an example of 10 date cubes built in a required sequence from my library of tricks (this is the script for the click action on the button):

//get the data cube service
var dataCubeService = this.getService(“DataCubeService”);
//build the data cube in warehouse using the data cube id
//Parameter ‘true’ if the data cube is to be built in-memory
//‘false’ if the data cube is built in the warehouse
dataCubeService.buildStorage(“e6731a14-c5d3-48d6-a3d7-3df4e1df165d”,false);
setTimeout(function(){ dataCubeService.buildStorage(“be7899f6-b129-437e-8cb2-2a275c666e97”,false);}, 120000);
setTimeout(function(){ dataCubeService.buildStorage(“89774a91-0a74-4804-bdea-5e71309b7a00”,false);}, 150000);
setTimeout(function(){ dataCubeService.buildStorage(“6851d309-ce30-46a9-80d0-cf939509b69b”,false);}, 180000);
setTimeout(function(){ dataCubeService.buildStorage(“5c96791f-115e-414a-98a2-8d2772207b40”,false);}, 210000);
setTimeout(function(){ dataCubeService.buildStorage(“fc3fc3f4-29e2-46d7-8847-0c0e94a0b1f9”,false);}, 240000);
setTimeout(function(){ dataCubeService.buildStorage(“bd8bd2fe-078a-4f75-b91e-1aad96fb12ac”,false);}, 270000);
setTimeout(function(){ dataCubeService.buildStorage(“f20f2227-37a7-4d46-b3fe-da796df89349”,false);}, 300000);
setTimeout(function(){ dataCubeService.buildStorage(“b4112e28-138e-41ed-b904-a5966a4e5e73”,false);}, 330000);
setTimeout(function(){ dataCubeService.buildStorage(“96c9edb8-0f70-4b4d-b61b-5e83502810c1”,false);}, 360000);
setTimeout(function(){ dataCubeService.buildStorage(“1a6191b3-9ed1-4e1b-a858-9f6a5c88a5b6”,false);}, 420000);

Check it out - works today in 7.0 and 8.0. As a caution, remember to leave the browser tab open while these 10 builds are executing. When you dismiss the browser tab (dashboard), there goes the punch list! My start/delay times were timed from the actual build times, they all are relevant to the start time of the button click (not concurrent). Credit to Jay Gong, I believe.

2 Likes

Much appreciated, but this isn’t a build on the dash level. I’m in the cube trying to get it to build and it won’t work. It was working most of the time and all of a sudden stopped. I figured I had just gotten lucky in the past and would ask what the proper way to do it is, but I guess this is a known problem!

This script is something I could do, and I would even improve on it by checking if the first cube had finished before starting the second.
Problem is that it relies on the page staying open (in my case for over an hour) so would not really work.
I need a fire and forget method.

I was thinking of writing back to a cube, then the next time anyone loaded the page checking that and going from there, but I reckon I’ll stick it out until version 9.

1 Like

Fair enough, my use is also for dependent metric sets and dashboards. However, the dashboard and button here is simply a method to build multiple cubes in the correct sequence, it is not at all a user oriented experience. I wrote the mini dashboard for my boss for while I’m on vacation and I didn’t need to fuss about the proper sequence. The use covers several areas of the enterprise, and I’ll be dazzled when Dundas creates a data cube awareness to keep this within the data cube family only.

2 Likes

So, it turns out I needed this after all! I built a refresh button for one of my critical visualizations, but it didn’t work just doing table1.loadData() since the underlying cube needed to be re-run, too. Used your code and BOOM, it worked! Thanks, Steve!

1 Like