---
title: Data Pipeline Controls
date: 2025-12-29T09:26:24Z
modified: 2026-10-22T12:49:22Z
permalink: "https://ezintegrations.ai/docs/what-are-data-pipeline-controls/"
type: docs
status: publish
excerpt: ""
wpid: 2932
doc_category:
  - Data Operations
author: Arun Thakur
---

## Sleep Time

### Overview

Sleep Time operation introduces a controlled pause in pipeline execution for a user-defined number of seconds.

### Description

This operation helps delay the execution flow, enabling synchronization, rate control, and dependency management within data pipelines.

### Number of Parameters

1

### Parameter: Sleep Time

Specifies the pause duration in seconds.

📋

60


---

## Python Operation

### Overview

Python Operation allows users to implement custom logic for data transformation when predefined operations are insufficient.

### Description

Users can write Python scripts to modify, enrich, and process pipeline data dynamically using predefined system variables.

### Important Parameters

- **Responsedata**: Initialized as an empty list to store results.
- **pycode\_data**: Contains the incoming pipeline data.

### Number of Parameters

1

### Parameter: Pycode

Defines the Python script used for data transformation.

### Input Data Example

📋

{
 "attributeid": 212077,
 "attributename": "item_no",
 "attributevalue": "999898"
}


### Python Code Example

📋

Responsedata = []

keyname = ["attributename"]
keyvalue = ["attributevalue"]

for i in keyname:
    attributename = pycode_data.pop(i, None)

for j in keyvalue:
    attributevalue = pycode_data.pop(j, None)

pycode_data[attributename] = attributevalue


### Output Example

📋

{
 "attributeid": 212077,
 "item_no": "999898"
}


---

## Switch Operation

### Overview

The Switch Operation applies conditional logic to control the flow of data through different execution paths. Similar to an if-else or if-else-if statement in programming, it evaluates one or more conditions and routes records to the corresponding output path when a condition is met.

### Description

The Switch Operation evaluates logical expressions against incoming data records and directs each record to the appropriate output branch based on the configured conditions.

You can define multiple conditions within a single Switch Operation. Each condition is associated with a separate output path, allowing records to be processed differently depending on the evaluation result.

Conditions are evaluated in the order they are configured. When a record satisfies a condition, it is routed through the corresponding output connection.

Common use cases include:

- Filtering records based on field values.
- Routing data to different destinations.
- Applying business rules to incoming records.
- Separating valid and invalid records.
- Handling duplicate or exception records.
- Creating multi-path workflows based on record attributes.

### Parameters

### Parameter: Condition

A logical expression used to determine whether a record should be routed through a specific output path.

Conditions can reference input data fields, variables, and constants, and can use supported comparison and logical operators.

**Example:**

📋

data['Order Status'] == 'pending'


### Parameter: Add New Condition

Use **Add Condition** to create additional routing rules within the same Switch Operation.

Each new condition:

- Creates a new output branch.
- Can contain its own logical expression.
- Is evaluated independently.
- Can be connected to a different downstream operation.

This enables a single Switch Operation to handle multiple decision paths without requiring additional Switch nodes.

### Example Configuration



| Output | Condition |
| --- | --- |
| 1 | data\[‘BUSINESSUNIT’\] == ‘Sales’ |
| 2 | len(str(data\[‘CUSTOMERID’\])) > 5 |
| 3 | data\[‘BUSINESSUNIT’\] not in duplicate\_list |

### Supported Operators

#### Comparison Operators



| Operator | Description |
| --- | --- |
| == | Equal to |
| != | Not equal to |
| < | Less than |
| > | Greater than |
| <= | Less than or equal to |
| >= | Greater than or equal to |

#### Logical Operators



| Operator | Description |
| --- | --- |
| and | Returns true if all conditions are true |
| or | Returns true if any condition is true |
| not | Reverses a condition result |

#### Membership Operators



| Operator | Description |
| --- | --- |
| in | Checks whether a value exists in a collection |
| not in | Checks whether a value does not exist in a collection |

#### Identity Operators



| Operator | Description |
| --- | --- |
| is | Checks whether two references point to the same object |
| is not | Checks whether two references do not point to the same object |

### Examples

#### Route Pending Orders

Routes records where the Order Status is pending.

📋

data['Order Status'] == 'pending'


#### Multiple Conditions Using OR

Routes records when the ID is either 5 or 6.

📋

