Use a Source Staging for Partial Moves of Underlying Data | Teradata Data Mover - 17.10 - About Using a Source Staging Database to Partially Move Underlying Data from a View Using DSA - Teradata Data Mover

Teradata® Data Mover User Guide

Product
Teradata Data Mover
Release Number
17.10
Release Date
June 2021
Content Type
User Guide
Publication ID
B035-4101-061K
Language
English (United States)

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>