> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-data-integration/pdi-transformation-steps-reference-overview/add-a-checksum.md).

# Add a Checksum

The **Add a Checksum** step calculates a checksum for one or more input fields and adds the result to the output stream as a new field.

### Step name

* **Step name**: Specify the unique name of the step on the canvas. You can customize the name or leave it as the default.

### Options

The Add a Checksum step includes the following options:

| Option                          | Description                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Type**                        | The checksum algorithm to use: CRC32 ([32-bit Cyclic Redundancy Check](http://en.wikipedia.org/wiki/Cyclic_redundancy_check)), ADLER32 ([Adler-32](http://en.wikipedia.org/wiki/Adler-32)), MD5 ([MD5](http://en.wikipedia.org/wiki/MD5)), SHA-1 ([SHA-1](http://en.wikipedia.org/wiki/SHA-1)), or SHA-256 ([SHA-256](http://en.wikipedia.org/wiki/SHA-256)). |
| **Result type**                 | Applies only when you select **Type** = MD5, SHA-1, or SHA-256. Select the output format: **String**, **Hexadecimal**, or **Binary**.                                                                                                                                                                                                                         |
| **Result field**                | The name of the new field that contains the checksum value.                                                                                                                                                                                                                                                                                                   |
| **Compatibility Mode**          | Select for backward compatibility with transformations created before PDI 4.2.0.                                                                                                                                                                                                                                                                              |
| **Old Checksum Behaviour Mode** | Select to treat incoming fields as strings. Clear to treat incoming fields as byte arrays.                                                                                                                                                                                                                                                                    |
| **Fields**                      | The input fields to include in the checksum calculation.                                                                                                                                                                                                                                                                                                      |
| **Get Fields**                  | Populates the **Fields** list from the fields coming into the step.                                                                                                                                                                                                                                                                                           |

{% hint style="info" %}
If you select **Old Checksum Behaviour Mode** and an incoming field is a binary data type, PDI uses the string representation of the byte array.
{% endhint %}

### Example

Your Pentaho distribution includes a CRC32 sample transformation:

```
design-tools/data-integration/samples/transformations/Add a checksum - Basic CRC32 example.ktr
```

### Metadata injection support

All fields in this step support metadata injection. You can use this step with [ETL metadata injection](/pdia-data-integration/pdi-transformation-steps-reference-overview/etl-metadata-injection.md) to pass metadata to your transformation at runtime.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pdia-data-integration/pdi-transformation-steps-reference-overview/add-a-checksum.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
