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

Business key data type not usable in constraints (Business Rule)

Applies to
Platform: Microsoft SQL Server · Fabric Warehouse

This business rule warns when a business key term has a data type that the platform cannot use in a key constraint, such as varchar(max). It raises a warning, and generation continues. The rule ID is ID-32006 on Microsoft SQL Server and ID-35001 on Fabric Warehouse.

Messages

The message names the model object and its type in place of <model object name> and <type>. Both platforms show the same text. The Generate Artifacts page lists the messages without the rule ID.

Microsoft SQL Server

The client shows a warning with this text:

Model object '<model object name>' of type '<type>' has a business
key term with incompatible data type when used in constraints.
Affected constraints could block the deployment.

On the model object card, point to the warning icon to see this message with the rule ID: Warning ID-32006.

Cause: a business key term has the data type image, nvarchar(max), varchar(max), varbinary(max) or sql_variant.
Fix: give the business key term a data type with a length, for example nvarchar(100), in Manage Terms.

Available since Generator 2.0.

Fabric Warehouse

The client shows a warning with the same text as on Microsoft SQL Server.

On the model object card, point to the warning icon to see this message with the rule ID: Warning ID-35001.

Cause: a business key term has the data type varchar(max) or varbinary(max).
Fix: give the business key term a data type with a length, for example varchar(100), in Manage Terms.

Available since Generator 2.2.

Check the result

The warning icon is gone from the model object.

Example

In a Data Mart project on Microsoft SQL Server, the business key term TRANSACTION_ID of the Mart Dimension bk_multipart_with_nullable_parts gets the data type nvarchar(max). The client shows:

Model object 'bk_multipart_with_nullable_parts' of type 'Mart
Dimension' has a business key term with incompatible data type when
used in constraints. Affected constraints could block the deployment.

Related articles