Invalid data type configuration (Business Rule)
Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
This business rule checks that the length, precision and scale of every term's data type are allowed on the target platform. A term that breaks the rule gets a warning; the generator writes the values anyway, and the target platform can reject the table at deployment. After the fix, the warning is gone and the table deploys.
Message
Warning with the ID of the platform: ID-32010 (Microsoft SQL Server), ID-33002 (Oracle), ID-30005 (Snowflake, Snowflake dbt), ID-31000 (Databricks, Databricks dbt, Fabric Lakehouse), ID-35000 (Fabric Warehouse). The short text is Model object contains invalid data type configurations., followed by the rule, for example:
Model object '<model object name>' of type '<type>' has invalid 'nvarchar' column(s) defined. Data type 'nvarchar' does only support 'Length' between 1 and 4000 and does not support 'Precision' or 'Scale'.
The message names the data type and the values it allows. One message is shown per data type and rule, even when several terms break it.
Available since Generator 2.2; on Databricks and Fabric Lakehouse since Generator 2.0.
Cause
A term has a length, precision or scale its platform data type does not accept, or lacks a required one. Examples on Microsoft SQL Server: nvarchar and nchar need a length between 1 and 4000, varchar and varbinary between 1 and 8000; decimal needs a precision between 1 and 38 and a scale not above it; int and date accept none of the three. On Oracle, VARCHAR2 accepts a length between 1 and 4000.
The check is a warning: the generator still writes the table with the configured values.
Fix
- Open the model object in Edit Model Object or Manage Terms and find the term with the named data type.
- Set a length, precision or scale in the allowed range, or remove the value the data type does not support. For a Default Term, change it in Manage Default Terms.
- Generate the artifacts again.
Check the result
The warning disappears from the model object, and the table deploys without Msg 2717.
Example
The term CUSTOMER of the Satellite load_customer_sat has the data type nvarchar with length 5000. The generator writes [CUSTOMER] NVARCHAR(5000) NOT NULL, and the deployment on Microsoft SQL Server stops at the table:
Msg 2717, Level 16, State 2: The size (5000) given to the parameter 'CUSTOMER' exceeds the maximum allowed (4000).
The views and procedures of the Satellite then fail with Invalid object name. With length 4000, the table deploys.
Related articles
- Reference: Supported Term Data Types (Business Rule), Native Data Type (Term Mapping)
- See also: Understand warnings and errors, Troubleshoot generation, deployment and load failures