Error when parsing template script (Business Rule)
Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
This error appears when a template fails while the generator writes the code of a model object. The client then does not offer the artifacts for download, because they are incomplete. The rule ID is ID-90001.
Message
The client shows an error with this text on the Generate Artifacts page. <model object name> and <type> stand for the name and type of the model object, <part> for the part being written, and <exception message> for the text of the exception.
Model object '<model object name>' of type '<type>' has error when parsing template script on part <part>: <exception message>
The error appears only after you select Generate. The Generate Artifacts page then shows Generation failed. Fix errors and try again. and lists the message with an error icon and without the rule ID. The model object card shows no icon for this error, and the status bar does not count it.
Available since Generator 2.4.
Cause
The template code threw an exception for the named part of the model object:
- A custom template of your project: the exception message points to the line or value in your template code.
- A template delivered with the generator: a combination of settings of the model object is not handled by the template.
Fix
- For a custom template, correct the template and generate again.
- For a delivered template, check the settings of the named model object against its reference article, change the setting that the exception refers to, and generate again.
- When the error stays, contact biGENIUS support with the full message text.
Check the result
Generation completes without the error, and the artifacts can be downloaded.
Example
When a delivered template fails for the Mart Dimension scd_mixed of a Data Mart project on Microsoft SQL Server, the Generate Artifacts page shows Generation failed. Fix errors and try again. and lists the error with these details:
Model object 'scd_mixed' of type 'Mart Dimension' has error when parsing template script on part Mart Dimension Delta View: Operation is not valid due to the current state of the object.
The failing part is Mart Dimension Delta View, and the exception message is Operation is not valid due to the current state of the object. The page offers no download of the artifacts.
Related articles
- See also: Troubleshoot generation, deployment and load failures, Understand warnings and errors, Generate artifacts