This is a hack, so proceed at your own risk! I haven’t tested this or used it in a production environment, so things may break/crash/catch on fire.
Say that you have built a really nice dashboard, deployed it to production, and everyone loves it. This dashboard is based on a cube that takes an hour to load. Now you’ve made modifications to the dashboard and cube in Dev and you’ve just migrated it to Prod. However, the cube instance is invalid because the data doesn’t match effectively taking your beautiful dashboard offline for an hour while the cube refreshes. If only there was a way to move the cube’s data from Dev to Prod …
Intelligent Cube File Storage
When an Intelligent Cube is loaded, it is simultaneously stored on disk and in memory. This is so that the IServer can have the option of unloading old cubes if it runs out of memory or reloading cubes quickly if the server crashes or restarts.
The location that files are stored is configured in your project settings. From there, they are in a folder that contains the server definition name (not necessarily the server name you connect to, but whatever was defined at the time of configuration!) and some random letters and numbers. Inside this folder are two critical components of the cube, the .cube file and the _info.cube file. The first is the actual data and the second is metadata for the cube. There are other .idx files, but it appears that you don’t need them (see the opening two sentences about warnings). These files share the same ID in the name and that ID is generated at the time the cube is loaded. If you delete and reload the cube, it will change, but if you simply unload and reload the cube, it won’t change.
Exploiting the File Storage
First, the requirements:
- You have to have the same project in both locations, ie, a project that you can migrate between.
- The cube has to already exist in both places and be loaded in both places. There doesn’t seem to be any way to get the IServer to load a cube cold from storage, only hot (I’ll explain that in a second).