Data 360 Inspector

Features · Data pipeline

Data models

The data model as a diagram, and exports for Mermaid, draw.io and Excel.

Video coming soon.

From the article What does this org's data model look like? A list, a diagram and a document to hand over (part 12 of the series).

Every Data Cloud project I join starts with the same request: "Can you send me the data model?" What people want is a picture of the Data Model Objects (DMOs) in use, how they relate, and what feeds each one. Data Cloud has a data model view, and it is fine for looking at a few objects. It does not give you a file to put in a design document, and it does not answer "which of these DMOs does anything fill?" in one place.

Today follows the data one step further, from the Data Lake Objects (DLOs) the streams fill into the DMOs they are mapped to.

The list

Data models opens with a table of DMOs. By default it shows Mapped DMOs, the ones with something mapped into them, because those are the model the org uses. All DMOs shows every DMO in the data space, including the standard ones nothing fills. The line above the table says how many are shown out of how many in total.

The table has five columns:

  • Data model object, with its label and API name, linked to Objects.
  • Category, such as Profile, Engagement or Related.
  • Fields, the number of fields.
  • Mapped from: each DLO mapped into it, with the number of mapped fields and the data stream that fills that DLO.
  • Used by: how many calculated insights and segments read it.
Data models in Table view with Mapped DMOs, "32 of 61 DMOs (with something mapped into them)", sorted by Used by, largest first: Individual (Profile, 22 fields, mapped from Contact_Home__dll and Training_Site_identity_066D92A9__dll, used by 6), Contact Point Email (used by 2), Personalization Log (2), then Personalization Decision, Personalization Point, Personalizer and Website Engagement with 1, then Account, Account Contact, Contact Point Address and Contact Point Phone with nothing in Used by.

In my demo org, 32 of 61 DMOs have something mapped into them. One click on Used by sorts largest first: seven of the 32 are read by a segment or a calculated insight, Individual most of all with 6.

The Used by count is the quickest way I know to spot a DMO that was mapped during a build and then never used. A mapped DMO with nothing in Used by is worth a question, though activations and data graphs are not in that count.

The document

The Download menu turns the list into a document for handovers and audits, in Markdown, Word, PDF or HTML. For every DMO in the table it writes the category and primary key, every field with its label and type and what uses it, the relationships to other objects with their cardinality, each mapping field by field with the stream behind it, and the calculated insights and segments that read it.

Excel gives the same information as three sheets: Data models, one row per DMO; Fields, one row per field with its mapping and usage; and Mappings, one row per mapped field with its source DLO, source field and stream.

Both follow the table as you see it, after search, filters and sorting, so filtering to the Profile category first gives a document about the profile model only.

The diagram

Diagram draws the DMOs in the table as boxes with the relationships between them, laid out automatically. Each box has a coloured stripe for its category (Profile, Engagement, Related, Other), its label and API name, and its fields.

Data models in Diagram view of the 32 mapped DMOs (32 boxes, 63 relationships), Fields on Keys and joins, with Individual selected: its box shows ssot__Id__c as PK and ssot__PartyId__c and ssot__PrimaryAccountId__c as FK, the engagement and contact point boxes around it join to it with N:1 lines, unrelated boxes are faded, and the side panel lists "Drawn connections (17)" such as Party, Website Engagement and Contact Point Phone with the fields on each side.

The toolbar above it sets what is drawn:

  • Fields: Keys and joins (primary keys and the fields a drawn relationship uses), All fields, or None.
  • Data lake objects mapped in, a tick box that adds the DLOs as dashed boxes with an arrow to each DMO they map into.
  • Find a box, which centres the diagram on the object you type.

Drag the background to pan, use the wheel to zoom, drag a box to move it. The keyboard works too: plus and minus zoom, 0 fits the diagram to the window, Esc clears the selection. Lay out again puts every box back where the layout wants it.

Click a box and the rest of the diagram fades. A panel opens with the object's primary keys and every drawn connection, with the fields on each side and the cardinality. It also says how many relationships go to objects not in the diagram, which is the hint to switch to All DMOs.

Like the document, the diagram draws what the table shows. Searching the table for "order" before switching to Diagram gives a picture of the order model alone, which is often what a design review needs. For the image I kept all 32 mapped DMOs and used Find a box to go to Individual, then clicked it.

Exports

Export, at the top right of the diagram, offers:

  • SVG image and PNG image, the drawing as you see it, moved boxes included.
  • Markdown with Mermaid: a document with the diagram as a Mermaid entity relationship diagram and the relationships as a table.
  • Mermaid on its own, and Copy Mermaid. Mermaid renders on GitHub, in Notion and in many Markdown tools.
  • draw.io, with the boxes where they are on your screen, so you can tidy the layout in the Inspector first and finish in diagrams.net.
  • Graphviz, for anyone who wants to render it with dot.
  • Open in Diagramforce, which sends the diagram (names only, no data) to diagramforce.com. It is on by default, can be turned off in Settings, and administrators can block it.

The draw.io export is the one I use most, because a client's architect can edit it without knowing anything about Data Cloud.

How it reads the org

The list and the diagram come from the object metadata the Inspector already keeps per org, and the mappings of every DMO, read one call per DMO, a few at a time. On a large org the first visit says "Reading mappings" with a count. After that, everything is kept in this browser with the other org details and opens at once.

Limits

A few things to know:

  • Used by counts calculated insights and segments only. Activations, data graphs and Personalization are covered by Impact (Day 25).
  • Relationships are the ones the metadata lists. A join that people make in SQL but that is not defined in the data model does not appear.
  • Moved boxes are not kept: changing the fields option, the objects shown or Lay out again resets the layout.
  • With All DMOs on a large org, the diagram has many boxes. It works, but a filtered table makes a better picture.
  • If the automatic layout fails, the boxes are placed in a grid instead, sorted by name.