Difference between revisions of "Fusion Data Mapper - Maintaining Mapping Rules"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Importing rules from Excel)
(Importing mappings from Excel)
Line 5: Line 5:
  
 
= Importing mappings from Excel =  
 
= Importing mappings from Excel =  
Mapping rules can be expressed in an excel file by creating a column which has the same Id as the ID of the Source Dimenison, and subsequent columns with Ids that match those of the Target Dimensions or Series Attributes.   
+
Mapping rules can be expressed in an excel file by creating a column which has the same Id as the ID of the Source Dimension, and subsequent columns with Ids that match those of the Target Dimensions or Series Attributes.   
  
[[File:Mappingrules.png]]
+
[[File:Mappingrules2.png]]
  
The order of the columns is not important, as long as the column headings match the Ids of the Dimensions. If the target Dataflow wants to include the Series Code, perhaps as a Series Attribute, then ensure the Series Attribute Id in the target is the same as the Id in the source, and no further mapping is required, the Series Code will be exposed via the target Dataflow.  The Source Dataflow can contain other Series Attributes for example LAST_UPDATED to indidcate when the series was last updated.  If the Target Dataflow has the same Series Attributes the data will be automatically mapped across without changing the reported value.   
+
The order of the columns is not important, as long as the column headings match the Ids of the Dimensions. If the target Dataflow wants to include the Series Code, perhaps as a Series Attribute, then ensure the Series Attribute Id in the target is the same as the Id in the source, and no further mapping is required, the Series Code will be exposed via the target Dataflow.  The Source Dataflow can contain other Series Attributes for example LAST_UPDATED to indicate when the series was last updated.  If the Target Dataflow has the same Series Attributes the data will be automatically mapped across without changing the reported value.   
  
The quickest way to create an Excel file is to export the empty table in Excel format from the Data Mapper - this provides a bloank template for creating new rules.
+
The quickest way to create an Excel file is to export the empty table in Excel format from the Data Mapper - this provides a blank template for creating new rules.
 +
 
 +
== Import Action: Upsert ==
 +
Importing mapping rules against the upsert action results in new mappings being created, where they did not previously exist, and existing mappings being overwritten.  As the Source Dimension can only map a unique identification ONCE to a set of target Dimensions, the same unique identifier mapped to other Dimension values will result in an overwrite behaviour.   
 +
 
 +
Upsert will not result in any mappings being removed, only addition of new rules or modification of existing.
 +
 
 +
== Import Action: Full Replace ==
 +
Full Replace will replace all the rules that exist against the Target - Source Dataflow with the ones in the loaded file. 
 +
 
 +
'''Note:''' Fusion Registry preserve copies of old rules should rollback be required.  Rollback is not supported in the Data Mapper, so must be performed via the Fusion Registry User Interface.
 +
 
 +
= Manual Editing via the UI =
 +
Mapping Rules which exist in the Fusion Registry are viewed as a table in the Fusion Data Mapper, in the same style as Excel (column, row).  Columns can be sorted ascending or descending by clicking on the column name.  Filters can be applied to the columns. 
 +
 
 +
== Single Value Changes ==
 +
To manually Edit one or more values for a mapping, double click on a code id, to load a drop down list of valid values.  If the target Dimension is not backed by a Codelist, then a free text input box will be displayed to manually enter a value.  When a cell is edited, the row will be highlighted in Orange to notify the user that an unsaved change was made to that row.  To save all changes back to the Fusion Registry server, click on the Save button, this will submit all changes to the Fusion Registry for validation and update.
 +
 
 +
[[File:Edit mapping rule.png]]
 +
 
 +
Local changes that have not been saved to the Fusion Registry server can be undone by clicking on the Undo button.
 +
 
 +
== Bulk Changes ==
 +
'''Bulk Changes''' can be made by selecting one or more rows using the checkbox control on the row.  When one or more rows are selected, click on the bulk change button next to the Column label for the column you want to change the value of.  This will open a control allowing the selection of a single value which will be applied to all selected rows. 
 +
 
 +
'''Bulk Deletes''' can be achieved using the same row selection checkboxes and clicking on the button to delete the selected series.  This will update the mapping locally to remove the mapped series.  A further Save is required to push these deletes to the server.  Deleted rows and modified rows are be pushed to the Fusion Registry server in one save command.
 +
 
 +
The '''select all''' checkbox will select all the checkbox’s that match the current query filter, even if the rows are not all displayed on one page due to pagination.
 +
 
 +
