cubewise-code / bedrock

Bedrock is TM1 Best Practice assets built from years of TM1 experience
Other
79 stars 74 forks source link

}bedrock.cube.data.export fails on certain cube types #415

Closed wimgielis closed 1 month ago

wimgielis commented 1 month ago

Describe the bug This process fails for certain cubes, in particular, }Holds cubes

To Reproduce Create a Hold on a cell in a cube. Export such cube with the Bedrock process.

Test code to pinpoint the circumstances with an example cube called "Revenue": vCube = '}HoldAdmin}}_Revenue'; n = CubeExists( vCube ); AsciiOutput( 'test.txt', NumberToString( n )); n = Dimix( '}Cubes', vCube ); AsciiOutput( 'test.txt', NumberToString( n )); n = ElementIndex( '}Cubes', '}Cubes', vCube ); AsciiOutput( 'test.txt', NumberToString( n )); n = FileExists( vCube | '.cub' ); AsciiOutput( 'test.txt', NumberToString( n ));

The output is: "1" "0" "0" "0"

Meaning that even though the cube exists, we cannot really do all the actions that are done in the process.

For instance, turning off needs to be done with: CubeSetLogChanges( vCube, 0 ); instead of: CellPutS( 'NO', '}CubeProperties', vCube, 'LOGGING' );

Expected behavior No ProcessQuit error on line 79 of the Prolog tab: Error: Prolog procedure line (79): Invalid key: Dimension Name: "}Cubes", Element Name (Key): "}HoldAdmin}}_........"

Version

Additional context Not sure if there are other similar tabs of cubes where the same error occurs ? I just noticed this with a Holds cube but maybe other types of cubes have a similar behaviour.

lotsaram commented 1 month ago

Hi @wimgielis We are going to do a final 4.1.4 release branch after which the current master branch will go into stasis before converting code file format from .pro to .json for v12. As there is no switching of logging in v12 I don't think it makes sense to address this.