# OPC UA

The **OPC UA Reader** is a pipeline component that enables secure communication with industrial devices and control systems. It is widely used for **collecting and transmitting data** from manufacturing environments, SCADA systems, and IoT devices into analytics or processing platforms.

By supporting **real-time** and **batch ingestion**, the OPC UA Reader is a key component for building **industrial data pipelines**.

### Configuration Sections

All component configurations are grouped into:

* **Basic Information**
* **Meta Information**
* **Resource Configuration**

### Basic Information Tab

The *Basic Information* tab is the default configuration screen.

| Field                       | Description                                                         | Required |
| --------------------------- | ------------------------------------------------------------------- | -------- |
| **Invocation Type**         | Select execution mode: **Batch** or **Real-Time**.                  | Yes      |
| **Deployment Type**         | Displays the deployment type of the component (pre-selected).       | Yes      |
| **Container Image Version** | Displays the Docker image version for the component (pre-selected). | Yes      |
| **Failover Event**          | Select an event to handle errors or retries.                        | Optional |
| **Batch Size**              | Maximum number of records to be processed per cycle. Minimum: 10.   | Yes      |

### Meta Information Tab

The *Meta Information* tab contains OPC UA–specific connection and security parameters.

| Field                         | Description                                                                                                 | Required    |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------- |
| **URL**                       | The OPC UA server endpoint URL (e.g., `opc.tcp://hostname:4840`).                                           | Yes         |
| **Message Security Mode**     | Select from: **Sign**, **SignAndEncrypt**.                                                                  | Yes         |
| **Security Policy**           | Security algorithm used for encryption and signing: **Basic128Rsa15**, **Basic256**, or **Basic256Sha256**. | Yes         |
| **Certificate File Name**     | Auto-populated after uploading a certificate file.                                                          | Conditional |
| **Choose File (Certificate)** | Upload a valid certificate file for authentication.                                                         | Conditional |
| **PEM File Name**             | Auto-populated after uploading a PEM file.                                                                  | Conditional |
| **Choose File (PEM)**         | Upload a PEM file for establishing secure communication.                                                    | Conditional |
| **Source Node**               | The OPC UA server node that originates the data/event.                                                      | Yes         |
| **Event Node**                | The OPC UA event node subscribed to for notifications.                                                      | Yes         |

### Supported Security Policies

| Policy             | Description                                                                                                                                           |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Basic128Rsa15**  | Provides 128-bit encryption with RSA-15 key exchange. Considered **less secure** compared to modern standards.                                        |
| **Basic256**       | Uses 256-bit symmetric encryption with digital signatures for confidentiality, integrity, and authenticity.                                           |
| **Basic256Sha256** | Enhanced profile that applies **SHA-256 algorithms** for stronger key generation and message digests. Recommended for **high-security environments**. |

### Saving the OPC UA Reader

* After configuration, click **Save Component** (Storage icon).
* A success notification confirms that the component has been saved.
* Once activated, the OPC UA Reader begins streaming data or events from the configured nodes.

### Example Workflow

1. Configure an OPC UA Reader with a **URL** pointing to the plant’s OPC UA server (`opc.tcp://plant-server:4840`).
2. Set **Security Policy** to `Basic256Sha256` and upload certificate and PEM files for secure authentication.
3. Define **Source Node** as the temperature sensor node and **Event Node** as the alarm event node.
4. The pipeline ingests real-time sensor readings and triggers alerts when event conditions are met.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bdb.ai/bdb-user-documentation/platform-modules/11.0/data-engineering/data-pipelines/pipeline-editor/pipeline-components/consumers/opc-ua.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
