> 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/10.2-data-integration/pdi-transformation-steps-reference-overview/add-a-checksum.md).

# Add a Checksum

This step calculates checksums for one or more fields in the input stream and adds the checksum to the output as a new field.

![Add a Checksum step dialog](https://2745965000-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvZoINBz5C5WnDZQlbOJQ%2Fuploads%2Fgit-blob-7be6283249aadff6e9f20d93e09ef7697a2f15fb%2FPDI_TransStep_AddChecksum_Dialog.png?alt=media)

### Options

#### Step name

Specify the unique name of the Add a Checksum step on the canvas. You can customize the name or leave it as the default.

#### Type

Specify the checksum type to calculate:

* CRC32 — [32-bit cyclic redundancy check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check)
* ADLER 32 — [Adler-32 checksum algorithm](https://en.wikipedia.org/wiki/Adler-32)
* MD5 — [Message Digest Algorithm 5](https://en.wikipedia.org/wiki/MD5)
* SHA-1 — [Secure Hash Algorithm 1](https://en.wikipedia.org/wiki/SHA-1)
* SHA-256 — [Secure Hash Algorithm 2](https://en.wikipedia.org/wiki/SHA-256)

#### Result type

If you select **MD5**, **SHA-1**, or **SHA-256** for **Type**, you can select one of these result types:

* **String**
* **Hexadecimal**
* **Binary**

#### Result field

Specify the name of the field that contains the checksum.

#### Compatibility Mode

Select this option to provide backward compatibility with transformations created before PDI version 4.2.0 and its hexadecimal encoding issue.

#### Old Checksum Behaviour Mode

If selected, incoming fields are treated as strings.

{% hint style="info" %}
A binary field type produces the string representation of a byte array.
{% endhint %}

If cleared, all incoming fields are treated as byte arrays.

#### Field

In the table, specify which fields to include in the checksum calculation.

#### Get Fields

Select **Get Fields** to populate the fields table with fields derived from the input.

### Example

Your Pentaho distribution includes a CRC32 sample transformation at:

```
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](https://docs.pentaho.com/pdia-data-integration/10.2-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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
