MicroStrategy ONE

Metadata partition mapping

Metadata partition mapping is the mapping of partitions where the mapping of partitions is performed and maintained in the project metadata by the application, in this case, MicroStrategy. MicroStrategy manages the mapping between the logical table and the physical tables. This approach makes it easier for you to specify a flexible partitioning schema.

In metadata partition mapping, you specify one or more partitioning attributes in the Metadata Partition Mapping Editor. Next you define what attribute elements within those attributes should point to which PBT. You create all of the rules for choosing the appropriate PBT here and the rules are stored in the MicroStrategy metadata.

If you have the MultiSource Option (see Accessing multiple data sources in a project) you can also support fact tables that are partitioned across multiple databases.

For steps to create a metadata partition mapping, refer to the MicroStrategy Developer Help.

Homogenous and heterogeneous partitions

Metadata partitions can be homogenous or heterogeneous. With heterogeneous partitioning, the PBTs can have different amounts of data stored in them at different levels. For example, one table can contain six months of sales data, while another stores an entire year. The PBT level, or key, refers to how the data is stored. For example, sales data for the current year can be stored at the daily level, while historical sales data is saved by month only. Heterogeneous partitions can therefore require additional long-term maintenance and organization because the data contained in them is stored at various levels throughout the partition.

MicroStrategy stores one PBT level for each partition. If all the PBTs within a partition are not stored at the same level, the highest PBT level is used as the PBT level of the partition. For instance, if all the sales data in the previous example is stored in one partition, you cannot access current sales at the day level. This is because the PBT level for the partition is month, which is higher than day. If you save current data in a partition at the daily level and the historical data in another partition at the month level, you are able to fully access the data.

In contrast, homogenous partitions must have the same amount of data stored at the same PBT level. The logical structure of the PBTs must be the same, that is, they must have the same facts and attributes defined. To continue with the previous examples, each table must store one year of data at the month level. Homogeneous partitions work well for frequently-accessed data such as information about the previous year.

When you define the particular PBT to which an attribute is linked in MicroStrategy, you do not need to specify whether the PBT is homogeneous or heterogeneous. MicroStrategy makes the distinction automatically depending, in part, on how the data is stored in the PBT.

Data slices

After PBTs are created, you define a data slice. The data slice acts as a filter that describes what portions of data are placed in the partition table. Based on this data slice, the MicroStrategy engine knows which table to get data from when generating the SQL.

A data slice holds the parameters that a partition is based upon, for example, Month=January. Instead of retrieving data for all months, the server knows to access a particular table that contains the data for January only. By creating a data slice with the partition, you can retrieve specific data quickly without time-consuming joins and searches.

It is important to create a reasonable and valid data slice because MicroStrategy cannot verify its accuracy or relevance. The data slice must make sense for the data. A poorly crafted data slice can lead to errors from generating incorrect SQL and retrieving the wrong data.

Data slicing displays and can be modified only for the metadata partitioning. Each partition mapping table must include at least one data slice. In a heterogeneous mapping, data slices can exist at different levels and can be composed of different keys.

Attribute qualifications

To create data slices, you use attribute qualifications. Attribute qualifications are types of filters that are applied to attribute forms. These qualifications allow you to limit the type and amount of data that is returned for a report. For example, if you create a report that contains the attribute Country but you want to return only the data for France, you can create a qualification on the attribute Country and select France as the element that appears on the report.

For steps to create a data slice, refer to the MicroStrategy Developer Help.