Forum Discussion
xfgethelp
2 months agoNew Contributor II
Create dynamic members using api.ReadDynamicDimensionInfo
Hi, I'm trying to create dynamic members within a dimension using api.ReadDynamicDimensionInfo. I created a custom table within application database. When the service runs, it creates members under...
- 2 months ago
Hi xfgethelp
I think your issue might be that you are trying to create your dimension as an inherited dynamic dimension
This means you have to observe extensibility and parent members in your source data must conform to real members in the Dimension you are inheriting. This is the same logic for physical dimensions
Not too clear what your structure looks like from your screenshot but I can tell by greyed out members it is inherited
CreateAndAddrelationships works better here because it is an overloaded method where we can stipulate type of parent child relationship e.g real or dynamic members based on source data and what we are trying to create in onestream
Hope this helps
Sam
xfgethelp
2 months agoNew Contributor II
Hi sameburn
Thanks for the reply. Is it fair to say that for extensibility, we need to use CreateAndAddRelationships (and cannot use api.readDynamicDimensionInfo) and that api.ReadDynamicDimensionInfo is used only to create a flat list of dynamic members under root?
Also, I don't get why AggregationWeight cannot be set when it is one of the parameters that is being passed.
sameburn
OneStream Employee
2 months agoI think unless you have correct parent members and ids in your source dataset based on inherited dimension, it is safer to use CreateAndAddRelationships than api.ReadDynamicDimensionInfo.
In my experience we use the latter for simple use cases that don't require inheritance dependency. Both can handle hierarchical levels (not just flat hierarchy) based on your parent / child relationships in your source dataset
For your Aggregation query, I suspect it is your source data that might need review. In your screenshot it looks like you have a mixture of data types in that column e.g int and decimal based on decimalisation. So you might need to cast that value
Hope this helps
Sam
Related Content
- 5 months ago
- 11 days ago
- 2 years ago