Metadata Comparison module

The Metadata comparison module runs a reconciliation test that compares two metadata definitions against each other and checks if the column definitions have changed over time.

To compare your metadata on Tosca Cloud, you need to upload your on-prem Data integrity tests that use this module.

Metadata Comparison module values

This module contains the following values:

Value

Description

Connection

Use this value if you want to use one of the connections you have defined in DI Connections. The Connection value replaces the values DSN and ConnectionString.

To specify which connection you want to use in your test, type the name of your DI connection in the Value field.

Note that you can't override the specified connection with dynamic expressions such as buffers or test configuration parameters.

DSN

Specify the data source you want to use for your comparison.

Enter the Data Source Name specified in the ODBC Data Source Administrator. After a connection is established, this is also used as the Connection test step value.

This value contains the following test steps:

  • User ID: User of the database which you want to use

  • Password: Password of the user

Make sure the user has at least read access to the system tables.

ConnectionString

Uses the defined connection string instead of the values DSN, User ID and Password.

SQL Statement

Create an SQL statement containing the actual, current metadata information of a table.

This statement has to include the following columns for source and target definitions: Column Name, DataType, Length and Precision.

Bellow is a sample SQL statement designed to work with a MS SQL Server database. It uses the Source information from the corresponding TestSheet.

Copy
SELECT COLUMN_NAME AS 'ColumnName',
       data_type AS 'DataType',
       CASE
           WHEN s.Data_TYPE IN ('int','bigint','smallint','tinyint','money') THEN NULL
           ELSE CASE
               WHEN s.CHARACTER_MAXIMUM_LENGTH > 0 THEN s.CHARACTER_MAXIMUM_LENGTH
               ELSE s.NUMERIC_PRECISION
           END
       END AS 'Length',
       CASE
           WHEN s.DATA_TYPE IN  ('int','bigint','smallint','tinyint','money') THEN NULL
           ELSE s.NUMERIC_SCALE
       END AS 'Precision'
FROM information_schema.columns s
WHERE table_schema = '{XL[Source.Schema]}'
AND table_name = '{XL[Source.Table]}'

Columns to ignore

Specify a comma-separated list of columns to exclude from the comparison.

Base Field Definitions

Baseline definitions you upload from your on-prem test cases.