In addition to the below common configuration, each state may include specific fields described in its respective section.
Go to the right pane of your circuit.
Select Data Transformation and choose Data Set.
Select the required state in the Data Set category.
Drag and drop the selected state into your circuit.
Under Configuration:
Type is set to Task by default.
Task ID and Next State are preselected based on the chosen state and can be modified from the dropdown.
Configure the state specific fields as described in the respective state configuration sections below.
Configure Error Handling, if required.
To configure Input Path, Output Path, Result Path, and Result Selector, click Input/Output next to the Configuration tab. For more details, refer to Input & Output Processing.
Restricts the number of records returned from a dataset by selecting either the first or last N records from an array.
Data: Array of objects to be processed (static or dynamic).
Limit: Maximum number of items(N) to return.
Bound: Determines which end of the array to select from. Choose First to return the first N records or Last to return the last N.
If Limit is set to 4 and Bound is first, the first four records are returned. If Bound is last, the last four records are returned.
Code View
"Limit dataset": {
"start": true,
"module": "dataset",
"task_id": "limit",
"payload": {
"data": [
{ "category": "reference", "price": 8.95, "title": "Sayings of the Century" },
{ "category": "fiction", "price": 8.95, "title": "Sayings of the Century" },
{ "category": "fiction", "price": 8.99, "title": "Moby Dick" },
{ "category": "fiction", "price": 22.99, "title": "The Lord of the Rings" }
],
"limit": 2,
"bound": "first"
},
"next": "End"
}
Eliminates duplicate records from an array of objects to ensure data integrity before processing.
Deduplication Logic
No keys specified: Removes duplicate objects by comparing all fields (retains the first occurrence).
Specific keys specified: Removes objects that have duplicate values for the given keys.
Object specified as key: Removes duplicates only when all fields match.
Exclude enabled: Removes duplicates based on all keys except the specified ones.
Builder View Configuration
Data: Array of objects to process
Keys: The fields to evaluate for duplication (optional)
Exclude: Exclude specified keys from duplication logic. select the checkbox if required.
Code View
{
"Remove duplicate": {
"start": true,
"module": "dataset",
"task_id": "remove_duplicate",
"payload": {
"data": [
{ "category": "reference", "price": 8.95, "title": "Sayings of the Century" },
{ "category": "fiction", "price": 8.95, "title": "Sayings of the Century" },
{ "category": "fiction", "price": 8.99, "title": "Moby Dick" },
{ "category": "fiction", "price": 22.99, "title": "The Lord of the Rings" }
],
"keys": ["category"],
"exclude": true
},
"next": "End"
}
}