Populating a fact table
Populating fills a fact table automatically: instead of picking elements one by one, you name a base database table and the system selects the measures, dimensions and facts of the RMD that belong to it, together with everything their formulas depend on.
The base DB table
The Base DB table field of the fact table creation and editing dialog defines what a populate run is based on. The value is chosen in two steps — connection, then table — and can be cleared. A fact table can exist without a base table, but it cannot be populated until one is selected.
Starting a populate run
| Situation | What happens |
|---|---|
| A base table is selected while creating a fact table | On Save the dialog Populate fact table appears: "Do you want to automatically populate the fact table with measures, dimensions, and facts from the RMD based on the selected base DB table?". Populate automatically creates the fact table and populates it; Create empty only creates it |
| The base table is changed while editing a fact table | The dialog Repopulate fact table appears and explains that the current configuration will be replaced with one generated from the new base table. Repopulate confirms, Keep as is cancels |
| On demand, from the canvas | The Repopulate button in the toolbar of the Configuration tab opens the same confirmation. If the fact table has no base table yet, the fact table editing dialog opens instead so that one can be selected |
Populating requires the Developer access level or above in the project (Developer, Administrator, Super administrator).
How the selection is made
The run reads the RMD of the current project version; it does not query the connected database and does not change anything in it.
- Every dimension, fact and measure whose Connected source points at the base table is selected. When a schema is part of the base table, it must match as well
- Selecting a dimension that belongs to a dimension group brings in the whole dimension group and its dimensions, except derived ones
- The set is then extended step by step with the elements whose formulas reference only elements already selected. Constants are always available as dependencies
- The run stops and reports nothing if the formulas contain a circular reference
What repopulating changes
- Composition. The result replaces the current composition of the fact table: newly matched elements are added, and elements that are currently attached but not part of the new result are removed from the fact table. This is what the confirmation dialog warns about. Dimension groups are never removed automatically
- Column mappings. Mappings to physical columns are not touched. They are stored on the RMD element, on the dimension group and on the relationship, and a populate run neither reads nor rewrites them
- Positions. Elements that survive keep their saved position on the canvas. Only new elements are placed automatically: measures are arranged by the level of their formula dependencies, and dimension groups around the fact table. Database tables already on the canvas keep their positions
- Canvas cleanup. Database tables that are left without any mapping are removed from the canvas after the run
Removing a measure or a dimension from a fact table does not delete it from the RMD.
Saving the result
A populate run does not save by itself. The proposed configuration is loaded onto the canvas and the Save button becomes active; the fact table changes only when you save. Leaving the page beforehand triggers the usual unsaved-changes warning and discards the result.
While the run is in progress the canvas is covered by a loading indicator. There is no progress bar.
Warnings
| Message | Meaning |
|---|---|
| "Circular dependencies detected. The populate operation has been cancelled. Please review and fix the circular references in your formulas before populating." | Formulas in the RMD reference each other in a loop. Nothing is changed |
| "No measures, dimensions or facts could be auto-selected for the chosen base table. The current fact table configuration has been left unchanged." | No RMD element points at the chosen base table. Check the Connected source of the elements you expect to be selected |
Notes:
- Populating is based entirely on the Connected source values recorded in the RMD, so it only produces a result after the elements have been mapped to database columns
- The physical structure of a connected database — its tables and columns — is refreshed in the Connections section, not here