SSAS - Retrieve multidimensional database objects directories
Problem:
I am trying to list all objects (Cube, dimension, partition, ...) found in a SSAS server. I am able to do that using the following project:
I am trying to list all objects (Cube, dimension, partition, ...) found in a SSAS server. I am able to do that using the following project:
I am trying to retrieve the relevant directory (within the data directory) for each object. I am unable to do that since files names contains some Incremental number that change each time you made changes to the objects in the database. Example:
- Cube name: TestCube
Folder:
|Data Dir|\<SSASDB>\TestCube.0.cub
After changing and reprocessing the Cube it changes to another value
|Data Dir|\<SSASDB>\TestCube.1.5.cub
Is there is a property in AMO classes that returns the Folder Path of each object? What is the value of the Incremental number included in the Folder name? Is there some workaround to do that?
Since i only have SQL Server Data Tools Business Intelligence tools installed i need a solution compatible with SSIS script Task since it is the only way that i can process the data. Note that there are many articles online for using AMO from script task
Solution:
SSAS Data directory contents hierarchy
After building many multidimensional Cube using SSAS, i can assume that the following tree is the Data directory hierarchy:
|- Data Directory
|- Database (.db)
|- Dimension (.dim)
|- Role (.role)
|- Mining Structure (.dms)
|- Data Source (.ds)
|- Data Source View (.dsv)
|- Multidimensional Cube (.cub)
|- Measure Group (.det)
|- Partition (.prt)
|- AggregationDesign (.agg)
Each object from the tree above can be stored in form of a directory or/and an XML file.
The Actions and Kpis information are stored within the Cube XML configuration file.
Example:
- Object: Cube
- Directory:
<DataDir>\<database>\<cube ID>.cub\
- XML file:
<DataDir>\<database>\<cube ID>.cub.xml
Link SSAS AMO objects to data directory files
Reading data using AMO
To read SSAS object from deployed Analysis Cube, i improved the code of the following project to add more objects and to link them with the relevant directories/files.
Comments
Post a Comment