Component family |
Talend MDM |
|
Function |
tMDMDelete deletes data records from specific |
|
Purpose |
This component deletes master data in an MDM hub. |
|
Basic settings |
Schema and Edit Schema |
A schema is a row description, it defines the number of fields that will be Since version 5.6, both the Built-In mode and the Repository mode are Click Edit schema to make changes to the schema. If the
Click Sync columns to collect the schema from |
|
|
Built-in: You create the schema and store it |
|
|
Repository: You have already created the schema |
Use an existing connection | Select this check box if you want to use a configured tMDMConnection component. | |
|
URL |
Type in the URL required to access the MDM server. |
|
Username and Password |
Type in the user authentication data for the MDM server. To enter the password, click the […] button next to the |
|
Version (deprecated) |
Type in the name of the Version of master data you want to connect to, for which Leave this field empty if you want to display the default Version of master |
|
Entity |
Type in the name of the entity that holds the data record(s) you want to |
|
Data Container |
Type in the name of the data container that holds the data record(s) you want to |
Type |
Select Master or Staging to specify the database on which the action should be |
|
Use multiple conditions |
Select this check box to filter the master data to be deleted, using certain
Xpath: Enter between quotes the path and the XML
Function: Select the condition to be used from the
Value: Enter between inverted commas the value you
Predicate: Select a predicate if you use more than |
|
|
Keys (in sequence order) |
Specify the field(s) (in sequence order) composing the key when the entity have |
Fire Delete event |
NoteThe check box is available only if you select Master from the Type list. Select this check box so that a delete event will be generated and written into
For further information about the UpdateReport |
|
|
Logical delete |
Select this check box to send the master data to the Recycle bin and fill in the |
|
Die on error |
Select this check box to skip the row in error and complete the process for |
Advanced settings |
tStatCatcher Statistics |
Select this check box to gather the processing metadata at the Job level as well |
Global Variables |
ERROR_MESSAGE: the error message generated by the NB_LINE: the number of rows processed. This is an After A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Usage |
If the Use multiple conditions check box is |
This scenario describes a six-component Job that deletes the specified data record from
the MDM Hub. It also makes use of the tMDMCommit and
tMDMRollback components so that changes to the database are
only made on successful completion of the Job.
-
Drop tMDMConnection, tMDMCommit, tMDMClose, tMDMInput, tMDMDelete, and
tMDMRollback from the Talend MDM family from the
Palette onto the design workspace. -
Connect tMDMInput to tMDMDelete using a Row > Main link.
-
Connect tMDMConnection to tMDMInput using a Trigger > OnSubjobOk link.
-
Connect tMDMDelete to tMDMCommit, tMDMCommit to tMDMClose and tMDMRollback to
tMDMClose using Trigger > OnComponentOk links. -
Connect tMDMDelete to tMDMRollback using a Trigger > OnComponentError link.
In this scenario, a tMDMConnection component is used to
open an MDM server connection for convenient reuse in the subsequent subjob that performs
the data record deletion task.
-
Double-click tMDMConnection to display its
Basic settings view and define the component
properties. -
In the URL field, enter the MDM server URL, between
quotation marks: for example, “http://localhost:8180/talend/TalendPort”. -
In the Username and Password fields, enter your user name and password to connect to the MDM
server. -
In the Version field (deprecated), enter the name
of the master data Version you want to access, between quotation marks. Leave this field
empty to access the default master data Version. -
Double-click tMDMCommit to display its Basic settings view and define the component properties.
This component commits the changes made to the database on successful completion of
the proceeding subjob. -
From the Component List list, select the component
for the server connection you want to close if you have configured more than one MDM
server connection. In this use case, there is only one MDM server connection open, so
simply use the default setting. -
Deselect the Close Connection check box if it is
selected. In this example, the tMDMClose component
closes the connection to the MDM Server. -
Double-click tMDMRollback to display its Basic settings view and define the component properties.
This component rolls back any changes and returns the database to its previous state
if the proceeding subjob fails. -
From the Component List list, select the component
for the server connection you want to close if you have configured more than one MDM
server connection. In this use case, there is only one MDM server connection open, so
simply use the default setting. -
Deslect the Close Connection check box if it is
selected. In this example, the tMDMClose component
closes the connection to the MDM Server. -
Double-click tMDMClose to display its Basic settings view and define the component properties.
Note
The tMDMClose component is used to close the
connection after the successful execution of the Job. You can also close the
connection by selecting the Close Connection check
box in the tMDMCommit and tMDMRollback components, but for the purposes of this scenario the
tMDMClose component is used instead. -
From the Component List list, select the component
for the server connection you want to close if you have configured more than one MDM
server connection. In this use case, there is only one MDM server connection open, so
simply use the default setting.
-
Double-click tMDMInput to display its Basic settings view and define the component properties.
-
From the Property Type list, select Built-in to complete the fields manually.
If you have stored the MDM connection information in the repository metadata, select
Repository from the list and the fields will be
completed automatically. -
From the Schema list, select Built-in and click […] next to
Edit schema to open a dialog box.Here you can define the structure of the master data you want to read in the MDM
hub. -
The master data is collected in a three-column schema of the type String: Id, Name and
Price. Click OK to close the
dialog box and proceed to the next step. -
Select the Use an existing connection check box,
and from the Component List list that appears, select
the component you have configured to open your MDM server connection.In this scenario, only one MDM server connection exists, so simply use the default
selection. -
In the Entity field, enter the name of the business
entity that holds the data record(s) you want to read, between quotation marks. Here, we
want to access the Product entity. -
In the Data Container field, enter the name of the
data container that holds the master data you want to read, between quotation marks. In
this example, we use the Product container.Note
The Use multiple conditions check box is selected
by default. -
In the Operations table, define the conditions to
filter the master data you want to delete as follows:-
Click the plus button to add a new line.
-
In the Xpath column, enter the Xpath and the
tag of the XML node on which you want to apply the filter, between quotation marks.
In this example, we work with the Product entity,
so enter “Product/Name”.
-
In the Function column, select the function you
want to use. In this scenario, we use the Contains
function.
-
In the Value column, enter the value of your
filter. Here, we want to filter the master data where the Name contains mug.
-
-
In the Component view, click Advanced settings to set the advanced parameters.
-
In the Loop XPath query field, enter the structure
and the name of the XML node on which the loop is to be carried out, between quotation
marks. -
In the Mapping table and in the XPath query column, enter the name of the XML tag in which you
want to collect the master data, next to the corresponding output column name, between
quotation marks.
-
In the design workspace, double-click the tMDMDelete component to display the Basic
settings view and set the component properties. -
From the Schema list, select Built-in and click the three-dot button next to the Edit Schema field to describe the structure of the master data in the MDM
hub. -
Click the plus button to the right to add one column of the type String. In this example, name this column
outputXML. Click OK to close the
dialog box and proceed to the next step. -
Select the Use an existing connection check box,
and from the Component List list that appears, select
the component you have configured to open your MDM server connection.In this scenario, only one MDM server connection exists, so simply use the default
selection. -
In the Entity field, enter the name of the business
entity that holds the master data you want to delete, the Product
entity in this example. -
In the Data Container, enter the name of the data
container that holds the data to be deleted, Product in this
example. -
In the Keys table, click the plus button to add a
new line. In the Keys column, select the column that
holds the key of the Product entity. Here, the key of the
Product entity is set on the Id field.Note
If the entity has multiple keys, add as many line as required for the keys and
select them in sequential order. -
If needed, select the Fire Delete event check box,
so that the delete event will be generated and written into UpdateReport. -
Select the Logical delete check box if you do not
want to delete the master data permanently. This will send the deleted data to the
Recycle bin. Once in the Recycle bin, the master data can be restored or permanently
deleted. If you leave this check box clear, the master data will be permanently
deleted. -
Fill in the Recycle bin path field. Here, we left
the default path but if your recycle bin is in a path different from the default,
specify the path.