Creates or updates a star schema by exporting data for all cells that intersect the specified dimension members. CreateStarSchema launches an asynchronous thread.
CreateStarSchema provides arguments to specify the dimension members for the extraction. You can specify members using any of the following techniques:
To export data with CreateStarSchema, the connected user must be assigned to the Application Administrator role. To check whether the user is assigned to this role, use the HsvSecurityAccess method IsApplicationAdministrator.
<HsvStarSchemaACM>.CreateStarSchema bstrDSN, bstrTablePrefix, ssPushType, eaExtractType, vbExcludeDynamicAccts, varaScenarios, varaYears, varaPeriods, varaViews, varaEntities, varaParents, varaValues, varaAccounts, varaICPs, varaCustom1, varaCustom2, varaCustom3, varaCustom4
String (ByVal). The Extended Analytics Data Source Name that points to the database for the star schema. To get the Extended Analytics Data Source Names that have been registered on an application server, use EnumRegisteredDSNs. | |
String (ByVal). The Relational Table Prefix, which is the prefix that identifies the star schema’s tables. If a star schema identified by this prefix does not exist, CreateStarSchema creates a new set of tables. If the star schema exists, the tables are updated; the ssPushType argument determines whether all data is deleted from the <PREFIX>_FACT table. | |
SS_PUSH_OPTIONS (ByVal). A flag that specifies whether to create a new star schema or update an existing star schema. Valid values are represented by the following constants (from Enum SS_PUSH_OPTIONS): | |
= 7, = 7 } EA_EXTRACT_TYPE_FLAGS; EA_EXTRACT_TYPE_FLAGS (ByVal). A flag that specifies the aggregation to use. Valid values are represented by the following constants (from Enum EA_EXTRACT_TYPE_FLAGS):
| |
Boolean (ByVal). A flag that specifies whether to exclude dynamic accounts. Pass TRUE to exclude these accounts, FALSE to exclude them. | |
Variant (ByVal). The Scenario dimension members for which to extract. | |
Variant (ByVal). The Year dimension members for which to extract. | |
Variant (ByVal). The Period dimension members for which to extract. | |
Variant (ByVal). The View dimension members for which to extract. | |
Variant (ByVal). The Entity dimension members for which to extract. For each specified member, you must specify a corresponding parent member in the varaParents argument. | |
Variant (ByVal). The parents of the varaEntities argument’s entities. | |
Variant (ByVal). The Value dimension members for which to extract. | |
Variant (ByVal). The Account dimension members for which to extract. | |
Variant (ByVal). The Intercompany Partner dimension members for which to extract. | |
Variant (ByVal). The Custom 1 dimension members for which to extract. | |
Variant (ByVal). The Custom 2 dimension members for which to extract. | |
Variant (ByVal). The Custom 3 dimension members for which to extract. | |
Variant (ByVal). The Custom 4 dimension members for which to extract. |
The following subroutine uses the dimension members selected on an HsvPOVSelection control to export data to a Standard star schema. HsvPOVSelection.GetCheckedItems is used to build an array of selected members and a second array of parent Entity members. These arrays are passed to CreateStarSchema along with the DSN and Relational Table Prefix.
Sub ExtractStarSchema(sDSN As String, sPrefix As String) Dim i As Long, vaMems(12), vaPars, vTemp ' for each of the 12 dimensions... For i = 0 To 11 'For the entity dimension, get the parents If i = DIMENSIONENTITY Then 'cFormPOV represents an initialized HsvPOVSelection control cFormPOV.GetCheckedItems i, vaMems(i), vaPars Else ' else, ignore parents cFormPOV.GetCheckedItems i, vaMems(i), vTemp End If Next ' g_cStarSchema is a previously set HsvStarSchemaACM instance g_cStarSchema.CreateStarSchema sDSN, sPrefix, _ ssCREATE, EA_EXTRACT_TYPE_STANDARD, True, _ vaMems(DIMENSIONSCENARIO), vaMems(DIMENSIONYEAR), _ vaMems(DIMENSIONPERIOD), vaMems(DIMENSIONVIEW), _ vaMems(DIMENSIONENTITY), vaPars, vaMems(DIMENSIONVALUE), _ vaMems(DIMENSIONACCOUNT), vaMems(DIMENSIONICP), _ vaMems(DIMENSIONCUSTOM1), vaMems(DIMENSIONCUSTOM2), _ vaMems(DIMENSIONCUSTOM3), vaMems(DIMENSIONCUSTOM4) End Sub