Skip to content
  • There are no suggestions because the search field is empty.

Relationships amount (Business Rule)

Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle

This business rule checks the number of relationships of a model object against the number its type needs. It raises an error, which blocks generation in the client until you fix it. The rule ID is ID-10004.

Message

The client shows an error with this text on the model object. <model object name> and <type> stand for its name and type, <amount> for the required number, for example above or equal to 1.

Model object '<model object name>' of type '<type>' has the wrong amount
of relations defined. The amount of relations to model objects should be
<amount>.

On the model object card, point to the error icon to see this message with the rule ID: Error ID-10004. The Generate Artifacts page lists the message without the ID.

Error popup of a Mart Fact card with Error ID-10004 and the message details

For some types, the details also name the related model object types, for example to model objects of type Hub should be exactly 1.

Cause

The model object has more or fewer relationships than its type allows:

  • None: Stage, Store Entity, Store Composite, Core Composite, Mart Dimension, Mart Composite, Mart Out, Mart Hierarchy Flatten, Hub, Reference Table, RawVault Composite, Vault Out, Current View and History View.
  • At least 1: Fact, Mart Fact, Link and PIT. A PIT relates to satellites, not directly to a Hub or Link.
  • At least 2: Same As Link, Hierarchical Link and Driving Key Link.
  • Exactly 1 to its Hub or Link: the satellite types.

The Business Vault variants follow their Data Vault types.

Fix

Add the missing relationship, see Add a Relationship, or delete the extra one, see Delete a Relationship. The error disappears when the number matches the details.

Check the result

The error icon is gone from the model object, and generation is no longer blocked by it.

Example

In a Data Mart project on Microsoft SQL Server, the relationship of the Mart Fact sales_per_supplier_and_item is deleted. The client shows:

Model object 'sales_per_supplier_and_item' of type 'Mart Fact' has the
wrong amount of relations defined. The amount of relations to model
objects should be above or equal to 1.

Related articles