A selected row remains selected until it is deselected.  The selection will remain even if the row is no longer displayed due to the application of a filter or viewing a different page.  Deselection can be achieved by clicking the same select checkbox, or via a select all followed by deselect all, or by navigating to a different Dataflow mapping.
 +
 
 +
= Modification Result =
 +
The result of modifying the mapping is the Fusion Registry server being updated with the new metadata.  This may result in a re-index of the Source dataset if the Target Dataflow has been linked to the Source Dataflow for data retrieval.  This will mean any data navigation or retrieval will reflect the changes of the mapping with immediate effect.

Revision as of 07:45, 24 July 2020


Overview

The Fusion Data Mapper displays the Structure Mapping rules which are ultimatley maintained and retrieved from the Fusion Registry. The Data Mapper provides the ability to load in rules from Excel or CSV files, edit or delete the rules locally and save them to the Fusion Registry server.

Importing mappings from Excel

Mapping rules can be expressed in an excel file by creating a column which has the same Id as the ID of the Source Dimension, and subsequent columns with Ids that match those of the Target Dimensions or Series Attributes.

Mappingrules2.png

The order of the columns is not important, as long as the column headings match the Ids of the Dimensions. If the target Dataflow wants to include the Series Code, perhaps as a Series Attribute, then ensure the Series Attribute Id in the target is the same as the Id in the source, and no further mapping is required, the Series Code will be exposed via the target Dataflow. The Source Dataflow can contain other Series Attributes for example LAST_UPDATED to indicate when the series was last updated. If the Target Dataflow has the same Series Attributes the data will be automatically mapped across without changing the reported value.

The quickest way to create an Excel file is to export the empty table in Excel format from the Data Mapper - this provides a blank template for creating new rules.

Import Action: Upsert

Importing mapping rules against the upsert action results in new mappings being created, where they did not previously exist, and existing mappings being overwritten. As the Source Dimension can only map a unique identification ONCE to a set of target Dimensions, the same unique identifier mapped to other Dimension values will result in an overwrite behaviour.

Upsert will not result in any mappings being removed, only addition of new rules or modification of existing.

Import Action: Full Replace

Full Replace will replace all the rules that exist against the Target - Source Dataflow with the ones in the loaded file.

Note: Fusion Registry preserve copies of old rules should rollback be required. Rollback is not supported in the Data Mapper, so must be performed via the Fusion Registry User Interface.

Manual Editing via the UI

Mapping Rules which exist in the Fusion Registry are viewed as a table in the Fusion Data Mapper, in the same style as Excel (column, row). Columns can be sorted ascending or descending by clicking on the column name. Filters can be applied to the columns.

Single Value Changes

To manually Edit one or more values for a mapping, double click on a code id, to load a drop down list of valid values. If the target Dimension is not backed by a Codelist, then a free text input box will be displayed to manually enter a value. When a cell is edited, the row will be highlighted in Orange to notify the user that an unsaved change was made to that row. To save all changes back to the Fusion Registry server, click on the Save button, this will submit all changes to the Fusion Registry for validation and update.

Edit mapping rule.png

Local changes that have not been saved to the Fusion Registry server can be undone by clicking on the Undo button.

Bulk Changes

Bulk Changes can be made by selecting one or more rows using the checkbox control on the row. When one or more rows are selected, click on the bulk change button next to the Column label for the column you want to change the value of. This will open a control allowing the selection of a single value which will be applied to all selected rows.

Bulk Deletes can be achieved using the same row selection checkboxes and clicking on the button to delete the selected series. This will update the mapping locally to remove the mapped series. A further Save is required to push these deletes to the server. Deleted rows and modified rows are be pushed to the Fusion Registry server in one save command.

The select all checkbox will select all the checkbox’s that match the current query filter, even if the rows are not all displayed on one page due to pagination.

A selected row remains selected until it is deselected. The selection will remain even if the row is no longer displayed due to the application of a filter or viewing a different page. Deselection can be achieved by clicking the same select checkbox, or via a select all followed by deselect all, or by navigating to a different Dataflow mapping.

Modification Result

The result of modifying the mapping is the Fusion Registry server being updated with the new metadata. This may result in a re-index of the Source dataset if the Target Dataflow has been linked to the Source Dataflow for data retrieval. This will mean any data navigation or retrieval will reflect the changes of the mapping with immediate effect.