The DDL comparison feature compares the DDL of the source table or view columns with the DDL of the target table or columns prior to copying the table or view. If the table does not already exist on the target system, the comparison is skipped.
When the feature is enabled, the comparison takes place every time the create or move command is used to create a job, or the start command is used to start a job.
DDL Comparison for Tables
The DDL comparison feature for tables compares the number of columns, MAPS properties, and Primary Time Index (PTI) properties between the source and target table:
If any of the following values are not the same for the source and target tables, the job fails.
- Number of columns with the following values for each column:
- Auto column
- Character type
- Compressible
- Constraint
- Constraint count
- Decimal fraction digits
- Decimal total digits
- Default value
- Format
- Identity column type
- Length
- Name
- Nullable
- Stored procedure parameter type
- Schema
- Storage format
- TS column type
- Type
- UDT name
- Upper case flag
- MAPS properties
- The map and colocate properties do not have to match when they exist on both the source and target tables.
- If map and colocate parameters are provided in a job, those parameters must match the target table map and colocate parameters.
- PTI properties
- Both the source and target tables must be PTI tables.
- PTI properties (timezero, tsFlags, and timeBucketValue) must match on both the source and target table.
DDL Comparison for Views
DDL comparison for a view compares the columns of the source view with the columns of the source table. It does not compare the definitions of the source and target views. To compare DDL when copying data from a view, the copyData attribute for the view must be set as true.
Scope Levels and Priority Logic
The following table shows the objects included at each scope level, and the priority logic applied if you specify different values at the scope levels. If you set the DDL comparison flag at more than one scope level, the smallest scope has the highest priority. For example, if you set the <compare_ddl> element to true at the database level but false at the job level, DDL comparison for all of the tables and views in the specified database is performed.
Scope Level | Objects Compared | Priority |
---|---|---|
Object | The specified table or view | Highest |
Database | All tables and views in the specified database | Higher |
Job | All tables and views in the job | High |
Daemon | All tables and views processed by a specific daemon | Low |
If none of the values for the scope levels above are specified, the default logic applies:
Objects Copied | Default Logic |
---|---|
Individual tables and views | True. DDL comparison is performed. |
An entire database | False. DDL comparison is not performed. |