MicroStrategy Desktop allows us to build ad hoc schemas in intuitive ways using a friendly interface. Ad hoc schemas help business users to achieve quicker values. The core of the ad hoc building process is Data Import, which has many features such as auto-detect attributes type, auto-create metrics, auto-identify data relations, and allows us to preview data. In addition, it allows us to combine data from multiple sources in a single dataset, create multi-form attributes, and create and edit relationships across attributes. Finally, it can be mapped to project attributes in order to inherit project security filters in MicroStrategy Enterprise.
We are going to work with relational databases and use the same source as we used in Chapter 2, Setting Up an Analytics Semantic Layer and Public Objects when we built schemas. There is a picture from CA ERwin Data Modeler, that displays physical data models. Using this model, we can easily identify what tables we need and what the joins are between tables.
Let's connect to Oracle database and build an ad hoc schema:
localhost
1521
orcl
system
MasterinBI2016
Before we finish, we should define the joins between tables, attributes, and metrics.
INNER JOIN
will be created. These are the join conditions:
# |
Join Conditions |
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
MicroStrategy Desktop can automatically map the same columns. We should be careful and unmap all columns that do not service joins between tables.
Now we are ready to build a new dashboard but before we actually start to realize our dashboard, let's discuss several very important terms from the world of data analytics and dramatically increase the flexibility and power of MicroStrategy Desktop:
Let's try to understand how we can leverage these features in MicroStrategy Desktop.
First of all, we need to add one more table to the existing ad hoc schema. There is an Excel spreadsheet that you can find in the attachment for this chapter - Geography.xls
.
Let's try to mashup data with a relational database and an Excel spreadsheet:
Geography.xls
and click Add. It will automatically join the fact table with GeographyKey
.
We can examine our data and fix some issues. In order to examine data we should use data profiling by clicking on the column name and choosing Text Selector. Let's do it for State Province Name and City. There are some issues with the data:
There are two values for New York
and two values for München
. Let's fix it by clicking Edit, which appears near the value when we choose it.
We are done with data wrangling. Click Ok.
MicroStrategy will understand that is it geodata and will transform these attributes to geodata. There is one very useful feature - data enrichment. For example, if we have only the zip code, MicroStrategy can look up the country, state, and city for us. We don't need this because our data file already has provided all this data.
Click on Update Dataset and we are ready to work with our ad hoc schema.