data['id'] == 5 or data['id'] == 6


#### Check Value Not Present

Routes records whose IP address is not present in the blocked IP list.

📋

data['ipAddress'] not in blocked_ips


#### Combine Conditions

Routes records where both conditions are true.

📋

data['Country'] == 'USA' and data['Status'] == 'Active'


#### Check for Null Values

Routes records where the Customer ID is null.

📋

data['CustomerId'] is None


#### Filter Duplicate Records

Routes records only when the Business Unit value is not found in the duplicate list.

📋

data['BUSINESSUNIT'] not in duplicate_list




## Filter Operation

### Overview

Filter Operation applies conditional logic to control data flow using if-else expressions.

### Description

This operation evaluates logical expressions and filters records based on defined conditions.

### Parameter: Conditional Statement

Defines logical expressions using operators and data references.

### Supported Operators

- ==, !=, <, >, <=, >=
- and, or, not
- in, not in
- is, is not

### Examples

📋

data['Order Status']=='pending'


📋

'id'==5 or data['id']==6


📋

'ipAddress' not in data


---

## Filter Ends

**Description:**

This operation ends the filter for a given streaming pipeline.

**Number of Parameters : 0**

---

## AI Operation

### Overview

AI Operation transforms data using natural language instructions.

### Description

Users provide plain English instructions that define how input data should be modified. The system generates and executes the logic automatically.

### Number of Parameters

1

### Parameter: Instructions

Defines the natural language transformation rule.

### Example: Grouping Data

📋

Group the given order data into customer, product, shipping, and financial sections.


---

## Text to Operations

### Overview

Text to Operations enables data transformation using either plain English instructions or direct Python code.

### Description

This operation converts user instructions into executable Python logic or runs user-provided scripts in real time.

### How It Works

Natural language prompts are translated into Python code using backend intelligence. Users may also supply their own code.

### System Parameters

- **Responsedata**: Stores operation results.
- **pycode\_data**: Holds incoming dataset.

### Number of Parameters

1

### Parameter: Instruction

Accepts either plain English instructions or Python scripts.

### Example: Convert Last Name to Lowercase

📋

From the source data, convert the value of the last_name key to lowercase.


### Generated Code

📋

Responsedata = []

for user in pycode_data['bizdata_dataset_response']['data']:
    user['last_name'] = user['last_name'].lower()
    Responsedata.append(user)


### Forward Code Option

Forward Code is a UI toggle that allows generated Python code to be reused in subsequent operations.

---

## HITL (Human-in-the-Loop)

### Overview

Human-in-the-Loop (HITL) enables manual review and approval of selected records before they continue through an Integration Bridge pipeline. Records that meet configured review conditions are paused for human intervention, while all other records continue processing automatically without interruption.

### When to Use

Use the HITL operation when certain records require manual verification before further processing. This is useful for reviewing records that meet specific business rules, require additional validation, or need approval before continuing through the workflow.

### Description

The HITL operation enables sequential human review of records by assigned reviewers. Configure a Switch operation before the HITL operation to define the conditions under which records are routed for human review. The Assignees parameter defines an ordered list of reviewers who must approve the record sequentially. The first assignee receives the review request first. After approval, the next reviewer in the list is notified automatically. This process continues until all assigned reviewers approve the record. If any reviewer rejects the record, the approval process stops immediately, and the record does not resume processing..

### Number of Parameters

**1**

### Parameter 1: Assignees

The **Assignees** parameter defines an ordered list of reviewers who must approve the record sequentially.

The first assignee receives the review request first. After approval, the next reviewer in the list is notified automatically. This process continues until every assigned reviewer approves the record. If any reviewer rejects the record, the approval process stops immediately.

**Example:**

["qa_team", "ui_team", "backend_team"]
### How It Works

- Configure a Switch operation before the HITL operation to define the conditions for routing records to human review.
- Records that meet the configured conditions are routed to the HITL operation for human review. Records that do not meet the conditions continue to the next operation.
- The first assigned reviewer receives a review request through the Notification Center.
- The reviewer approves or rejects the record with a mandatory comment.
- Upon approval, the next reviewer in the configured Assignees sequence is notified automatically.
- This process continues sequentially until all assigned reviewers approve the record.
- Once all reviewers approve the record, it automatically resumes processing from the same point in the pipeline.
- If any reviewer rejects the record, the approval process stops immediately, and no further reviewers are notified.

**Example Scenario**

