We start this topic with a Project created
Within the project we have created AdventureWorks_Old as a Data Source and Data Entities have been defined.
In this short article we will be:
We have previously covered topics on Projects, Data Sources, Data Entities in our iData videos. We recommend that you view these as we will be using some of the functionality already set up in this article.
Today we are going to be looking at the Comparison and Assurance.
Running comparisons between two sets of data can be really useful when migrating data from one system to another. It can identify when records have been dropped, or incorrectly modified and show where the problem occurred.
From the welcome screen press the Login button taking us to the Login screen.
We enter our iData credentials and press Login.
If we open the Data Sources tile, we can see that we have a data source defined here, one is AdventureWorks_Old.
We will create a data source with our new data in it that we wish to compare to.
Click on the Action button, Create Entities.
We are going to compare the two databases, but looking at the Product Description table.
Navigating back to the Project page [We can do this from the Project Location Ribbon]:
Click on Data Processing Stages
Add a Name of Compare
We can see the entities in the Sources and Destinations are the same source. We will Filter Sources as AdventureWorks_Old and Destination as AdventureWorksNew.
Now we can select the ProductDescription from the Sources and Map it by Selecting ProductDescription from Destination by dragging the obeject into the Mappings section.
Save the Stage.
If the now run the stage, we can see the results of the comparison.
First of all we can see that we have a total of 762 rows, but a compared row count of 761. So we have a different row count.
We can also see we have zero matched rows. At the bottom of the Summary report, the Description fails on all rows. And the other fields match for all but one row, which accounts for our missing row.
If we look at the Detail tab we can see that some of the data has compared.
The first thing to notice is the first line has a symbol telling us there is no source row. This identifies our row count difference.
The third line shows full stop has been added, and capitalisation has changes.
Finally we can see fifth row that a semicolon has been replaced with a comma.
We might have expected these changes in the description, so we can edit the comparison transform to accommodate for that.
Lets go back to the Stage definition, and click on Transforms.
Click on the Transforms tile
First off we can let the comparison ignore case change in the source.
Secondly we can account to the change in the semi colon to a comma.
And finally to handle the extra full stop we the following rule.
Like this.
This won’t change our data just allow the report to pass the differences.
Now if we save the transform, and go back to our Stage, we can rerun it and see how that has reflected in the results.
Click on iData Browser Tab / Navigate to the Compare in the breadcrumb ribbon
iData provides many more transformation rules permitting a great deal of flexibility in accepting comparison changes and enabling better in the quality assurance.