You can copy a view definition and the underlying view data to a table or a view on a target Teradata system.
- In the Objects tab, select to expand the tree.
- Select to expand a database or user object where the view is located.
- To filter so only views display, do the following:
- Select and clear all check marks except for View.
- Move the cursor off of the object-types filter to refresh the tree with views in the sub-branch.
- Select to display the View Settings dialog box.The name of the view displays at the top of the dialog box.
- [Optional] Under Copy the following, specify what you want to copy:
- Only definition
- Only data to table
- Both definition and data to table
- Both definition and data to view
- Do one of the following:
- If you are copying only the definition, skip to step 13 and you are finished.
- If you are copying data, continue with steps 7 through 12.
- [Optional] To perform a partial table copy, enter the predicate of the WHERE restrictive clause in the Include Only Where field.Do not enter the keyword WHERE. For example, if you want to restrict a partial table copy to only the columns in which col1 is greater than 4, type col1 > 4 in the field.
- [Optional] If you are copying only data or both definition and data to a table, enter the target table name in the Target table name field.
- [Optional] If you are copying only data or both definition and data to a table, select an available database from Map to Different Database on Target.You can use the filter to display only the items that match the characters you enter.
- [Optional] Select the Use source staging table check box to enable source staging.This option is enabled when Only data to table or Both definition and data to table is selected in the Copy the Following field.
- [Optional] If Use source staging table is enabled, select a source database from Source staging database for tables.If a database is not specified, Data Mover uses the same database as the table being copied. Data Mover automatically names the staging table.
- [Optional] To use a separate staging database for tables, select an available database from Target staging database for tables.You can use the filter to display only the items that match the characters you enter.
- [Optional] Select the Use target staging table when table exists on target check box to force a target staging table to be created.
- [Optional] To use a separate staging database for temporary artifacts, select an available database from Target staging database for temporary artifacts.You can use the filter to display only the items that match the characters you enter.
- [Optional] To verify that the number of rows in the source and target tables match after completing the copy job, select one of the following options from the Validate Row Count list.
Option Description None Do not check row count. None is the default setting. Partial Perform a row-count check on the subset of data that was copied. Only applies when doing partial table copies. All Perform a row-count check on the entire table. Applies to full or partial table copies.
- [Optional] To verify that important aspects of the DDL for the source and target tables match before performing the copy, select one of the following options from the Compare DDL list.
Option Description Default By default, Data Mover compares the DDL. True Compare the DDL before performing the copy. False Do not compare the DDL before performing the copy.
- [Optional] Select one of the following options from Database to Client Encryption to enable encryption at the job, table, or view level.
Option Description Default Use the encryption setting specified in the daemon settings. True Override daemon settings and enable encryption. False Override daemon settings and disable encryption.
- [Optional] For a partial table copy, select one or more key columns from the Key Columns list to specify which columns uniquely identify each row when upserting them into the target table.You must specify at least one key column from the list. You can select multiple columns by holding the Ctrl key and selecting the column names in the list. Specify all primary indexes as key columns if at least one of the primary indexes is unique.
- Select OK.