Verify Row Count | Teradata Data Mover - 17.10 - Verifying Row Counts - Teradata Data Mover

Teradata® Data Mover User Guide

Product
Teradata Data Mover
Release Number
17.10
Release Date
June 2021
Content Type
User Guide
Publication ID
B035-4101-061K
Language
English (United States)

You can verify row count for tables when moving them from Teradata to Teradata.

Values are not case sensitive.
  1. To validate row counts for a table, add validate_row_count to the table object.
    <table selection="included">
    	<name>MyTestTable_1</name>
    	<validate_row_count>all</validate_row_count>
    </table>
    The following table lists valid values for validate_row_count:
    Value Description

    ALL

    Row count check is performed on the entire table.

    This option is available for partial table copies. For example, if you want to validate the source and target tables are synchronized, check the row count on the full table after the partial table has been copied.

    NONE

    No row count check is performed.

    This is the default.

    PARTIAL

    Row count check is performed on subset of data that was copied. This option is available only for partial table copies. If used for full table copies, an error results.

    For partial row count validation, a WHERE clause is provided for both the source and target systems. In most cases, Data Mover does not replace the table name in the WHERE clause when performing a row count validation query. There is one exception: if the WHERE clause contains a fully qualified source table name and the table is relocated or renamed, the fully qualified source table name is replaced with the fully qualified target table name.

    Examples of the expected behavior are the following:
    Source Object WHERE Clause Target WHERE Clause
    Fully qualified source object
    WHERE col1 in select c1 from sourcedb.sourcetable;
    WHERE col1 in select c1 from targetdb.targettable;
    WHERE col1 in select c1 from "sourcedb"."sourcetable";
    WHERE col1 in select c1 from "targetdb"."targettable";
    Non-fully qualified source object
    WHERE col1 in select c1 from sourcetable;
    WHERE col1 in select c1 from sourcetable;
    Fully qualified non-source object
    WHERE col1 in select c1 from sourcedb.tableA;
    WHERE col1 in select c1 from sourcedb.tableA;
  2. View the row count validation results by typing the status command with an output_level of 3 or more. This displays the table name, row count on the source and target systems, whether the row count is synchronized, and if the validation type was PARTIAL or ALL.