Verifying a Dimensional Model
The process of verifying a dimensional model in Astera Data Stack is the same as that for a general data model. To learn more on verifying a general data model, click here.
In this article, we’ll cover a few common errors and warnings that you may encounter while verifying a dimensional model.
Common Verification Errors and Warnings
Case 1: Insert Only
In this case, we have a data model that contains one dimension entity called SCD_Customer.
Here is the layout of this entity.
You’ll notice that the Dimension Role for all of the fields is Insert Only. However, you need to assign a business key, SCD types, and other SCD-related roles to certain fields in a dimension entity.
Upon verifying for read and write deployment, the Verify window will display the following errors:
The first error indicates that the entity must contain at least one SCD element.
The second error indicates that the entity must contain a business key.
Solution: Go to the Layout Builder screen and assign appropriate Dimension Roles to certain fields. Here is a look at the entity layout after we have done so.
As you can see, the entity now contains a business key and three SCD1 elements.
Once you’ve defined the dimension roles, click OK. The model can now be verified successfully.
Case 2: Record Identifiers
Here, we have a modified version of the data model used in case 1.
In this case, the layout of the SCD_Customer entity contains an SCD2 element but does not contain any record identifiers.
Upon verifying for read and write deployment, the Verify window will display the following error:
The error states that the SCD_Customer entity contains an SCD2 or SCD6 element but does not have any active row identifiers.
Solution: Go to the Layout Builder screen and assign a record identifier field. In this case, the entity layout already contains a field that denotes the Version Number (VersionNo). We’ll use the Dimension Role dropdown menu to assign the Version Number role to the field named VersionNo.
The model can now be verified successfully.
Case 3: Record Identifier Not Needed
Here, we have another modified version of the model in cases 1 and 2.
The layout of the SCD_Customer entity contains a business key, an SCD1 element, and an Effective Date record identifier.
However, a record identifier is only needed in the layout when it contains at least one SCD2 or SCD6 element.
Upon verifying for read and write deployment, the Verify window will display the following warning:
Note: A warning is not the same as an error. When a model contains one or more warnings, it can still be deployed or forward engineered. However, it is a good practice to remove warnings before you move forward.
This warning indicates that the layout contains an effective or expiration date which serves no purpose since it does not contain an SCD2 or SCD6 field.
Solution: Go to the Layout Builder screen and delete the EffectiveDate field by right-clicking on the field and selecting Delete from the context menu. However, if you wish to add an SCD2 or SCD6 element to the layout, do not delete the field.
The model can now be verified successfully.
This concludes our discussion on verifying a dimensional model.
Last updated