Share:

A Data Migration Wizard simplifies the creation of test cases to compare data between two tables available in two different databases. The typical scenarios for Data Migration wizard are data migration, data replication, and data archival, where data is moved as it is from one database to another database without applying any transformations. 


Create a Data Migration Wizard Test

There are several methods to launch the Data Migration Wizard Test in the ETL Validator.

Depending on your convenience, select any one of the following methods:

  • Method 1
    Mouse hover over the plus icon and select Data Migration Wizard.
  • Method 2
  1. On the side menu, click TEST CASES.
  2. Click Tests +.
  3. Under Wizards for Creating Tests, select Data Migration Wizard.
  • Method 3
  1. On the side menu, click HOME.
  2. Under Common Tasks, Click Create Tests.
  3. Under Wizards for Creating Tests, select Data Migration Wizard.

Open/Edit a Data Migration Test

To open/edit a Data MIgration Test,

  1. On the side menu, click TEST CASES.
  2. In the Test Cases tree, select the folder containing the Data Migration Wizard.
  3. Click on the name of the Data Migration Wizard.
Information You can also open a test case from the TEST RUNS view.

Data Migration Test Details

When you want to create or edit a Data Migration Test, complete the information in the following pages.

Start

This is the first page in the Data Migration Wizard. Here, you will enter the following details about test case and connection:

TEST CASE PREFIX

Enter a prefix for the test case.

TEST SUITE

Select the test suite where you want to create the test case.

TEST FOLDER

Select the folder where you want to create the test case.

WORK SCHEMA

Select a workschema where temporary tables with test data will be stored.

TARGET CONNECTION

Select a connection for the target database.

TARGET SCHEMA

Select a schema in the target database.

SOURCE CONNECTION

Select a connection for the source database.

SOURCE SCHEMA

Select a schema in the source database.

Objects

This is the second page where you will get objects (tables, queries, view, or synonym) by importing from a spreadsheet (.CSV file) or by selecting them from a database source. A spreadsheet import method allows tables, queries, view, and synonyms. In the import file,  map the Source and Target tables.

A sample spreadsheet template is available so that you create a spreadsheet file on your own.

Sample spreadsheet file template:

SourceTable SourceJoin TargetTable TargetJoin Type ExternalTestCaseId testcasename
SourceTableName SourceColumn TargetTableName TargetColumn Table ExternalTestCaseId t1
SourceViewName SourceColumn TargetViewName TargetColumn View ExternalTestCaseId t2
SourceSynonymName SourceColumn TargetSynonymName TargetColumn Synonym ExternalTestCaseId t3
SourceQuery  SourceColumn TargetQuery TargetColumn Query ExternalTestCaseId t4

Information Please ensure that names of the tables, views, synonyms, and queries match with the corresponding source/target.

Import tables from a spreadsheet

  1. In the Objects page, click Import tables from a spreadsheet.
  2. Browse and select the file, and then click Open. The objects are imported into Data Migration Wizard.

Once the objects are imported, click Verify to ensure the objects are matching with the source and target connection. If you have additional files, click Import More and complete the import. At any point, you can click Delete to delete the unwanted objects.

Select tables from source

  1. In the Objects page, click Import tables from source.
  2. From the tree hierarchy available on the left side of the screen, drag and drop any of the tables, views, synonyms, or queries you wish to select, into the Selected Count area.

At any point if you wish to delete the selected items, first select the item and then click the Delete icon at the top.

Mapping

In the Mapping page, you will map Target Column Name with Source Column Name and create joins on the Target Column Name. To include all of the columns and create joins on all of the columns, simply select the checkbox available in the header. To select specific columns or create joins on only some columns, select the corresponding checkbox available for the column/join.

You can also include or remove the columns and create or remove joins by typing in the column name in the bottom and clicking Deselect/Select. By following this method, both the column mapping and join is selected or removed at once. This method is useful when the same column present across several tables needs to be mapped and joined. 

Generate

In the final page, the Test Cases can be generated by clicking the Generate button. If required, you can add the generated Test Cases to a Test Plan also.

Options

You can allow ETL Validator Server to pass the test case with percentage of variation in the following cases:

  • Only in Target. Enter the percentage of variation to allow in Target. 
  • Only in Source. Enter the percentage of variation to allow in Source.
  • Data Differences. Enter the percentage of variation to allow for data differences.
  • Duplicate Source. Enter the percentage of variation to allow for duplicates in Source.
  • Duplicate Target. Enter the percentage of variation to allow for duplicates in Source. 
  • Compute Column Stats. Selecting this option displays unmatched differences columns wise.
  • Truncate Result tables. Selecting this option empties the result tables after the test case is run.

Generate

Allows you to generate the test cases of Query Compare Test Case type. If you are importing from a spreadsheet, a test case will be created for each row in the file.

Add to Test Plan

After the test case is generated successfully, you may wish to add the test case to an existing or new test plan. Ensure that you have generated the test cases prior to adding them to a test plan.


Add test case to an existing test plan

  1. In the Add To Test Plan pop-up, select Existing Test Plan.
  2. Select a Data Compare Test Plan from the Select Test Plan drop-down list.
  3. Click Ok. The Data Compare Test Plan opens.
  4.  Add the query compare test cases generated in the Data Migration Wizard.
  5. Navigate through all the pages and complete all the required details.

Add test case to a new test plan

  1. In the Add To Test Plan pop-up, select New Test Plan.
  2. Click Ok. A new Data Compare Test Plan opens.
  3.  Add the query compare test cases generated in the Data Migration Wizard.
  4. Navigate through all the pages and complete all the required details.
PreviousNext

© Datagaps. All rights reserved.
Send feedback on this topic to Datagaps Support