Three records enter the pipeline. The Switch operation evaluates each record against the configured condition. Two records meet the condition and are routed to the HITL operation for sequential review by the assigned reviewers. The third record does not meet the condition and proceeds directly to the next operation without interruption.

### Notification Center

When a record is routed for review, reviewers receive a notification containing:

- The complete record data.
- The reason the record was flagged for review.
- The approval chain showing completed approvals and the next pending reviewer.
- Approve and Reject actions with a mandatory comment field.

### Review Process

The approval workflow follows a sequential review process.

1. The first reviewer receives the notification.
2. After approval, the next reviewer is notified automatically.
3. This process continues until all assigned reviewers approve the record.
4. After the final approval, the record resumes processing automatically from the current point in the pipeline.
5. If any reviewer rejects the record, processing ends immediately.

## Guardrail Operation

**Guardrail Operation** inspects incoming data against defined policy rules and applies a compliance action such as **Pass**, **Flag**, **Mask**, **Drop**, **Review**, or **Block**. The inspection is performed by an AI model, which can be either the platform-managed default model or a custom model endpoint configured through **Bring Your Own Model (BYOM)**.

Guardrail can be used to enforce data-protection and compliance requirements, including rules related to standards such as GDPR, PCI-DSS, and HIPAA, on data moving through a pipeline before it reaches the next node.

### Definition

The Guardrail Operation is a compliance and data-protection operation that evaluates incoming data against user-defined policy rules and determines the appropriate compliance action. The operation supports both a platform-managed model and a custom model endpoint.

### When to Use

Use Guardrail when data moving through an Integration Bridge or pipeline must be inspected for policy violations before continuing to the next node.

Typical use cases include:

- Masking sensitive values such as credit card numbers.
- Flagging records containing personal email addresses.
- Blocking records containing Social Security Numbers.
- Removing offending data from an input.
- Holding data for human review.
- Stopping data that violates defined compliance rules.

### Feature Overview

Guardrail supports two model modes. The mode determines which AI model performs the inspection.



| Model Mode | When to Use | Setup |
| --- | --- | --- |
| **Use Default Model** | Use the platform-managed model to inspect incoming data. | No model endpoint configuration is required. |
| **Use Custom Model (BYOM)** | Use your own model endpoint to perform the inspection. | Configure the model endpoint and request details. |

### Compliance Actions

Guardrail applies a compliance action based on the result of the policy inspection.



| Action | What It Does |
| --- | --- |
| **Pass** | Data is clean and continues unchanged. |
| **Flag** | Data continues but is marked as a policy concern. |
| **Mask** | Sensitive values are hidden or redacted. |
| **Drop** | The offending data is removed. |
| **Review** | Data is held for human review. |
| **Block** | Data is stopped and does not move forward. |

### Parameters

The Guardrail Operation supports **2 parameters in Default Model mode** and **8 parameters in Custom Model (BYOM) mode**.



| Mode | Parameter Count | Mandatory Parameters |
| --- | --- | --- |
| Default Model | 2 | None |
| Custom Model (BYOM) | 8 | `Endpoint URL`, `Method Type`, `Endpoint Body` |

### Common Parameters

### Input Key

**Input Key** specifies which part of the incoming data should be inspected. If the field is left empty, the incoming data is used automatically.

**Optional.**

📋

customer_details

### Policy Rules

**Policy Rules** define what data Guardrail should mask, redact, block, or scrub. Rules can be entered directly or provided by uploading a supported file.

Supported policy rule examples include standards and requirements such as **Standard**, **GDPR**, **PCI-DSS**, and **HIPAA**.

Policy rules can be entered by typing or pasting them directly, or by dragging and dropping a `TXT`, `PDF`, `DOCX`, or `JSON` file.

**Optional.**

📋

Mask all credit card numbers except the last 4 digits.
Block any record that contains a Social Security Number.
Flag records containing personal email addresses.

### Use Default Model

Select **Use Default Model** to inspect data using the platform-managed Guardrail model. No model endpoint setup is required.

### How It Works

Guardrail reads the data from the configured **Input Key**, evaluates it against the configured **Policy Rules** using the platform-managed model, and applies the matching compliance action.

### How to Configure

1. Select **Use Default Model**.
2. Configure the optional **Input Key** if only a specific part of the incoming data should be inspected.
3. Define the **Policy Rules** that Guardrail should evaluate.

### Example

Consider the following input data:

