In Data Warehouse, the data are stored in a structured tabular form where each column provides some useful values. In MicroStrategy, the data values are represented by the objects called facts. But data values alone cannot provide insights to business users, so the attributes are created to rebuild the values in a different level or sector. Hence the facts depict actual data columns in the table whereas attributes describe the data.
In every project, the attribute creation is a crucial step next to fact creation. Therefore, in this article, we are going to walk around different methods to create an attribute.
Scenario:
Consider sales data, each product has different brands. To showcase the sales at the brand level, we must create an attribute on top of the brand column in the data warehouse. In our project, brand information is stored in LU_BRAND and LU_ITEM tables, so we are going to create a brand attribute with two forms(Id and description) using the following three methods.
- Attribute Editor
- Attribute Creation Wizard
- Architect
Attribute Editor:
1. In the Menu bar, select New, and then Attribute.
2. In the attribute editor, select the required column from the corresponding source table. In our case, we select BRAND_ID for our attribute Id form and validated the expression. Also, we are selecting the Automatic mapping method.
Mapping method:
- Automatic mapping method: All the tables with the columns used in the attribute form expression in the project are selected. So if required, we can unselect any tables.
- Manual mapping method: All the tables with the columns used in the attribute form expression in the project are not selected, but it will be available to select if required.
3. Since we have chosen the Automatic mapping method, all the tables with the attribute form column(BRAND_ID) are selected. In those tables, we have to choose the dimensional table containing all attributes form information as a lookup table. In our case, we have checked the LU_BRAND table as a lookup table that contains both Id and description information.
4. To create another form, select New in the attribute editor window and follow the above steps. For Brand attribute, we have created Desc form by pulling the BRAND_NAME column from the LU_BRAND source table.
5. Save and Update Schema to create the attribute.
Attribute Creation Wizard:
By using Attribute Creation Wizard, we can create many attributes at a time and it is faster compared to the previous method. By default, the wizard suggests the Id columns from warehouse tables to create attributes upon them.
1. From the Schema menu, select the Attribute Creation Wizard option.
2. In the ID Column Selection window, select the ID column for one or more attributes from the available columns.
3. In Description Column Selection, select the corresponding description column if available.
4. From Lookup Table Selection, choose the source table which contains all the selected attribute forms.
5. Finish and Update Schema to create the attribute.
Architect:
1. From the Schema menu, select Architect.
2. Choose the Project Tables View tab and select a table that includes column(s) for an attribute.
3. Right-click the column in the table and select the option called Create Attribute.
4. Save and Update Schema to create the attribute.
Data will talk to you if you’re willing to listen.
Jim Bergeson