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

Product
Teradata Data Mover
Release Number
17.10
Published
June 2021
Language
English (United States)
Last Update
2021-06-16
dita:mapPath
fcu1619423186706.ditamap
dita:ditavalPath
mpm1591127278842.ditaval
dita:id
B035-4101
lifecycle
previous
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>