Question
· Feb 18

Cube Compilation Order in UCR: How to Manage Dependencies?

Hello all,

We are currently developing a set of cubes in Unified Care Report (UCR) for data analysis purposes. However, we are encountering issues with cube dependencies, where certain cubes rely on others to be compiled beforehand. The complexity of these dependencies is becoming increasingly difficult to manage, particularly when attempting to deploy the cubes.

The problem arises when trying to compile a cube that depends on another cube, which may also have its own dependencies. For instance, when compiling the Test.Cube.EncounterHealthPlans cube, we receive the following error:
 

Compiling class Test.Cube.EncounterHealthPlans
ERROR #5001: Related cube must be compiled before this cube: 'Encounters'
ERROR #5490: Error running generator for method '%GetModel:Test.Cube.EncounterHealthPlans'
ERROR: %DeepSee.CubeDefinition.cls(%GetModel) of generated code compiling subclass 'Test.Cube.EncounterHealthPlans'
ERROR #5030: An error occurred while compiling class 'Test.Cube.EncounterHealthPlans'


To resolve this issue, we are forced to manually compile the dependent cube (Encounters), which may itself have dependencies. We have reviewed the documentation but were unable to find a method or API that provides the correct compilation order for the cubes.

Has anyone else encountered this issue and found a solution? We are looking for a way to programmatically determine the correct compilation order for our cubes, potentially using the $System.OBJ.Compile() method or an alternative approach.

Any guidance or recommendations would be greatly appreciated.

Best regards,

Product version: HealthShare 2023.2
Discussion (5)2
Log in or sign up to continue

@David.Satorres6134 , you asked:

We have reviewed the documentation but were unable to find a method or API that provides the correct compilation order for the cubes.

I gave the documentation links on how to provide the correct compilation order for classes.

In most cases the compiler does take care of dependencies and build/compile in correct order.
In my experience I have very, very rarely (maybe a couple of times) used DependsOn or CompileAfter Class keywords (I don't do cubes/DeepSee).

I'm not familiar with multiple cubes compilation, but evidently your implementation has some particular dependency that the compiler is unable to identify and take care of it.

Maybe  (just guessing here) you have some cross dependency that is "resolved" with multiple compilations?