Generate a Physical Data Model in the LDM Modeler
A physical data model (PDM) describes the tables of your database and represents how the actual data is organized and stored in the database. The logical data model (LDM) is then mapped to the PDM and ultimately determines your analytical options when you build insights and dashboards.
To generate the PDM, do the following:
Check the Data Types in Your Database
Review this section and adjust your database as needed to make sure the columns that you want to include in the PDM have the supported data types assigned.
Columns with an unsupported data type (for example, when the UUID
database data type is mapped to the OTHER
JDBC data type) are skipped and not included in the PDM. You will get the following warning during the generation of the PDM:
Column <column_name>
Data type <data_type> of column is not supported
Generate the PDM
Steps:
Open your workspace.
Click the Data tab.
The LDM Modeler opens in view mode.
Click Edit (or Create model, if it’s your first time setting up a PDM in this workspace).
The LDM Modeler is switched to edit mode. You can see the registered data sources on the left panel.
If you do not have any data source, you cannot generate the PDM. Create a data source first.Under Data Sources select your data source.
Click Scan now.
The scan dialog opens. By default, only tables are selected for scanning.
If you want to also scan the views, select the Scan views check box.
Choose the scan mode.
Choose the mode carefully. If you have made breaking changes in your database (for example, dropped a table mapped to the existing LDM), the related metrics or insights will stop working. If an insight cannot be displayed, a generic error message is displayed. A user-friendly error message is available via the browser’s developer console. If a mapped table or column does not exist, an error message contains information sufficient for troubleshooting.Append to the existing model appends new objects and does not touch the existing objects.
Use this option if you want to add new objects to the existing PDM or if you want to scan for newly created tables and views in your database without affecting the existing PDM.
Update the existing model appends new objects and replaces the existing ones. If the current PDM contains tables/views that are no longer in the database, these tables/views remain untouched.
Replace the existing model replaces the current PDM with the newly scanned PDM. If the current PDM contains tables/views that are no longer in the database, these tables/views are deleted.
If the Replace the existing model mode seems too destructive, you can update the declarative definition of the PDM and store it under the corresponding data source using the API.
Click Scan.
The scanning process starts. It scans the physical tables/views in your database so that you can then map the LDM components to the tables and columns in your database through the PDM.
When the scanning completes, you can see the tables created from your database.
Once you have the PDM generated, you can either automatically generate the LDM from the stored PDM (using the API or in the LDM Modeler) or create it manually in the LDM Modeler.
Refresh the PDM
If your database schema changes, you may refresh your schema by shift clicking the refresh icon:
- click: Reload PDM from your data source, in case it was changed via API. This does not change the PDM in data source.
- click + shift: Open the Scan Data Source dialog to scan PDM from database. This does changes PDM in the data source.