Build a Logical Data Model
A logical data model (LDM) is an abstract view of your data in GoodData. You can think of LDM as a single source of truth for analytics. It provides the following two major added values:
Ease data structure changes. Organizations tend to have complex data structures that can change anytime and break analytics. For example, a change of column name can break visualizations and metrics, and you can either change the column name or fix all visualizations and metrics. To solve this challenge, a single source of truth (LDM) can prevent analytics from breaking. You define LDM only once and build all visualizations and metrics above it without worrying about the column name change. If the column name changes (or anything will change), you will fix it only in LDM, and your analytics will work.
Curated analytics experience. Curated analytics experience Without LDM, end-users could use/combine attributes and facts freely, but the results could be wrong. With LDM, we guide users on what they can combine to get valid results.
Do you want to learn more? Check our course understanding the Logical Data Model.
You can create an LDM automatically. GoodData scans your database schema, reads its metadata and suggests the LDM based on the tables and views in your database.
- The tables and views are converted to datasets.
- Attributes and facts in the datasets are derived from the table columns based on their data types.
- Primary keys and references between datasets are detected from referential integrity stored in the database.
To make sure that your data is interpreted correctly, learn what rules are applied when the LDM is created and make sure that your database follow them.
In order to create a logical data model (LDM), you must connect a data source. For more information, check the previous article connect data.
Click the Data tab.
The LDM Modeler opens.
Click Create model.
The LDM Modeler is switched to edit mode. You can see the registered data sources in the left panel. If you connected the database with the demo data, you can see the
Click Scan now under the data source.
The scan dialog opens.
Keep the predefined options as is, and click Scan.
Your database schema is scanned and stored inside the data source entity as physical data model (PDM). You can see all scanned tables and views listed as datasets on the left panel, below your data source.
Open the menu on your data source and select Generate logical data model.
The Generate LDM wizard dialog opens.
Instead of using the wizard, you may drag and drop the datasets into the LDM manually. If you drag and drop a dataset into the LDM, any other datasets referenced by that dataset will be added as well.
Leave the settings as they are and click Generate.
The LDM is generated.
At this point, the LDM is not published to your workspace yet. You are going to publish it.
Click Publish (in the top right corner) to publish the logical data model to workspace.
The publishing dialog opens.
Click Publish in the dialog.
The publishing process starts. When the publishing completes, you see a message that the LDM has been published.
Once you have created the LDM, you can start building dashboards and visualizations.