When performing a partial copy using XML, embed a sql_where_clause tag and one or more key_column tags within the table tag of the table to perform the partial copy. The sql_where_clause tag specifies the SQL WHERE clause used for the extract side of the partial copy job. The key_column tag is used to specify the name of the columns that uniquely identify each row when upserting them into the target table.
For example:
<table selection="included"> <name>Table1</name> <sql_where_clause><![CDATA[ WHERE col1 > 4]]></sql_where_clause> <key_columns> <key_column>col1</key_column> <key_column>col2</key_column> </key_columns> </table>
Inside the sql_where_clause tag, the WHERE clause must be surrounded by the special CDATA tag, ![CDATA[ where clause ]], and the WHERE clause must include the WHERE keyword. Do not use a ; character at the end of the SQL.
When performing a partial copy using Teradata PT, the Teradata PT export operator does not support WHERE clauses that can be satisfied by a single AMP operation. For example, a SELECT statement with a constraint containing an equality condition on the primary index or unique secondary index columns of a table such as, WHERE col1 = 1 where col1 is the primary key for the table). In these cases, you should use an alternative copy method.