Skip to main content

Overview

A Datagraph Entity Group is an output contract shared by several Datagraph Entities. It lets several Entities — one per country, per brand, or per recommendation algorithm — be interchangeable for the consumer that reads them. Open DataHub → Datagraph → Entity groupsDefine output contracts shared by a set of entities. The listing shows each group with its Name, the number of Fields in the contract, the number of member Entities, its Status (Draft or Live), and Last update, plus two actions: Edit and Delete. Create group opens the editor on a new Draft. Entity groups listing showing the listings_recommendations group with five fields, two entities and a Draft status

Before You Begin

  • The Entities you want to bind must exist and, to publish the group, must have a Live version. See Datagraph Entities.
  • Creating and editing groups requires the Datagraph Entity permission. See Permissions.

Editor Layout

The toolbar holds the group Name, the Save action, the Publish action, and a Versions side panel, exactly as in the Entity editor. Below the toolbar, two sections define the contract and its members. Entity group editor with the Name, Save and Publish controls, five output fields with their types and Required or Nullable toggles, and two member Entities marked Conform

Fields

Fields lists the outputs every member Entity must provide. Click Add field to declare one.

Entities

Entities lists the Entities bound to this contract. Pick them in Select entities…; each member then shows its Conformance: Conformance is checked against the Live version of each Entity, so an unpublished change to an Entity has no effect until it is published.

Conformance Rules

  • A required field must be present in the Entity output with a compatible type.
  • An optional field may be absent. When present, its type must still be compatible.
  • Two types are compatible when identical, or when they share the same primitive — datetime and datetime_iso both resolve to a date, for example.
  • Extra output columns returned by an Entity are ignored.
The contract is enforced on both sides. Saving or publishing a group fails with Entity group contract violated when a member does not conform. Publishing an Entity fails with the same error when its new output would break a Live group it belongs to, and an Entity listed in a Live group cannot be deleted.

Worked Example

The property listings model from Datagraph Entities has two Entities that return listings: recommended_listings and listings_matching_search. A Content that displays a listing card needs the same columns whichever Entity the Workflow selects. Bind both Entities to a group named listings_recommendations. Each shows Conform when its Live SQL returns the four required columns, and the Workflow can switch Entities without changing the Content. The same pattern applies to one recommendation Entity per algorithm in a retail model.

Saving and Publishing

Save validates the definition — a non-empty name, at least valid field names and types, and existing member Entities — then stores the Draft. Unsaved changes appears in the toolbar until you save. Click Publish to promote the Draft to Live. The Publish entity group dialog accepts an optional Commit message describing the change. The previous Live version becomes Inactive, and a new Draft copy is created so editing can continue. Publishing requires every member to be Conform; a member with No live version blocks the publication.

Versions

Open the Versions panel from the toolbar rail. Each card shows the version state, its field count, the author, and the commit message when one was provided. Click a card to load that definition into the editor — the editor asks for confirmation when you have unsaved changes. Save to make the loaded definition the new Draft. Entity group editor with the Versions panel open on the right, showing a Draft card with the group name, its field count and the author

Deleting a Group

Delete on the listing removes the group and all its versions. The dialog warns that Contents bound to this group will stop resolving; this cannot be undone. Member Entities are not deleted.

What’s Next?

Entities

Write the SQL and publish the Entities that join a group.

Schema

Add the columns and relations your SQL needs.

Query an Entity

Consume a published Entity in a Workflow.

Permissions

Grant the Datagraph Entity permission to your data team.