Sample pluglets

You can use the sample pluglets included with the workbench to understand how to implement and run pluglets.

The samples that are listed in each section below are included with the product when you install the Pluglets Support feature.

Changing the owning schema

You can change the schema that owns certain data objects in a physical data model, including the following list:
  • Indexes
  • Base tables
  • DB2 materialized query tables
  • Oracle materialized views
  • Views

You can also reassign all indexes, tables, and views in a physical data model, database, or location from the model, database, or location node.

You can also reassign one or more objects that are owned by another schema by selecting those objects and running the pluglet at that level.

Changing the supporting table space

To assign the tables in a physical data model, database, or location to an existing table space, run the sample pluglet.

You can run this pluglet from the following levels in the data model:
  • Valid physical data models designed for the following vendors:
    • DB2® for Linux, UNIX, and Windows
    • DB2 for z/OS®
    • Oracle
  • Databases from the following vendors:
    • DB2 for Linux, UNIX, and Windows
    • Oracle
  • DB2 for z/OS locations

Naming indexes

Use this sample to name the indexes in a selected physical data model, database or location, or schema.

Updating foreign key documentation

Run this pluglet from the entity or table level to copy the documentation from parent keys to foreign keys.

Removing auxiliary tables

Run this pluglet from the DB2 for z/OS physical data model or location node to remove all auxiliary tables and the associated table spaces in the model or location.

Setting attributes to required

Run this pluglet at the entity level to specify that all attributes in the entity are required.

Setting columns to not null

Run this pluglet at the table level to specify that all columns in the table are not null.

Calculating table data (column length, table row length, table row size)

Run this pluglet to calculate information about the tables in a physical data model, database, or location and export that information to a CSV file that is stored in a location that you specify.

This pluglet can calculate the table row length, table row size, and column length.

Selecting objects by name

Run this pluglet from the Data Project Explorer or the diagram editor to select objects by name according to rules that you specify.

Applying appearance attributes to all subtype entities in a diagram

You can apply the appearance properties of supertype entities in generalization relationships to all subtype entities. In the diagram editor, right-click a diagram that contains a generalization relationship, or right-click a subtype entity that belongs to a generalization relationship and run the pluglet.

Specifying a font color for nonpersistent attributes in a diagram

You can specify a font color for all nonpersistent attributes that exist in a diagram. In the diagram editor, right-click a diagram that contains nonpersistent attributes, or right-click an entity that contains nonpersistent attributes.


Feedback