• No results found

I MPORTING AN MDM R EPOSITORY S CHEMA

In document ConsoleMDM71 (Page 195-200)

Exporting and Importing Schemas

I MPORTING AN MDM R EPOSITORY S CHEMA

You can import an MDM repository schema using the MDM schema file import mechanism as described in this section.

When you use the Import Schema command to import an XML schema file, MDM: (1) automatically compares the repository against the inbound schema: (2) displays a dialog that highlights and color-codes the differences according to change operation (Add/Delete/Modify); and (3) allows you to individually accept or reject each change.

NOTE ►► You can import a schema into a mounted MDM repository that must be unloaded.

NOTE ►► The resulting merged schema dominates the structure of the repository after import, deleting existing tables and fields from the repository, and creating tables and fields of the schema.

NOTE ►► MDM detects and allows you with property-level granularity to individually accept or reject: (1) changes to repository, table and field properties; (2) the addition of tables and fields; and (3) the deletion of tables and fields.

Import Schema Dialog at a Glance

The Import Schema dialog, shown in Figure 63, consists of three panes:

(1) the Repository+Schema pane, which displays a hierarchy showing the repository schema combined with the inbound schema; (2) the Items pane, which lists every item in the combined schema along with the type of item, the change operation (if any) and whether to accept or reject the schema change; and (3) the Details pane, which lists the properties of the currently selected item (repository/table/field) in the Items pane and whether to accept or reject the property-level changes.

Figure 63. Import Schema dialog

NOTE ►► The schema comparison dialog is like a structured visual diff that provides color-coded change-tracking for each of the schema elements and the individual properties of each element.

TIP ►► The Items pane includes a column named Node that contains the number of the corresponding tree node in the Repository+Schema pane. You can sort by the Node column so that the items in the tree and in the Items pane appear in the same sequence.

NOTE ►► You can Accept or Reject each individual change using the radio buttons: (1) in the Merge column of the Items pane; and (2) in the Merge column of the Details pane, including the ability to: (3) add some but not all the fields of an added table; (4) delete some but not all the fields of a deleted table; and (5) accept some but not all the changes to the set of item properties (for property-level granularity).

Color Coding in the Import Schema Dialog

Import Schema dialog elements are color-coded in the three panes in black, red, magenta, and green, and highlighted in bold, as summarized in Table 47.

Table 47. Color Coding in the Import Schema Dialog

Pane Color Description Black No change to common item.

Black No changes to common item (but child nodes have changes).

Red Common item has modifications to its properties.

Magenta Item appears in repository but not in inbound schema.

Repository +Schema

Green Item appears in inbound schema but not in repository.

Black Common item; no change to accept or reject.

Red Accept change to modify properties of common item.

Magenta Accept change to delete the repository-only item.

Items

Green Accept change to add the inbound schema-only item.

Merge Column

Red Accept change to modify property of common item.

Repository Column

Black Common property value.

Magenta Repository property value.

Schema Column

Black Common property value.

Green Inbound schema property value.

Merged Column

Black Merged common property value.

Magenta Merged property value from repository.

Details

Green Merged property value from inbound schema.

Importing the Schema

You can import the inbound schema as described in this section.

„ To import an XML schema and merge it into an MDM repository:

1. In the Console Hierarchy tree, right-click on the MDM repository into which you want to import the XML schema and choose Transport >

Import Repository Schema from the context menu, or select the tree node and choose Transport > Repositories > Import Schema from the main menu.

2. MDM opens the Windows file Open dialog shown in Figure 64.

Figure 64. Schema import file Open dialog

3. Select the XML schema file to import and click Open. MDM opens the Import Schema dialog like the one shown in Figure 63.

4. Use the radio buttons in the Merge column of the Items pane to Accept or Reject changes for each of the items highlighted in red, magenta, and green.

NOTE ►► MDM will accept the deletion of a table if and only if you accept the deletion of all of its fields, automatically adjusting the table setting as necessary when you change the setting for one of its fields.

NOTE ►► MDM will reject the addition of a table if and only if you reject the addition of all of its fields, automatically adjusting the table setting as necessary when you change the setting for one of its fields.

TIP ►► If some schema items are not matched automatically by MDM or you do not agree with the item matching determined automatically by MDM, you can manually set and/or override them as described in the following section.

5. Use the radio buttons in the Merge column of the Details pane to Accept or Reject individual changes for each of the item properties for items highlighted in red.

NOTE ►► MDM will automatically adjust the item setting as necessary when you change the setting for its individual properties.

6. Click OK to close the dialog. MDM merges the schema changes that you accept into the MDM repository.

Manually Overriding Schema Reconciliation

When you use the Import Schema command, MDM attempts to automatically match items from the inbound schema file with items in the existing repository. Generally, it does a good job of identifying matches using several criteria in order of precedence, as follows:

Compatibility. Incompatible items will never be matched (e.g. a hierarchy table will never be matched with a flat table).

Code match. Items with the same Code will be matched.

Name match. Items with the same Name will be matched.

Empirical. Depending on their type, remaining items might be matched if there are no better alternatives (e.g. two unmatched languages that refer to the same language and country).

You can also use the Match and Unmatch context menu commands to manually set matches and/or override matches determined

automatically by MDM, as described in this section.

NOTE ►► MDM makes no attempt to preserve internal identifiers. If this is important, you should instead use the Archive/Unarchive or Duplicate Repository commands.

NOTE ►► Manual matching can have side-effects (e.g. items shown as modified may become identical; when tables are rematched, the relationships are also rematched). For this reason, you should perform manual matching in the following order: (1) languages; (2) tables; (3) fields; and (4) relationships.

„ To manually match an item to another item:

In the Items pane, right-click on the item you want to manually match, choose Match from the context menu, and then choose from the cascading menu of potential matches.

NOTE ►► Match is enabled only if the selected item is currently unmatched and has at least one compatible unmatched counterpart.

NOTE ►► If the item you want to match does not appear in the cascading menu, either it is: (1) not compatible; or (2) already matched with another item.

NOTE ►► To manually set or override a language match, select the repository item in the Items pane (i.e. the root node in the Repository+

Schema pane) and then select and right-click on the language in the Detail pane rather than the Items pane.

„ To manually unmatch an item:

In the Items pane, right-click on the item you want to unmatch and choose Unmatch from the context menu to cause the single pair of matched items to become two individual unmatched items.

NOTE ►► Unmatch is enabled only if the selected item is currently matched but may logically be unmatched.

In document ConsoleMDM71 (Page 195-200)