Pyramid uses heuristics for a range of purposes in the data modeling process, in order to build the data model in the most efficient way. Heuristics are used to create relationships between the model’s tables, to define measures, to categorize various columns, and to organize data into logical folders. The heuristic processes reduce the amount of time and effort required by the model-builder and help ensure data model is built in a logical and navigable way.
There may be times when you want to make changes to parts of the data model that were determined by heuristics. Pyramid ensures that it is easy to make such changes.
Heuristics are used to define the relationships between the data model's tables. These relationships are seen from the Tables stage of the Model Lite wizard, where they can be edited. They can also be edited later, from the Model Pro module.
When editing the relationships, you can change the join type, change the direction of a join or make it bi-directional, add or delete joins, and add new join keys to existing relationships.
You can also determine how the logic behind the auto-relationship algorithm should be defined. To do this, right click on the canvas and go to the Auto-Relationship sub-menu:
- None: do not use any auto-relationship algorithm, and instead define the relationships manually.
- Use Primary Key as the First Column: by default, this algorithm is used to define relationships between the tables. It takes each table's primary key column and looks for tables that contain the same column as a foreign key.
- Match by Table Name: defines relationships by matching tables my name.
- Match by Column Name: defines relationships by matching columns by name.
Heuristics are used to ensure that key columns are not visible in the tables, meaning that columns containing keys will not be added as attributes in the data model.
Pyramid also detects numeric decimal columns, marks them as not visible, and defines them as measures. This means that measures, when hidden, will appear in the Data Model's Measures folders only; if a measure is made visible, it will appear in the model as both an attribute and a measure.
Heuristics are used to detect date-time and geospatial columns and assign the appropriate category to them. Categories are important as they enable various functionality later. For example, geospatial columns must be assigned the correct category in order to be used in mapping visuals. In the image below, the geospatial columns have been categorized and are denoted by the globe icon:
Pyramid uses heuristics to detect measure columns and assigns them to the Sum measure type. You can change the measure type and measure format from the Measure Editor in Tables, or from Columns.
Heuristics are used to generate logical measure folders and organize the model’s measures into those folders. You can easily change or rename measure folders from Columns
Using heuristics, Pyramid organizes regular and drill-path hierarchies into folders within their respective table. Time intelligence columns are also organized into a ‘Time Intelligence’ folder.
In the image below, the time intelligence columns have been automatically placed in the time intelligence folder (yellow arrow). They have also been organized into 2 hierarchies, located in the Hierarchies folder (green arrow).
Each date-time column is denoted by a clock icon, indicating that they have been categorized.