About Copying View Definition and View Data - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
kmo1482331935137.ditamap
dita:ditavalPath
ft:empty
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.

You must use either TPTAPI_UPDATE, TPTAPI_STREAM, T2T, or JDBC to copy view data. TPTAPI_LOAD cannot be used to copy view data because the target or staging table that Data Mover creates is a multiset table and TPTAPI_LOAD does not support loading. ARC can be used to move view data when the source staging table is used and it is a partial copy.

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.
  • ARC cannot be used 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.

Views cannot be copied between Teradata and Aster or Hadoop systems.