This article describes how to synchronize a semantic model if the data type of a field in the Data Warehouse has been changed. It also shows how to remap fields in the semantic model if a table in the Data Warehouse has been deleted and the semantic model should use a new table instead.
Synchronizing the semantic model for a data type change
If the data type of a field in the Data Warehouse has been changed, and this field is used in the semantic model, it is recommended to synchronize the semantic model. For example, we have a field called location_id which is bigint in the Data Warehouse.
The field has been brought over to the semantic model, and if we right click on the location_id field here, and select edit semantic field, we see that it is also a bigint in the semantic model.
The location_id field is then changed in the Data Warehouse from bigint to Numeric i.e. Decimal(38,2), by right clicking on the field and selecting edit.
However, the field in the semantic model is still bigint. If we would like to change the field in the semantic model to numeric, so that it is aligned with the Data Warehouse, then we can right click on the semantic model and select synchronize.
We will then be notified that the data type change has been auto-resolved.
If we edit the semantic field we can see that it has been changed to numeric i.e. decimal(38,2)
Auto-resolve synchronization also applies to field name changes in the Data Warehouse.
Synchronizing the Semantic Model for Remapping of tables and fields
We can also synchronize the semantic model in order to remap tables and fields. Continuing with the same example as above, say we have a new table (Org.Structure) which contains the departments we want to use instead of the old table (HR.departments).
If we then delete the old departments table, and right click on the semantic model and select synchronize, the following menu appears, which indicates that the mappings that the semantic model was using previously have now disappeared.
In order to reestablish the mappings (i.e. replace the old missing mappings with the new mappings), select Schema (in our case, set it to Org),
The table will automatically be selected as a result of the schema selection.
Because the naming of the new fields are different from the old fields, we have to select the fields to recreate the mappings.
Select OK to complete the remapping.