Creating a View - 6.5

Talend Data Fabric Studio User Guide

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

From Talend Studio you can easily create simple views over the same business entity or composite Views over multiple business entities held in the same data model.

Note

You can also create multiple simple Views over the same business entity to allow users to have different predefined accesses on the records by defining different search criteria in each View. The # character is used to create multiple views on the same entity; for example two views on the Agency entity may have the following names: Browse_items_Agency and Browse_items_Agencynt#UK where the second View will give access only to agencies based in the United Kingdom.

Note also that, for improved readability, in the MDM Repository view, Views are stored in subfolders by type and only the second part of the name is displayed.

Creating a simple View on a business entity allows a business user inside Talend MDM Web User Interface to visualize specific elements in this entity according to the defined criteria. For more information on how to view/search elements in a specific business entity, see the Talend MDM Web User Interface User Guide.

Creating a composite View on several business entities allows a business user inside Talend MDM Web User Interface to visualize specific elements in multiple entities according to a join clause. A composite View can provide greater insight on master data than a simple View. For more information, see Talend MDM Web User Interface User Guide.

Note

It is also possible to attach a Process to the View in order to transform/enrich data, on the fly, by looking up fields in the source system. For further information, see Running the view result through a Process (registry style lookup).

The sections below explain how to create each of these two types of Views.

How to create a simple View

Prerequisite(s):

  • You have already connected to the MDM server from Talend Studio.

  • You have the appropriate user authorization to create a View.

Creating a simple View
  1. In the MDM Repository tree view, right-click View and select New from the contextual menu.

    The [New View] dialog box displays.

    Note

    As the simple View is concerned with only one specific entity, its name must follow a specific pattern that includes the name of the entity: Browse_items_<name of the business entity>. The dialog box is displayed with the by-default text Browse_items. However, you can use the # character to create multiple views on the same entity; for example two views on the Agency entity may have the following names: Browse_items_Agency and Browse_items_Agencynt#UK where the second View will give access only to agencies based in the United Kingdom.

    Note also that, for improved readability, in the MDM Repository view, Views are stored in subfolders by type and only the second part of the name is displayed.

  2. Enter a name for the new View and then click OK to close the dialog box.

  3. Click the three-dot button to open a dialog box where you can select the entity for which you want to create a View and then click OK to close the dialog box.

    An editor for the newly created View opens in the workspace.

    Note

    You can automate the above steps to create a default View. Select one or more entities in the data model, right-click the selection and then click Generate Default Browse Items Views. This creates a default View which is listed under the View node in the MDM Repository tree view. By default, the Viewable Business Elements and Searchable Business Elements areas in the default View are populated with the top five elements.

    You can then proceed as below in order to define the View criteria.

  4. Click the three-dot button next to Description to open a dialog box where you can add multilingual labels to the new View.

  5. From the list to the left, select a language and enter the corresponding label in the field to the right.

    Click the button to add the description to the Language/Label list.

    Repeat the operation to add as many labels as needed and click OK to close the dialog box.

    All defined labels display in the Description field.

  6. If required, select the Run the view result through a Process check box and then select from the list the Process you want to attach to the current View. The Process will be used to transform/enrich data, on the fly, by looking up fields in the source system. For further information, see Running the view result through a Process (registry style lookup).

