For project administrators only
In a typical workflow, you may need to update the logical data model (LDM) in your workspace from time to time using GoodData LDM Modeler. For example, when you add a table to your source data, you have to add a dataset to your LDM to keep the source data and the LDM synchronized. You may need to establish new relations between datasets or update properties of facts or attributes.
Updating the data model may include the following tasks:
- Add or delete datasets
- Add or delete relations between datasets
- Add, delete, or move attributes and facts
- Edit attributes or facts in a dataset and manage field mapping
- Set a primary key in a dataset
Every time you update the LDM, you have to publish it to the workspace and then create the updated version of the Output Stage.
Open the Logical Data Model in the LDM Modeler
To learn how to access the LDM Modeler, click here.
Update the LDM
Perform one or more updates as you need.
Add a dataset manually
- Drag Empty dataset from the left panel and drop it in the blank canvas area.
- Name the dataset.
Add a dataset from a CSV file
If you have a CSV file with data, you can use it to create a dataset. For more information, see Create a Logical Data Model from CSV Files.
Add a fact to a dataset
- In the dataset, click the 123 button.
- Name the fact.
Add an attribute to a dataset
- In the dataset, click the ABC button.
- Name the attribute.
Move a fact or an attribute between datasets
When you move a fact or an attribute from one dataset to another, the identifier of the moved object does not change. This preserves the measures, reports, and dashboards where the moved object is referenced by its identifier.
For example, if you are moving the Department ID attribute from the Payments dataset to the Departments dataset, the initial attribute identifier (
attr.payments.departmentid) will remain the same.
You cannot move the attributes that are used in the dataset's primary key.
When an attribute is moved, all its labels are moved together with it, and their identifiers do not change.
- In the dataset, click the attribute or fact that you want to move, click the menu button, and click Move.
- Select the dataset to move the attribute or fact to, and click Move.
Delete a fact or an attribute from a dataset
You cannot delete the attributes that are used in the dataset's primary key.
- In the dataset, click the attribute or fact that you want to delete, click the menu button, and click Delete.
- Confirm the deletion.
Manage facts and attributes in a dataset
Select the dataset, click More... -> View details.
The dataset details dialog opens that lists all the dataset facts and attributes.
This dialog allows you to manage the facts and attributes in the dataset and edit their properties.
When you are done with updating the facts and attributes, click Save changes.
Add a label to an attribute
Hover over the attribute, click Add label, and name the label.
Rename an attribute, fact, or label
Click the name of an attribute, fact, or label, and enter a new name.
Change the data type of an attribute, fact, or label
Click the current data type and select a different one from the dropdown. For more information about the supported data types for those objects, see Attributes in Logical Data Models and Facts in Logical Data Models.
Delete an attribute label
Hover over the attribute label, and click the bin icon.
You cannot delete the default label of an attribute. For more information about labels, see Attributes in Logical Data Models.
Manage field mapping in a dataset
You can load data from a CSV file to a dataset directly in the LDM Modeler. For you to be able to do so, each field (fact or attribute) in the dataset must be unambiguously mapped to a column in the CSV file. During data load, the data from a column in the CSV file will be loaded to the corresponding fact or attribute in the dataset.
For more information, see Update Data in a Dataset in the Logical Data Model.
Rename a dataset
Double-click the dataset name, and enter a new name.
Set the primary key in a dataset
- Select the dataset, click More... -> Set primary key.
- Select the attribute that should become the primary key, and click Set key.
Add a Date dataset
- Drag Date from the left panel and drop it in the blank canvas area.
- Name the dataset.
Delete a dataset
Select the dataset, click More... -> Delete, and confirm the deletion.
Add a relation between datasets
Creating a relation requires a primary key in the dataset with the data that you want to use to help analyze the other data. For more information about the primary key, see Connection Points in Logical Data Models.
- Select the dataset.
- Click the blue dot on the right border of the dataset and drag the arrow that appears to connect the dataset to the other dataset.
The relation is created.
Delete a relation
Select the relation and click the bin icon that appears.
Publish the LDM
When you are done with updating the LDM, publish it to the workspace.
When you publish an LDM, the LDM Modeler asks you to choose the mode of publishing. You can choose one of the following:
- Preserve data
The LDM is published only if publishing does not delete any existing data.
Use this mode when your edits do not include deletion of any current data from the LDM. If you deleted anything by mistake, the publishing process fail, and no changes will be made to your current LDM. This helps prevent unintentional deletion of objects or relations from the LDM and potential data loss.
The LDM is published regardless of whether any data is going to be deleted.
Use this mode when you need to delete some objects or relations from the LDM.
Use the Overwrite mode carefully.
If an LDM update includes the deletion of facts or attributes that are currently used in any metric, report or dashboard in your workspace, those metrics, reports or dashboards will stop working and may cause data inconsistency or loss. The publishing cannot be undone.
- Click Publish to publish the LDM to the workspace.
You are prompted to choose the mode of publishing. The Preserve data mode is selected by default.
- Choose the mode, and click Publish.
The publishing process starts. When the publishing completes, you see a message that the LDM has been published. Close this message.
After you have published the LDM, update the Output Stage to synchronize it with the updated LDM (see Create the Output Stage based on Your Logical Data Model).