Use a Source Staging for Partial Moves of Underlying Data | Teradata Data Mover - About Using a Source Staging Database to Partially Move Underlying Data from a View Using DSA - 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

A view can be partially moved using DSA with a source staging table, and can be moved to either a target table or a target view. The underlying data first copies to the source staging table, then DSA moves the data from the source staging table to the target system. To use a specified source staging table, you must set use_source_staging_table to true at the object level in the create XML file.

The following XML demonstrates using source_db to move a view to a target table:

<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>
		<use_source_staging_table>true</use_source_staging_table>
		<source_staging_database> 
			<name>source_db</name>
		</source_staging_database>
		<sql_where_clause>WHERE c1 > 500</sql_where_clause>
		<key_columns>
			<key_column>c1</key_column>
		</key_columns>
	</view>
</views>
The following XML demonstrates using source_db to move a view to a target view:
<views>
	<view selection="included" copyData="true">
		<name>deptsals</name>
		<database>MyDb</database>
		<use_source_staging_table>true</use_source_staging_table>
		<source_staging_database>
			<name>source_db</name>
		</source_staging_database>
		<sql_where_clause>WHERE c1 > 500</sql_where_clause>
		<key_columns>
   	 	<key_column>c1</key_column>
		</key_columns>
	</view>
</views>