Defining the simple View
  1. In the Viewable Business Elements area, click the button to add a new XPath line to the table.

  2. In the new XPath line, click the three-dot button to open a dialog box.

    By default, only the selected entity of all the entities that constitute the data model will be listed in the dialog box and its name will display in the Filter field.

    Note

    You can list multiple entities in the dialog box if you type in the Filter field the text according to which you want to filter business entities. This is a search-as-you-type filter where entities are instantly filtered as you type your search string.

  3. Select the element to be retrieved by the View and repeat the procedure to add as many elements as needed.

    Note

    You can also retrieve the foreign key information and display it to the business user in the [Browse Records] page in Talend MDM Web User Interface. For further information, see How to create a simple View that displays the foreign key information.

  4. In the Searchable Business Elements area, click the button to add a new XPath line to the table.

  5. In the new XPath line, click the three-dot button to open a dialog box where you can select the element to be located.

    By default, only the selected entity of all the entities that constitute the data model will be listed in the dialog box and its name will display in the Filter field.

    Note

    You can list multiple entities in the dialog box if you type in the Filter field the text according to which you want to filter business entities. This is a search-as-you-type filter where entities are instantly filtered as you type your search string.

  6. In the Where Conditions area, click the button to add a new XPath line to the table.

  7. In the new XPath line, click the three-dot button to open a dialog box where you can select the element you want to define conditions on.

    Note

    You can list multiple entities in the dialog box if you type in the Filter field the text according to which you want to filter business entities. This is a search-as-you-type filter where entities are instantly filtered as you type your search string.

    You can define conditions with various operators listed in the Operator column. You can also join elements using different operators listed in the Predicate column.

    For more information about the behaviors of filters using multiple conditions and predicates, see the documentation on Talend Help Center (https://help.talend.com).

    Before using the operators, bear in mind the following:

    • Searches in the master database support both full text search and standard SQL search, while searches in the staging database only support standard SQL search. For more information about how to manage database search modes, see the Talend Installation Guide.

    • The operator != does not support multi-occurrence fields or complex type fields.

    The following operators are available:

    Operator

    Usage

    Contains1

    Returns a result which contains the word or words entered. Note that the full text search does not support special characters such as @, #, $.

    Contains the sentence1

    Returns one or more results which contain the sentence entered.

    Joins With

    Returns a result which functions as a join operator.

    Starts With

    Returns a result which begins with the string entered.

    Is Empty Or Null

    Returns a result where the field is empty or returns a null value.

    whole content contains1

    Returns a result of a plain text search based on the selected complex type field.

    =

    Returns a result which matches the value entered.

    !=

    Returns a result of any value other than the null value and the value entered.

    >

    Returns a result which is greater than the numerical value entered. Applies to number fields only.

    >=

    Returns a result which is greater than or equal to the numerical value entered. Applies to number fields only.

    <

    Returns a result which is less than the numerical value entered. Applies to number fields only.

    <=

    Returns a result which is less than or equal to the numerical value entered. Applies to number fields only.

    1. Standard SQL search considers the search content as an integrate phrase to be matched, while full text search interprets the search content as a phrase which contains multiple words, and the records that match any of the words will be returned. For example, if the search content is "test first name", full text search will consider it as three independent words "test", "first", and "name", while standard SQL search will consider it as one phrase "test first name".

  8. In the Value field, you can enter a string directly, or select an Entity element or customize it into a user-based variable.

    To define a user-based variable in the Value field, firstly click in the field, then click the down arrow button and select ${user_context}... from the contextual menu. A dialog box opens asking you to select an appropriate server. Once you have made your choice, the [Select Variable] dialog box opens, where you can select one attribute of the user from the list.

    The value of a user-based variable depends on the information and properties of the user currently logged into Talend MDM Web User Interface. The information of a user includes general information such as user name and dynamic properties specific to the user. For more information, see the section about user management procedures in Talend MDM Web User Interface User Guide.

    Note

    If you select properties in the [Select Variable] dialog box, you need to enter a valid property name predefined in Talend MDM Web User Interface so that the user-based variable will take the format of ${user_context}.properties["current_user_property_name"]}.

  9. Click the save icon on the toolbar or press Ctrl + S on your keyboard to save your changes.

    The newly created View is listed under the View node in the MDM Repository tree view.

    Using Talend MDM Web User Interface, an authorized business user can now visualize specific records in this entity according to the defined criteria. For more information on how to view/search elements in a specific business entity, see the Talend MDM Web User Interface User Guide.

    Note

    You can use the and icons in the view editor to copy/paste items among Viewable Business Elements, Searchable Business Elements and Where Conditions tables.

How to create a simple View that displays the foreign key information

The simple views you create on business entities in Talend Studio enables business users using Talend MDM Web User Interface to visualize specific records/attributes in this entity according to the defined criteria.

Prerequisite(s): You have already connected to the MDM server from Talend Studio. You have the appropriate user authorization to create a View.

Consider as an example that your data model holds the Agency and Agent entities. You have added a foreign key attribute, AgencyFK, in the Agent entity that points to the Agency entity. This attribute will link every agent to an agency. For further information, see How to add a foreign key: linking entities together.

To create a simple View that displays the foreign key information, do the following:

  1. Follow the steps outlined in How to create a simple View to create a simple view on the Agent entity.

  2. In the Viewable Business Elements table, click the button to add a new XPath line.

  3. In the new XPath line, click the three-dot button to open a dialog box.

  4. Select the foreign key element to be retrieved by the View, AgencyFK in this example.

  5. Click the save icon on the toolbar or press Ctrl + S on your keyboard to save your View.

The newly created View is listed under the View node in the MDM Repository tree view.

Using Talend MDM Web User Interface, an authorized business user can now visualize the agent records with all the elements you defined in the View including the agency to which each agent is attached.

For more information on how to view/search elements in a specific business entity, see Talend MDM Web User Interface User Guide.

How to create a composite View

Prerequisite(s): You have already connected to the MDM server from Talend Studio. You have the appropriate user authorization to create a View.

To create a composite View, do the following:

  1. In the MDM Repository tree view, right-click View and select New from the contextual menu.

    The [New View] dialog box displays.