Create a Logical Data Model from Your Cloud Data Warehouse

For project administrators only

This tutorial guides you through the process of creating a logical data model (LDM) in your workspace using tables and views in your data warehouse (such as Snowflake, Redshift, or BigQuery). A newly created workspace does not have an LDM therefore you are going to create an LDM from scratch.

You create an LDM in the LDM Modeler. To do so, perform the following steps:

  1. Create a Data Source.
  2. Connect the Data Source to the LDM Modeler.
  3. Add datasets.
  4. Publish the LDM.

You can also create an LDM manually (Create a Logical Data Model Manually) or from CSV files with data (see Create a Logical Data Model from CSV Files).

When you are working on your LDM, the changes are automatically saved as a draft as you are making them. The draft is saved under your GoodData user, on the machine and in the browser it was created, and you can continue editing it whenever you are ready. When the LDM Modeler saves your draft, it displays a message and the time the draft was last saved.

The draft is kept until you either publish the changes to the workspace or manually discard the draft (in this case, the last published version of the LDM is loaded in the LDM Modeler).

Contents:

Create a Data Source

For the information about how to create a Data Source for a data warehouse, see Create a Data Source.

Connect the Data Source to the LDM Modeler

Steps:

  1. Go to the LDM Modeler (to learn how to access the LDM Modeler, click here).
    The blank canvas area opens.
  2. In the left panel, open the list of available Data Sources, select the Data Source that you created at the previous step, and click Connect.

    The Data Source is connected to the LDM Modeler, and the tables and views from the data warehouse are listed in the left panel.

    To review the details about a table/view, hover over the question mark icon next to its name.

    You are now going to add datasets based on those tables and views.

Add Datasets

You are now going to create datasets by importing the tables and views from the connected data warehouse to the LDM Modeler.

When a table/view is being imported, the LDM Modeler tries to auto-detect the types of the data in the table/view. The data can be detected as one of the following:

  • Measure (or fact), a numerical piece of data, which in a business environment is used to measure a business process (see Facts in Logical Data Models)
  • Attribute, data that is to be used in grouping or segmenting the values resulting from the computed functions (see Attributes in Logical Data Models)
  • Primary key, an attribute that serves as a unique identifier for a row of data in a table and as a connection point that allows you to connect this dataset to another dataset (see Connection Points in Logical Data Models)
  • Reference, a connection point (foreign key) from another dataset (see Connection Points in Logical Data Models)
  • Date, data representing dates
    Dates are managed through a separate object, the Date dataset (see Dates in Logical Data Models). If you are importing a table/view that contains dates, not one but two datasets will be added to your LDM: one Date dataset for the dates, and the other one with the rest of information from the table/view. These two datasets will be automatically connected with a relationship, and the Date dataset will become a reference in that other dataset.

Only the structure of the table/view is imported to the LDM Modeler. The actual data from the table/view is not going to be loaded from the table/view to the workspace.

Steps:

  1. To add a dataset, drag a table/view from the left panel and drop it in the blank canvas area.
    The data preview opens. The preview shows the data from the table/view and looks similar to the following:
     
    Based on the column names and the contents of those columns in the table/view, the column names and the types of the data are suggested for the dataset that will be created from this table/view.
  2. Review the suggested column names and the data types. Update them if needed.
  3. Once done, click Import.
    The table/view is imported, and the dataset is added to the LDM Modeler.
    Every column in this dataset is mapped to the appropriate column in the table/view in your data warehouse. During data load, the data from a column in the table/view will be loaded to the corresponding fact or attribute in the dataset. For more information about the mapping, see Mapping between a Logical Data Model and the Data Source.
  4. Repeat Steps 1-3 to add more datasets.
  5. Update the LDM if needed. For example, you may add or delete relationships between datasets, modify attributes or facts in the datasets, and so on. For more information, see Update a Logical Data Model.

    If you add a dataset manually or add an attribute or a fact to a dataset, make sure to map the newly added elements to the corresponding source columns. For more information about the mapping, see Mapping between a Logical Data Model and the Data Source.

Your LDM is ready. You can now publish it.

Publish the LDM

To publish the LDM, follow the instructions from Publish a Logical Data Model.

When asked to choose the mode of publishing, you can keep the pre-selected mode, Preserve data. In this tutorial, you are creating an LDM from scratch, and either publishing mode will work well because there is nothing to break at this point.

After you have published the LDM, you can deploy processes for loading data (see Deploy a Process for Automated Data Distribution v2) and schedule them to load data regularly (see Scheduling a Process).


Powered by Atlassian Confluence and Scroll Viewport.