Partitions (Teradata)

Teradata partitions allow you partition table data by range, case, or column. PowerDesigner models partitions as extended sub-objects with a stereotype of Partition.

Creating a Partition

You can create a partition in any of the following ways:

  • Open the property sheet of a table, select the Partitions tab and click the Add a Row tool. The Partition field on the Teradata tab is updated to reflect the partitions that you create
  • Open the property sheet of a table, select the Teradata tab and enter your partition definition in the Partition field. Partition objects are created, deleted, or modified to reflect changes in this field.

Partition Properties

You can modify an object's properties from its property sheet. To open a partition property sheet, double-click its Browser entry in the Partitions folder under its parent table.

Name

Description

Table

Specifies the parent table of the partition.

Scripting name: ParentObject

Type

Specifies the type of the partition:
  • Range n - Specify a range and interval in the Expression field.
  • Case n - Specify criteria for the partition in the Expression field.
  • Column - [if no primary index is defined on the table] Create objects in the Column Groups list, open their property sheets and associate columns with them. Select the All but option to create a single-column partition with autocompression and a system-determined COLUMN or ROW format for each column, if any, that is not specified in the column group list.

Scripting name: PartitionType, AllBut

Expression

Specifies the partitioning expression for partitions of type Range n or Case n.

Scripting name: Expression

Column Groups
Lists the groups of columns that will be partitioned for partitions of type Column. Select an item in the list and click the Properties tool to define its type, and the columns of the parent table to which it applies. You can specify partitioning by:
  • Row
  • Column
  • Auto - Teradata determines the optimum partitioning format.
Select the All but option to compress data as physical rows that are inserted into that column partition of a column-partitioned table if an appropriate method can be calculated.

Scripting name: PartitionColumns

Add

Specifies that the maximum number of partitions for a partitioning level is the number of partitions it defines plus the value of the BIGINT constant value specified in this field.

Scripting name: AddConstant

Partition sql

Specifies the SQL statement that defines the partition. You can enter SQL in this field to generate appropriate PowerDesigner objects or create the objects and have them generate the SQL in this field. Changes to objects or the SQL are synchronized with the other.

Scripting name: Gen