Workspace Assembly Dynamic Dimensions

Dynamic dimension services execute assembly files for dynamic dimensions. The assembly file uses public classes to construct the DynamicDimensionInfo object, which creates the Dynamic Dimension. The DynamicDimensionInfo object uses the following syntax:

Syntax: DynamicDimensionInfo(ContentTimeStamp, NumSecondsBeforeReadContentTimeStamp, DynamicMemberCollection, DynamicRelationshipCollection)

When designing a dynamic dimension, consider the following:

  • The frequency and trigger for the dimension to update during workspace or assembly file changes, or time-based updates (daily, hourly, or by the minute)

  • Member definitions, including properties, relationships, and aggregation factors

  • Enrichment of dynamic members for properties, constraints, and member formulas

Each of these important considerations are explained in the following sections.

Frequency and Trigger

When you create a new assembly file as a dynamic dimension service, example syntax provides date/time check definitions that manage the refresh of the dynamic dimension. The variable, NumSecondsBeforReadContentTimeStamp, is passed as an integer to the property.

Syntax: DynamicDimensionInfo( __, NumSecondsBeforeReadContentTimeStamp,__ ,__ )

Selection should be based on the frequency of changes in the dimension source. If the cadence is unknown, or the members are manually created in the assembly file, the update can be triggered through changes to the assembly file using the time variable, SharedConstants.DateTimeMinValue.

Time-based triggers can be used in the design of the Assembly file. If you use a higher refresh frequency, such as by minute, application performance may be impacted, especially with high volumes.

Example: DynamicDimensionInfo( __, Timevariable ,__ ,__ )

Refer to the following table for time-based refresh trigger rates:

Refresh Type Example
Daily Refresh DateTime( x.Year, x.Month, x.Day, 0, 0, 0, 0, DateTimeKind.utc)
Hourly Refresh DateTime( x.Year, x.Month, x.Day, x.Hour, 0, 0, 0, DateTimeKind.utc)
Minute Refresh DateTime( x.Year, x.Month, x.Day, x.Hour, x.Minute, 0, 0, DateTimeKind.utc)

Member Definitions

After a dimension is created using the Source Code Type of Dynamic Dimension Service, all metadata management is performed through workspace assembly files. Members can be created and defined in the assembly file. The assembly file can also source members and define properties from external systems, such as a database table. The members may be defined as either base or parent.

A new dynamic dimension service assembly file is created and populated with sample code that exposes the public classes and functions.

The assembly file creates the member and its relationship to parents in the dimension hierarchy. These objects are then passed to the DynamicDimensionInfo function. This function includes a data-time property that supports controlling and triggering the dimension refresh.

Syntax: DynamicDimensionInfo( ContentTimestamp, __ , DynamicMemberCollection, DynamicRelationshipCollection)

Refer to the following definitions:

  • DynamicMemberCollection: A hard-coded, dynamically sourced list of members

  • DynamicRelationshipCollection: A hard-coded, dynamically sourced parent-child definition of members

The DynamicDimensionInfo function results in an object consisting of the following:

  • TimeStamp: Evaluated on caching

  • Dynamic Members: Defined by the DynamicMemberCollection

  • Dynamic Relationships: Defined by the DynamicRelationshipCollection

Dynamic dimension assembly files can reference an existing standard, stored dimension member to support extensibility. Standard dimensions should never be extended from dynamic dimensions.

Assembly File Structure Overview

Creating the member and relationship collection objects will instantiate all the required, and optional, settings that define the structure and properties of the metadata.

Dynamic functions offer a variety of overloaded property options that support the creation of members based on assembly file contents, internal members, and external sources.

  • DynamicMemberCollection.GetMember: Retrieves dynamic members

  • DynamicMemberCollection.CreateAndAddMember: Creates dynamic members from sources

  • DynamicRelationshipCollection.CreateAndAddRelationship: Defines hierarchical relationships for members to parents

Metadata Enrichment

When objects are initiated as dynamic members or a relationship collection, the objects can be enriched to configure all stored and vary-by properties. Members created within the assembly file, or originating in source systems, can be configured with all required and optional properties, including vary-by-ScenarioType and Time properties.