Use a Target Staging Database with Underlying View Data | Teradata Data Mover - 17.11 - 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
17.11
Release Date
October 2021
Content Type
User Guide
Publication ID
B035-4101-091K
Language
English (United States)

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