Update a Logical Data Model

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 or delete attributes/facts
  • Edit attributes or facts in a dataset
  • 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.

Contents:

Open the Logical Data Model in the LDM Modeler

Steps:

  1. From the Data Integration Console (see Accessing Data Integration Console), click Projects to open the Projects page, and click the name of the project where you want to update the logical data model.
  2. Click Model data on the top.
    The current LDM opens.

Update the LDM

Perform one or more updates as you need.

Add a dataset

  1. Drag Empty dataset from the left panel and drop it in the blank canvas area.

     
  2. Name the dataset.

Add an attribute to a dataset

  1. In the dataset, click the ABC button.

     
  2. Name the attribute.

Add a fact to a dataset

  1. In the dataset, click the 123 button.

     
  2. Name the fact.

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

Select the attribute, and click Add 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, fact, or label

Select the attribute, fact, or label, and click Delete.

You cannot delete the default label of an attribute. For more information about labels, see Attributes in Logical Data Models.

Rename a dataset

Double-click the dataset name, and enter a new name.

Set the primary key in a dataset

  1. Select the dataset, click More... -> Set primary key.
  2. Select the attribute that should become the primary key, and click Set key.

Add a Date dataset

  1. Drag Date from the left panel and drop it in the blank canvas area.

     
  2. 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.

  1. Select the dataset.
  2. 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.
  • Overwrite
    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.

Steps:

  1. 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.
  2. 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).