This chapter describes how to roll selected data, saving a copy of the current version of that data.
This chapter covers the following topics:
It is often useful to be able to see older data and possibly compare it with the current data. In the case of forecasts, the Analytical Engine automatically saves older versions. If you need access to older versions of other data, however, you must explicitly instruct Demantra to save the data.
To do so, you use the Business Modeler to make a copy of the original data (usually a series) for later use. You define one or more rolling data profiles, each of which associates a source series (or a server expression) with a target series.
The target series must already exist.
The target series should usually be configured almost the same way as the source series (except for the hint message and so on). See "Creating a New Series Based on an Existing Series."
The target series must have an update field in the same table as the source series; see "Specifying Data Properties of a Series."
You can use any kind of series (numeric, date, or string), but the target and source series must be of the same type.
Then you configure a rolling data session, which specifies a set of rolling data profiles to run. The rolling data session specifies which profiles are active.
You can execute the active profiles from within the Business Modeler or from a workflow.
To create or modify a rolling data profile
Select Engine > Rolling Data.
The Rolling Data screen appears.
Do one of the following:
To select an existing profile, click the profile in the Profiles list.
To create a new profile, click Insert.
The screen displays a check mark next to the profile that you are editing.
Type a unique name and an optional description for the profile.
In the Source area, do one of the following:
Select a source series from the Series drop-down list.
Note: If the server expression for the series uses the round function, note that the rounding occurs before the data is rolled forward. In this case, you might have slight errors at aggregated levels.
Type a server expression into the Server Expression field. In this case, click Verify Expression to check the expression. The expression must be an aggregating SQL expression; see "Syntax of Server Expressions".
Specify the period association of this data source by selecting an option from Source's Period.
In the Target area, select a series from the Series Name drop-down box. Make sure that the target series is of the same data type as the source series or the source expression.
Click Save.
To delete a rolling data profile
Click the profile in the Profiles list.
Click Delete.
Click OK to confirm the deletion.
See also
"About Rolling Data"
To specify the active rolling data profiles
Select Engine > Rolling Data.
Click Configure.
The Configure Rolling Session screen appears.
To include a profile to run, drag it from the left list to the right list. Or to exclude a profile from the next session, drag it from the right list to the left list.
To change the order in which the profiles should be executed, drag the profiles up or down within the left list as required.
Click Save.
To execute the active rolling data profiles
You can execute the active profiles in several different ways:
You can execute the active profiles from within the Business Modeler. To do so, select Engine > Rolling Data. Then click Execute. Demantra immediately starts running the profiles that are currently listed in the Configure Rolling Session window.
You run the EXECUTE_PROFILES procedure from within a workflow.
You can run the INSERT_UNITS procedure. Depending on the value of the RunInsertUnits engine parameter, this procedure runs the EXECUTE_PROFILES procedure.
In any case, they are executed in the order in which they are listed in the Configure Rolling Session dialog box. For each active profile, Business Modeler copies the source data into the target series. Data for any given time bucket is copied into the same time bucket in the target series.
See also
"About Rolling Data"
"Preparing the Database"
Rolling profiles enable archiving or copying older data and comparing it with current data. (See About Rolling Data). Rolling Profile Groups facilitate data maintenance, by allowing you to organize profiles into business-relevant groups.
To configue a rolling profile group you must insert records into database tables via SQL. Therefore, this should only be performed by an experienced implementer or database administrator.
Rolling Profile Group Tables
Two tables are used to establish rolling profile groups and associate them with group member profiles. The ROLLING_GROUPS table establishes the name and ID of a rolling group, as shown below with sample data:
ROLLING_GROUPS
ROLLING_GROUP_ID | NAME | DESCRIPTION | IS_ACTIVE | APPLICATION_ID |
---|---|---|---|---|
1 | Demand Mgmt | Demand Mgmt profiles. | 1 | ROLLING_PROFILE:1 |
2 | SPF | SPF profiles | 1 | ROLLING_PROFILE:2 |
The ROLLING_GROUP_PROFILES tables is a one-to-many linking table associating the rolling profile group to one or more rolling profiles, as shown below with sample data.
ROLLING_GROUP_PROFILES
ROLLING_GROUP_ID | PROFILE_ID |
---|---|
2 | 144 |
2 | 145 |
2 | 156 |
1 | 63 |
1 | 64 |
Stored Prodedure: EXECUTE_PROFILES
The stored procedure EXECUTE_PROFILES() allows an optional parameter to be passed in specifying the name of a rolling profile group. If no parameter is passed, then the active rolling data profile series is run. (If there is no active rolling data profile series, the following error message is displayed: "There are no active profiles for ROLLING_UPDATES".)
Procedure for configuring a rolling profile group
Using an SQL tool for directly accessing the database, insert a new record into the ROLLING_GROUPS table.
Update the field ROLLING_GROUP_ID to a unique value.
Enter the group's name into the NAME field ("DM" and "SPF" are pre-seeded examples).
These two are the only required fields.
Insert a new record into the ROLLING_GROUP_PROFILES table for each profile you want to become a member of the group.
Update the field ROLLING_GROUP_ID with the value of the group's corresponding field of the same name from the previous table.
Update the field PROFILE_ID with the id of the profile you want to add to the group.
After these two tables are updated, you must go to the Workflow Editor and create a Workflow step to call the stored procedure. The procedure name will be "execute_profiles." In the parameters section, add the name of the new rolling profile group.