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 - 20.01

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Data Mover
Release Number
20.01
Published
November 2023
Language
English (United States)
Last Update
2023-12-05
dita:mapPath
hlv1700545853003.ditamap
dita:ditavalPath
mpm1591127278842.ditaval
dita:id
don1467241476387
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.

In the example here, 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>