cDataset
Creates a new dataset or reference an existing dataset to send or receive
messages.
messages.
cDataset Standard properties
These properties are used to configure cDataset running in the Standard Job framework.
The Standard
cDataset component belongs to the Testing family.
Basic settings
Id |
The ID of the Dataset bean. |
Produce Delay | Specify a delay in milliseconds to cause producers to pause. |
Consume Delay | Specify a delay in milliseconds to cause consumers to pause. |
Preload Size | Specify how many messages should be sent before the Route completes its initialization. |
Initial Delay | Specify the time in milliseconds to wait before starting sending messages. |
Minimum Rate | Specify the least number of messages that the dataset should contain before starting sending messages. |
Register new Bean | Select this check box to register a new bean. |
Bean Class | Enter the class of the bean. This field appears when the Register new Bean check box is selected. |
Arguments | Set the optional arguments in the corresponding table. Click [+] as many times as required to add arguments to the table. This table appears when the Register new Bean check box is selected. |
Usage
Usage rule |
cDataset can be a start, middle, or end component of a |
Limitation |
 n/a |
Using cDataset to create messages
This scenario applies only to Talend Open Studio for ESB, Talend Data Services Platform and Talend Data Fabric.
In this scenario, a cDataset component is
used to create a DataSet instance as a source of messages.
Dropping and linking the components
-
From the Testing folder, drag
and drop a cDataset component onto the
design workspace. -
From the Core folder, drag and
drop a cSetBody component onto the design
workspace. -
From the Miscellaneous folder,
drag and drop two cLog components onto the
design workspace. -
Connect the components using Row > Route
connections. -
Label the components to better identify their roles in the Route,
as shown above.
Configuring the components
-
Double-click the cDataset
component to open its Basic settings view
in the Component tab. -
In the Id field, enter
"myDataset"
as the dataset bean ID. -
In the Arguments table, click [+]
to add a row and enter 1000 in the
Value field to create 1000 messages. Keep the default
settings of the other options.In the Bean Class field,
the default implementation that is shipped by Camelorg.apache.camel.component.dataset.SimpleDataSet
is set. In this
use case, a new dataset bean is registered. -
Double-click the cSetBody
component to open its Basic settings view
in the Component tab. -
Select Constant in the
Language list and enter"Hello!"
in the Expression field as the message body. -
Keep the default settings of the cLog components to
monitor the message exchanges. -
Press Ctrl+S to save your
Route.
Viewing the code and executing the Route
-
Click the Code tab at the
bottom of the design workspace to have a look at the generated code.As shown in the code, the Route is builtfrom
thecDataset_cDataset_1
endpoint, routed.to
thecDataset_cLog_1
, set
the message body as"Hello!"
by the
cDataset_cSetBody_1
, and then routed.to
thecDataset_cLog_2
. -
Press F6 to execute the Route.
A DataSet of 1000 messages is created and logged in the execution
console. The default message body is
<hello>world!</hello>
. It is changed to
Hello!
.
Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Login
0 Comments