📋

{"customer": {
"name": "John Doe",
"email": "john.doe@example.com",
"card_number": "4111111111111111",
"order_id": "ORD-1001"
}}

### Default Model Configuration



| Parameter | Value | Required |
| --- | --- | --- |
| `Input Key` | `customer` | Optional |
| `Policy Rules` | Mask credit card numbers except the last 4 digits and flag personal email addresses. | Optional |
| `Model Configuration` | `Use Default Model` | Required for selecting this mode |

### Sample Output

The following output is illustrative. The exact response structure depends on the pipeline configuration.

📋

{"customer": {
"name": "John Doe",
"email": "john.doe@example.com",
"card_number": "************1111",
"order_id": "ORD-1001"
},
"guardrail_status": "flag"}

### Understanding the Output

- The card number matched the masking rule, so only its last four digits are visible.
- The email matched the flagging rule, so the record continues but is marked as flagged.
- Fields that matched no rule, such as `name` and `order_id`, remain unchanged.

### Use Custom Model (BYOM)

Select **Use Custom Model (BYOM)**, or Bring Your Own Model, to run Guardrail inspection using your own model endpoint.

Selecting this mode opens the **Bring Your Own Model Config** section, where you define how Guardrail calls the custom model.

### How to Configure BYOM

1. Select **Use Custom Model (BYOM)**.
2. Enter the **Endpoint URL**.
3. Select the **Method Type**.
4. Configure **Endpoint Headers** if required.
5. Configure **Endpoint Params** if required.
6. Configure **Filter Response** if the model response must be read from a specific path.
7. Enter the required **Endpoint Body** as valid JSON.
8. Use **Test Endpoint** to confirm that the endpoint configuration works before saving.

### BYOM Parameters



| Parameter | Description | Required |
| --- | --- | --- |
| `Endpoint URL` | The full URL of the model API endpoint. | **Mandatory** |
| `Method Type` | The HTTP method used to call the model endpoint. | **Mandatory** |
| `Endpoint Headers` | Header name and value pairs sent with each request. | Optional |
| `Endpoint Params` | Query parameters added to the endpoint URL. | Optional |
| `Filter Response` | The path inside the model response containing the result Guardrail should read. If empty, the full response is used. | Optional |
| `Endpoint Body` | The request payload sent to the model. It must be valid JSON. | **Mandatory** |
| `Input Key` | Specifies which part of the incoming data should be inspected. | Optional |
| `Policy Rules` | Defines the compliance rules used to inspect the data. | Optional |

### Endpoint URL

**Endpoint URL** is the full URL of the custom model API.

**Mandatory.**

📋

https://api.yourmodel.com/v1/chat/completions

### Method Type

**Method Type** specifies the HTTP method used to call the model endpoint. The documented example uses `POST`.

**Mandatory.**

📋

POST

### Endpoint Headers

**Endpoint Headers** are request headers sent with each call. Headers are entered as **Header Name / Header Value** pairs.

Use the **+** button to add a header and the delete icon to remove a header. The documented example uses an authorization header and a content type header.

**Optional.**

📋

Authorization : Bearer <your-api-key>
Content-Type : application/json

### Endpoint Params

**Endpoint Params** are query parameters added to the model endpoint URL. They are entered as **Param Key / Param Value** pairs.

**Optional.**

📋

api-version : 2024-01

### Filter Response

**Filter Response** specifies the path inside the model response that contains the result Guardrail should read.

If `Filter Response` is left empty, Guardrail uses the full response.

**Optional.**

📋

choices[0].message.content

### Endpoint Body

**Endpoint Body** is the request payload sent to the custom model endpoint. The body must contain valid JSON.

**Mandatory.**

📋

{
"model": "your-model-name",
"temperature": 0
}

### How BYOM Works

Guardrail sends the incoming data and configured **Policy Rules** to the custom model endpoint. It then reads the model response using the configured **Filter Response** path, when provided, and applies the resulting compliance action.

The resulting output has the same form as the Default Model mode. The difference is that the model performing the inspection is the custom model configured by the user.

### Test Endpoint

**Test Endpoint** is available when using Custom Model (BYOM). Use it to check the configured endpoint URL, headers, and body before saving the configuration.

### BYOM Example

The following configuration demonstrates a custom model endpoint.



