Use a Target Staging Database with Underlying View Data | Teradata Data Mover - About Using a Target Staging Database When Moving Underlying Data from a View - 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
If the target table to which the data is being moved exists on the target, Data Mover creates a target staging table to which data is first moved. If copying data to a target view, data is always moved to a target staging table. After data is successfully moved to a target staging table, data from the target table or view is deleted and an INSERT/SELECT or MERGE is performed to move data from the target staging to the target table or view. This is very similar to providing a staging database when moving regular data tables.
Target staging is not used when copying view data to Hadoop.
In the example below, TargetDb_Staging is used as a target staging database.
<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>
	</view>
</views>