Verifying Row Counts - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.00
Published
December 2016
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
rdo1467305237457.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem

You can verify row count for tables when moving them from Teradata to Teradata, Teradata to Aster, Aster to Teradata, Teradata to Hadoop, and Hadoop 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>
    Valid values for <validate_row_count> are listed in the table below.
    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 executing 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 shown in the table below:
    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, and whether the row count is synchronized and validation type was PARTIAL or ALL.