Copy View Definition and View Data | Teradata Data Mover - About Copying View Definition and View Data - Teradata Data Mover

Teradata® Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.20
Published
November 2021
Language
English (United States)
Last Update
2021-11-04
dita:mapPath
wph1512683331242.ditamap
dita:ditavalPath
4101_UG_dm_1620.ditaval
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem

This feature enables you to copy a view definition and the underlying view data from a source system to a target system.

When copying view data, TPTAPI_UPDATE, TPTAPI_STREAM, T2T, and JDBC can be used for a full view copy; ARC and DSA can be used for a partial copy when a source staging table is specified. A full view copy using ARC or DSA is allowed only when a source staging table is specified and the source view contains columns with the AVRO/CSV storage format. TPTAPI_LOAD cannot be used to copy view data because the target or staging table that Data Mover creates is a multiset table, which TPTAPI_LOAD does not support. To copy data associated with a view to a Hadoop system, use T2H.

Restrictions When Copying Data from the Underlying View

The following restrictions apply when copying data from the underlying view:
  • TPTAPI_LOAD cannot be used as the load utility when moving underlying data from the view.
  • Do not use ARC or DSA as the load utility when moving underlying data from the view and a source staging table is not used.

Row Count Validation

You can validate the row counts of the source view and the target table after copying data from the underlying view. In order to perform row count validation, the validate_row_count element must be specified for the view.
<views>
 <view selection="included" copyData="true">
 	<name>deptsals</name>
		<database>MyDb</database>
		<view_data_table>
			<target_table>TargetTable</target_table>
			<target_database>TargetDb</target_database>
		</view_data_table>

		<staging_database>
			<name>TargetDb_Staging</name>
		</staging_database>

 	<validate_row_count>ALL</validate_row_count>
 </view>
</views>

When copying View data to a target view, the validate_row_count element validates the row counts of the source view and the target view.

Valid values for validate_row_count are ALL, PARTIAL, or NONE. The results of the row count validation can be seen in the status output. The row count validation is only performed when copying data from the view (copyData="true"). When copying only the view definition (copyData="false"), the row count validation is not performed even if the validate_row_count element is specified for the view.

View definitions cannot be copied between Teradata and Aster or Hadoop systems, but the data associated with a view can be copied from Teradata to Hadoop. Selecting partial row count validation when copying view data to Hadoop is not supported.