# avro

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

---
title: avro
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: connect/components/scanners/avro
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/scanners/avro.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/scanners/avro.adoc
page-git-created-date: "2024-09-09"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/scanners/avro.md -->

**Type:** Scanner ▼

[Scanner](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/scanners/avro/)[Processor](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/avro/)

**Available in:** Cloud, [Self-Managed](https://docs.redpanda.com/connect/components/scanners/avro/%20%22View%20the%20Self-Managed%20version%20of%20this%20component%22)

Consume a stream of Avro OCF datum.

#### Common

```yml
scanners:
  avro:
```

#### Advanced

```yml
scanners:
  avro:
    raw_json: false
```

## [](#avro-json-format)Avro JSON format

This scanner creates documents formatted as [Avro JSON](https://avro.apache.org/docs/current/specification/) when decoding with Avro schemas. In this format, the value of a union is encoded in JSON as follows:

-   If the union’s type is `null`, it is encoded as a JSON `null`.

-   Otherwise, the union is encoded as a JSON object with one name/value pair. The `"name"` is the type’s name and the `"value"` is the recursively encoded value. For Avro’s named types (record, fixed or enum), the user-specified name is used. For other types, the type name is used.


For example, the union schema `["null","string","Transaction"]`, where `Transaction` is a record name, would encode:

-   The `null` as a JSON `null`

-   The string `"a"` as `{"string": "a"}`

-   A `Transaction` instance as `{"Transaction": {…​}}`, where `{…​}` indicates the JSON encoding of a `Transaction` instance


Alternatively, you can create documents in [standard/raw JSON format](https://pkg.go.dev/github.com/linkedin/goavro/v2#NewCodecForStandardJSONFull) by setting the field [`raw_json`](#raw_json) to `true`.

## [](#metadata)Metadata

This scanner emits the following metadata for each message:

-   The `@avro_schema` field: The canonical Avro schema.

-   The `@avro_schema_fingerprint` field: The schema ID or fingerprint.


## [](#fields)Fields

### [](#raw_json)`raw_json`

Whether to decode messages into normal JSON rather than [Avro JSON](https://avro.apache.org/docs/current/specification/_print/#json-encoding). When true, this unwraps union values (bare values instead of {"type": value} wrappers).

**Type**: `bool`

**Default**: `false`