Managing data models - 6.3

Talend Data Fabric Studio User Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
task
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

An authorized user can also import/export, copy/paste and delete created data models from Talend Studio.

Note

It is also possible to import and share MDM complete projects or only a data model or part of the data model from the community web page, Talend Exchange. For further information, see Projects/objects on Talend Exchange.

How to export data models

From Talend Studio you can export one or multiple data models in order to exchange them between two different MDM servers or repositories.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. At least one data model exists.

To export one or multiple data models:

  1. In the MDM Repository tree view, right-click the Data Model node and select Export Items from the contextual menu.

    The [Export Repository items] dialog box appears and the Data Model check box is selected by default.

    Note

    If you want to export all data objects in the repository and not only data models, click the Select All button to select the check boxes of all data objects in the list.

  2. To export the selected data models in a folder, select the Select root directory option and click the three-dot button next to the option.

    A dialog box appears.

  3. Browse to where you want to save the data model and click OK to close the dialog box.

    The path to the target folder is set in the field next to the selected option.

  4. Click the Add Dependencies button to add dependencies for the selected object or objects.

    You can click the Add Dependencies button for multiple times until all object dependencies are added or click the Add All Dependencies button to add all object dependencies in one go.

    For more information about object dependencies, see Managing object dependencies in the MDM Repository.

  5. In the [Export items] dialog box, click Finish to validate your changes and close the dialog box.

    A folder holding all data models in the current MDM Repository is created in the specified path. An XML file that lists all exported elements is also created.

  6. To export the selected data models in a zip file, select the Select archive file option in the [Export Items] dialog box and then click the three-dot button next to the option.

    A dialog box appears.

  7. Browse to where you want to save the data model archive file.

  8. In the File Name field, enter a name for the archive file and then click Open to close the dialog box.

    The path to the target archive file is set in the field next to the selected option.

  9. In the [Export items] dialog box, click Finish to validate your changes and close the dialog box.

    An archive file holding all data models in the current MDM Repository is created in the specified path. An XML file that lists all exported elements is also created.

Note

If you want to export only one data model of all those in the MDM Repository, expand Data Model in the [Export items] dialog box and then select the check box next to the name of the data model you want to export and proceed as usual.

How to import data models

From Talend Studio you can import data models into the current MDM Repository that have been created in other MDM Repositories.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. You have exported one or multiple data models from other MDM repositories.

To import one or multiple data models into the current MDM Repository:

  1. In the MDM Repository tree view, right-click the Data Model node and select Import items from the contextual menu.

    The [Import items] dialog box displays.

  2. Select the root directory or archive file option according to whether the data models you want to import are saved in a folder/archive file and then click Browse next to the option.

    A dialog box appears.

  3. Browse to the folder/archive file holding the data models and click OK/Open to close the dialog box.

  4. In the [Import items] dialog box, click Finish to validate your changes and close the dialog box.

    All data models in the folder/archive file are exported and listed under the Data Model node in the current Talend Studio.

Note

If you want to import only one data model of all those saved in the folder/archive file, expand Data Model in the [Import items] dialog box and then select the check box next to the name of the data model you want to import and proceed as usual.

How to edit properties of a data model

You are allowed to edit properties of a data model.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. At least one data model exists.

To edit properties of a data model from the data model editor, do the following:

  1. In the MDM Repository tree view, expand the Data Model node.

  2. Right-click the data model you want to edit and select Edit properties from the contextual menu.

    A dialog box pops up.

  3. Edit the properties of a data model, for example, name, purpose or description, according to your needs.

  4. Click Finish to save your changes.

You can also edit any element in the data model from the Properties view in the data model editor. For further information, see How to use the Properties view in the data model editor.

How to copy/paste a data model

To avoid creating a data model from scratch, you can copy an existing one in the MDM Repository tree view and modify its properties and/or attributes to have a new data model.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. At least one data model exists.

To copy/paste a data model, do the following:

  1. In the MDM Repository tree view, expand the Data Model node.

  2. Right-click the data model you want to duplicate and select Copy from the contextual menu.

  3. Right-click the Data Model node and select Paste from the contextual menu.

    A dialog box is displayed, prompting you to enter a name for the new data model.

  4. Enter a name for the new data model and click OK to validate the changes and close the dialog box.

The new data model is listed under the Data Model node in the MDM Repository tree view.

How to duplicate a data model

To avoid creating a data model from scratch, you can duplicate an existing one in the MDM Repository tree view and modify its properties and/or attributes to have a new data model.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. At least one data model exists.

To duplicate a data model, do the following:

  1. In the MDM Repository tree view, expand the Data Model node.

  2. Right-click the data model you want to duplicate and select Duplicate from the contextual menu.

    A dialog box is displayed, prompting you to enter a name for the new data model

  3. Enter a name for the new data model and click OK to validate the changes and close the dialog box.

The new data model is listed under the Data Model node in the MDM Repository tree view.

How to remove a data model

You can remove a data model from the Data Model node and send it to the recycle bin if needed.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. At least one data model exists.

  1. In the MDM Repository tree view, expand the Data Model node.

  2. Right-click the data model you want to remove and select Remove from Repository from the contextual menu.

    A confirmation dialog box is displayed, prompting you to confirm the operation or to cancel it.

  3. Click OK to close the dialog box.

