Have a Question?
Categories
< All Topics
Print

Validation Rules

Transformation of data is done based on certain rules which makes the data ready to load. In CloudMigrate two types of validations are possible

  • Structure Validation: In Structure validation, you can do all the structural validation. For example,  Not Null condition
  • Validate using Rule: In Validate using Rule, you can define all the validations that are required for the table.
  1. Click on Workshopfrom the left side menu.
  2. Click on Tables.
  3. Click on the badge of the table which you need to define a rule.(for example in here click on Assignments badge)

Structural Validation

  1. Click on Structure tab. Click on not null column against the column which you need to set the not null condition and click on yes as shown in below and click on save.
  2. Click on Data Type column against which you need to set the Data Type, and select the data type among the drop down list and click on save.
  3. Click on Date Format column against which you need to set the Date format. Enter the date format in which the date is to be formatted and click on save.

Validate using Rules

  1. Select the Rules Tab. Click on New Rule button, another page opens to define the rule.
  2. Select Definition Tab, Choose the type of validation among the drop-down list.
    Different types of validations are
    i. Validate/Transform using Mapping:
    This allows you to validate the records with the help of mapping which has already been defined. After choosing the type, you have to choose the mapping code which you have defined, and set the source and target column in the corresponding tabs.
    (a) Under the source tab, click on add new source condition button, choose the mapping column which contains the value from the source system, choose the column from the table which you want to validate against and choose the sql operator.
    (b) Under the target tab, click on add target column button, choose the mapping column which contains the values which are valid in the target system and the derived column to which the value should be stored.
    ii. Validate using SQL:
    This helps you to validate the records using SQL statements. For example. If you need to validate for some specific records.
    iii. Execute SQL Statement:
    This helps you to validate the records using SQL Statement.
    iv. Derive using PLSQL Expression:
    This helps you to validate the records using PLSQL expression. For example validating postal codes using regular expression
    v. Copy from Another Column:
    This helps you to validate the records by copying column from another field
    vi. Validate/Transform using Oracle Cloud Configuration:
    This allows you to validate the records with the help of configurations which has already been extracted from cloud. After choosing the type, you have to choose the configuration code which you have to validate against, and set the source and target column in the corresponding tabs
    (a) Under the source tab, click on add new source condition button, choose the mapping column which contains the value from the source system, choose the column from the table which you want to validate against and choose the sql operator.
    (b) Under the target tab, click on add target column button, choose the mapping column which contains the values which are valid in the target system and the derived column to which the value should be stored.
    vii. Unique Check:
    This helps you to check whether all the records are unique
    viii. Duplication Check:
  3. Provide a number which specifies the sequence at which the validation should take place.
  4. If the validation type is Validate/Transform using Oracle Cloud Configuration or Validate/Transform using mapping, choose the mapping/configuration code from the drop down list which has been pre-defined in CloudMigrate.
  5. Choose when the rule should be applied.
  6. Choose what should be done when a record has failed to pass the validation rule.
  7. Choose the pre-defined condition if any.
Table of Contents