| Parameter | Example | Required |
| --- | --- | --- |
| `Endpoint URL` | `https://api.yourmodel.com/v1/chat/completions` | Mandatory |
| `Method Type` | `POST` | Mandatory |
| `Endpoint Headers` | `Authorization : Bearer <your-api-key>` | Optional |
| `Filter Response` | `choices[0].message.content` | Optional |
| `Endpoint Body` | `{"model": "your-model-name", "temperature": 0}` | Mandatory |

### Default Model vs Custom Model (BYOM)



| Configuration | Default Model | Custom Model (BYOM) |
| --- | --- | --- |
| **Setup** | None | Endpoint, headers, body |
| **Model Managed By** | Platform | You |
| **Mandatory Parameters** | None | Endpoint URL, Method Type, Endpoint Body |
| **Optional Parameters** | Input Key, Policy Rules | Input Key, Policy Rules, Endpoint Headers, Endpoint Params, Filter Response |
| **Test Endpoint** | Not needed | Available |

### Runtime Behavior

At runtime, Guardrail inspects the configured input against the defined policy rules using the selected AI model. The model can be the platform-managed default model or the custom model endpoint configured through BYOM.

When a custom model is configured, Guardrail sends the data and policy rules to the configured endpoint, reads the model response from the configured `Filter Response` path when applicable, and applies the resulting compliance action.

### Validation Rules and Requirements



| Rule | Requirement |
| --- | --- |
| Default Model configuration | No model endpoint setup is required. |
| BYOM Endpoint URL | Mandatory for Custom Model mode. |
| BYOM Method Type | Mandatory for Custom Model mode. |
| BYOM Endpoint Body | Mandatory and must be valid JSON. |
| Filter Response | Optional. If empty, the full model response is used. |
| Input Key | Optional. If empty, incoming data is used automatically. |
| Policy Rules | Optional. Defines the data-protection and compliance rules to evaluate. |

### Troubleshooting

### Custom Model Endpoint Is Not Reachable

If the custom model endpoint is unreachable or returns an error, use **Test Endpoint** to check the configured URL, headers, and request body.

### Guardrail Is Reading the Wrong Part of the Model Response

Configure **Filter Response** with the path containing the model result. For example, `choices[0].message.content` can be used when the response follows the documented example structure. If the field is left empty, Guardrail uses the full response.

### Custom Model Configuration Is Missing Required Values

Custom Model (BYOM) requires `Endpoint URL`, `Method Type`, and `Endpoint Body`. The endpoint body must be valid JSON.

### Best Practices

- Define clear **Policy Rules** that explicitly describe the data that should be masked, flagged, blocked, dropped, or reviewed.
- Use **Input Key** when only a specific section of the incoming payload needs inspection.
- When using BYOM, verify the endpoint configuration with **Test Endpoint** before saving.
- Use **Filter Response** when the required inspection result is nested within the custom model response.
- Ensure the **Endpoint Body** is valid JSON when configuring a custom model.

### Notes

- Guardrail supports both a platform-managed default model and a custom model endpoint through BYOM.
- Default Model mode does not require model endpoint setup.
- Custom Model (BYOM) requires `Endpoint URL`, `Method Type`, and `Endpoint Body`.
- `Endpoint Body` must be valid JSON.
- `Input Key`, `Policy Rules`, `Endpoint Headers`, `Endpoint Params`, and `Filter Response` are optional.
- If `Input Key` is empty, incoming data is used automatically.
- If `Filter Response` is empty, the full custom model response is used.
- The exact response structure of the Guardrail operation can depend on the pipeline configuration.



## Frequently Asked Questions

 ### 1. What is the purpose of Sleep Time?

 It pauses pipeline execution for a specified duration to control processing flow.

 

 

  ### 2. Why is Responsedata required in Python Operation?

 It stores processed results and enables structured output handling.

 

 

  ### 3. Can Filter Operation use multiple conditions?

 Yes, logical operators such as and, or, and not can be combined.

 

 

  ### 4. Does AI Operation require coding?

 No, users can provide instructions in natural language.

 

 

  ### 5. Can Text to Operations run custom scripts?

 Yes, it supports both auto-generated and user-written Python code.

 

 

 ---

## Notes

- Validate all custom scripts before production use.
- Ensure sensitive data is handled securely.
- Test pipeline logic thoroughly using preview features.

## Topics

**Docs Categories:** [Data Operations](https://ezintegrations.ai/wp-content/uploads/wp-mfa-exports/taxonomy/doc_category/data-operations.md)