The data model is removed from the Data Model node and placed into the Recycle bin node.

Once in the recycle bin, you can delete the data model permanently or restore it.

How to enable foreign key integrity checking

You can enable foreign key integrity checking to manage whether users are allowed to delete a record that is linked to another record through a foreign key. By default, this is not allowed.

To enable foreign key integrity checking:

  1. In the MDM Repository tree view, expand the Data Model node and double-click the data model for which you want to enable foreign key integrity checking.

    The corresponding editor opens with the selected data model displayed.

  2. Select the entity containing the foreign key for which you want to enable integrity checking.

  3. In the Properties view, click the Relationship tab.

  4. Under the Foreign Key section:

    • Select the Enforce FK integrity check box to enable foreign key integrity checking, that is, to raise an error whenever a user tries to delete a record if the record is linked to any other records through this foreign key.

    • Select the Allow FK integrity override check box to allow users to force the delete of a record even if it is linked to another record through this foreign key.

These two options can be combined in the following ways.

 Enforce FK integrity enabledEnforce FK integrity disabled
Allow FK integrity override enabledDelete allowed, with user prompted for overrideDelete allowed
Allow FK integrity override disabledDelete forbiddenDelete allowed

In the case of conflicts, the least tolerant rule is always applied.

If a user is prevented from deleting a record, details are provided in <$INSTALLDIR>/logs/mdm.log.

Handling circular dependencies

If you are using a SQL database to store your data records, you may encounter an error during initialization because a circular dependency is detected. This means that, for example, EntityA references EntityB, EntityB references EntityC, and EntityC references EntityA.

To fix the data model in such a case, simply turn off Foreign Key integrity checking for the relation, as described in How to enable foreign key integrity checking.

How to check the validity of a Data Model

Whenever you make changes to your Data Model, Talend Studio can perform a series of checks to ensure that the Data Model is valid. By default, these checks are performed when you save your Data Model and when you deploy your Data Model, and can also be launched manually.

After checking the validity of a data model, Talend Studio also provides the impact analysis result if the data model changes impact the database schema. For more information, see How to deal with the impact of data model changes.

Items in the Data Model that are validated include:

  • Entities (other than Reusable Types):

    • Lookup fields

    • Primary keys

    • Primary key information

    • Inheritance

  • Fields (may occur in Entities or Reusable Types):

    • Foreign keys

    • Foreign key information

The validation check reports both errors (issues which mean your Data Model is not valid) and warnings (issues which do not affect the validity of your Data Model, but which may not provide the result you expect). This report is shown in the MDM Problem View of the console.

How to launch a validation check manually

To launch a validation check manually, without saving any changes you may have made to your Data Model, do the following:

  1. In the MDM Repository tree view, expand Data Model, right-click the Data Model on which you want to perform a validation check, and then click Validate.

  2. In the [Validation Result Dialog] that opens, click the Details >> button for more information on any errors or warnings that may be found.

How to identify the source of validation issues

When the Data Model validation check reports issues with your Data Model, it also helps you identify where these issues occur so you can fix them.

To identify the source of validation issues, do the following.

  1. In the MDM Problem View of the console, double-click the error or warning.

    The Data Model opens on the Schema Source tab.

  2. Click the red error marker in the right-hand scrollbar to jump directly to the point where the error or warning has been identified, and perform any changes necessary to make the Data Model valid.

Note that you can also customize how the MDM Problem View displays errors and warnings in the console by clicking the View Menu button , for instance to group them by type (error or warning).

How to configure the validation check

By default, the validation check is performed when you launch it manually, when you save any changes to your Data Model, or when you deploy the Data Model to the server. You can configure this behavior in the preferences for the Data Model validation check.

To configure the preferences for the Data Model validation check, do the following.

  1. Click Window > Preferences.

  2. In the [Preferences] window that opens, expand Talend > MDM and then click Data Model Validation.

  3. In the [Data Model Validation] preferences, select the situations in which you want a validation check to be performed on your Data Model.

    • User initiated validation: Users can launch a check manually.

    • Validation on save: A check is performed when the user saves any changes to the Data Model.

    • Validation on deploy: A check is performed when the user deploys the Data Model to the server.

    If you choose to perform a validation when the user deploys the Data Model to the server, you can also specify what happens if issues are found.

How to deal with the impact of data model changes

When designing a data model, you can make as many changes as required to the data model before you deploy the modified data model to the MDM server to check if the changes make sense.

When you deploy the data model, Talend Studio will perform a series of checks to ensure the validity of the data model. For more information, see How to check the validity of a Data Model.

After the validity checking of a data model, if the changes you made to the data model impact the database schema, for example, adding new elements to one entity in the data model, Talend Studio provides the impact analysis result when you deploy the modified data model to the MDM server which helps you to decide whether to cancel the operation or continue the deployment.

The impact analysis result shows the relevant data model, the description of the changes made to the data model, the level of each change and the operation to be performed.

If a data model change has an impact level of Medium or High and leads to table recreation, the impact analysis result also lists the entities to be dropped and recreated.