Using a Physical Table to Update Table Metadata

Problem

You want to ensure that the metadata for a table matches the physical table.

Solution

You can use the update table metadata feature. This feature compares the columns, keys and indexes in a physical table to the columns, keys, and indexes that are defined in the metadata for that table. If column, key or index metadata does not match the columns, keys, or indexes in the physical table, the metadata is updated to match the physical table.
For existing tables, the update table metadata feature adds new columns, keys and indexes, removes deleted columns, keys, and indexes, and records changes to all of the column, key, and index attributes. When you select and run this feature against one or more tables simultaneously, the update log lists which tables were successfully updated and which failed.
The update table metadata feature uses the following resources:

Tasks

Run Update Table Metadata

Perform the following steps to run the update table metadata feature:
  1. Select one or more tables from a SAS Data Integration Studio tree. Then, right-click one of the tables and select Update Metadata in the pop-up menu. You might be prompted to supply a user name and password for the relevant servers.
  2. When the update is finished, you can choose to view the resulting SAS log.

Usage Note

The update table metadata feature cannot be used on a table until you save the job. This feature cannot be used with Hadoop tables, or on a table whose physical name includes a macro variable, such as &mstatus.OUT. For more information, see Update Table Metadata Cannot Be Used for Some Tables.