July 30, 2023

cDataset – Docs for ESB ESB 7.x

cDataset

Creates a new dataset or reference an existing dataset to send or receive
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
Route.

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.

cDataset_1.png

Dropping and linking the components

  1. From the Testing folder, drag
    and drop a cDataset component onto the
    design workspace.
  2. From the Core folder, drag and
    drop a cSetBody component onto the design
    workspace.
  3. From the Miscellaneous folder,
    drag and drop two cLog components onto the
    design workspace.
  4. Connect the components using Row > Route
    connections.
  5. Label the components to better identify their roles in the Route,
    as shown above.

Configuring the components

  1. Double-click the cDataset
    component to open its Basic settings view
    in the Component tab.

    cDataset_2.png

  2. In the Id field, enter
    "myDataset" as the dataset bean ID.
  3. 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 Camel org.apache.camel.component.dataset.SimpleDataSet is set. In this
    use case, a new dataset bean is registered.
  4. Double-click the cSetBody
    component to open its Basic settings view
    in the Component tab.

    cDataset_3.png

  5. Select Constant in the
    Language list and enter "Hello!" in the Expression field as the message body.
  6. Keep the default settings of the cLog components to
    monitor the message exchanges.
  7. Press Ctrl+S to save your
    Route.

Viewing the code and executing the Route

  1. Click the Code tab at the
    bottom of the design workspace to have a look at the generated code.

    cDataset_4.png

    As shown in the code, the Route is built from the cDataset_cDataset_1
    endpoint, routed .to the cDataset_cLog_1, set
    the message body as "Hello!" by the
    cDataset_cSetBody_1, and then routed .to
    the cDataset_cLog_2.
  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!.
    cDataset_5.png


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x