# Redact Information in JSON Messages

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [labs-full.txt](https://docs.redpanda.com/labs-full.txt)

---
title: Redact Information in JSON Messages
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: redaction-go
page-component-name: labs
page-version: master
page-component-version: master
page-component-title: Labs
page-relative-src-path: redaction-go.adoc
page-edit-url: https://github.com/redpanda-data/redpanda-labs/edit/main/docs/modules/data-transforms/pages/redaction-go.adoc
description: Redact personally identifiable information (PII) in topics using data transforms.
page-git-created-date: "2025-05-06"
page-git-modified-date: "2025-05-06"
---

<!-- Source: https://docs.redpanda.com/labs/data-transforms/redaction-go.md -->

This example shows you how to use Redpanda data transforms to redact information in JSON messages.

The demo runs using Docker Compose, with the following containers:

-   `redpanda`: Includes a single Redpanda broker.

-   `console`: Includes Redpanda Console.

-   `owl-shop`: Includes the Owlshop demo application that produces e-commerce data to the Redpanda broker.

-   `transform`: Includes all the requirements for deploying the transforms function to the Redpanda broker, including `rpk`, Go, and the redaction transform code. The source code for the redaction transform is available in the `redaction` directory.


## [](#prerequisites)Prerequisites

You must have [Docker and Docker Compose](https://docs.docker.com/compose/install/) installed on your host machine.

## [](#run-the-lab)Run the lab

1.  Clone the repository:

    ```bash
    git clone https://github.com/redpanda-data/redpanda-labs.git
    ```

2.  Change into the `data-transforms/redaction/demo/` directory:

    ```bash
    cd redpanda-labs/data-transforms/go/redaction/demo
    ```

3.  Set the `REDPANDA_VERSION` environment variable to at least version v23.3.1. Data transforms was introduced in this version. For all available versions, see the [GitHub releases](https://github.com/redpanda-data/redpanda/releases).

    For example:

    ```bash
    export REDPANDA_VERSION=v26.1.9
    ```

4.  Set the `REDPANDA_CONSOLE_VERSION` environment variable to the version of Redpanda Console that you want to run. For all available versions, see the [GitHub releases](https://github.com/redpanda-data/console/releases).

    > 📝 **NOTE**
    >
    > You must use at least version v3.0.0 of Redpanda Console to deploy this lab.

    For example:

    ```bash
    export REDPANDA_CONSOLE_VERSION=v3.7.3
    ```

5.  Build the data transforms container:

    ```bash
    docker compose build
    ```

6.  If you are running on an ARM-based device such as the Apple M1 chip, open the `docker-compose.yml` file and uncomment the `platform: 'linux/amd64'` line.

7.  Start the containers:

    ```bash
    docker compose up --detach --wait
    ```

8.  Navigate to [http://localhost:8080](http://localhost:8080) to see the Redpanda Console.

9.  Go to **Topics** and select **owlshop-orders-redacted** and see the redacted orders.


## [](#clean-up)Clean up

To stop the containers:

```shell
docker compose down
```