Creating Cluster Joins

How to:

Cluster joins enable you to create a new file structure by linking existing synonyms of two or more relational tables using the same or mixed data sources. For example, you may join a DB2 table and an Oracle table, and so on. Use cluster joins to create new views in the metadata by linking together physical tables and easily report against the new view or structure. You can create cluster joins by using the Modeling View of the Synonym Editor.

The Master File that is created combines the fields of the joined tables within a single file. The Access File from the combined file contains information about the actual location of the data sources and the Join information. It also shows how the tables are linked.

The total number of tables that you can add to the tool is 64 (using 63 joins), which results in a new Master File that has a maximum of 64 segments.

The Cluster Join Tool enables you to create a Star Schema which consists of a fact table referencing a number of dimension tables. Optionally, you can also create a view that has more than one fact table.


Top of page

x
Procedure: How to Create a Cluster Join by Enhancing Existing Synonyms

Use the Modeling View to enhance an existing synonym by adding a segment.

  1. From the Projects or Data Servers area, open a synonym by double-clicking a Master File from the Master Files folder.

    The Synonym Editor opens.

  2. Click the Modeling View tab.

    The Synonym Editor Modeling View tab opens in the workspace.

  3. Right-click a segment in the workspace.

    The following pop-up menu appears.

  4. Insert tables (segments) through one of the methods listed:
    1. Select Insert then Reference to Segment From Existing Synonym.

      Select a synonym to be inserted and click Select.

      Note: Use this method if you are creating a cluster join with an existing table or synonym.

      Tip: Click Save As from the Modeling View File menu if you want to modify the original synonym.

    2. Inserting a Segment using Metadata Import enables you to add segments by using the Create Synonym tool. This tool creates a synonym and includes it as a segment in the synonym from which the tool was launched.

      When this option is selected, you are first presented with the Adapter dialog where you can select a configured adapter connection to continue or configure a new adapter, if necessary.

      The following image is an example of a screen that appears where you provide information for the connection parameters.

      The following image is an example of a screen that enables you to select tables to create synonyms.

      The selected synonyms will be created and added to the Modeling View.

      Note: Use this method if you are creating a cluster join and need to use a synonym that does not exist. This option enables you to create the synonym and continue to create the cluster join.

    3. Inserting a Segment Manually enables you to insert segments manually, assigning values to segment attribute fields in the Synonym Editor.

      Note: Use this method if you are coding a new Master File, as you would for a FOCUS data source.

    The segment is added in the Modeling View.

  5. Right-click the arrowed lines between tables to view the join options.

    Note: These join options are not available, and do not appear, for FOCUS tables. The only way to view these options are by using relational tables.

    • Join All indicates a multiple instance (one-to-many) type of join. At run time, each host record can have many matching records in the cross-referenced file.

      Note: Join All is the default option.

    • Join Unique indicates a single instance (one-to-one) type of join. At run time, each host record has, at most, one matching record in the cross-referenced file.
    • Join Properties opens the Join Editor dialog box, from which you can determine how the tables are linked. You may:
      • Create Inner,Outer, or Cross Joins.

        Note: Outer joins are subdivided into Left Outer Joins, Inner Joins, or Cross Joins.

      • Combine records from the selected tables by mapping source columns.

    Use the Tree and Text View tabs of the Synonym Editor to view or edit the details of these tables (segments).

    Tip: Click Save As from the Modeling View File menu if you do want to modify the original synonym.


Top of page

x
Procedure: How to Create a Cluster Join Using a New Synonym

Another way to create a cluster join is to start with an empty synonym:

  1. Right-click a Master Files folder, select New, then Synonym via Synonym Editor. The Add Master File dialog box opens.
  2. Enter a unique file name in the File name field.
  3. Click Open.

    The Synonym Editor opens.

  4. Click theModeling View tab.
  5. Right-click in the workspace and select from one of the available options to start building the new view.


WebFOCUS