enrich

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

Enrich

Append custom key-value pairs to each entity's properties map.

Usage

processors:
  - name: enrich
    config:
      attributes:
        team: data-platform
        environment: production

Configuration

Key Type Required Description
attributes map[string]string Yes Key-value pairs to merge into entity.properties.

Behavior

  • Each key in attributes is set directly in the entity's properties map. For example, team: data-platform results in entity.properties.team = "data-platform".
  • If a key already exists in properties, the value from the config overwrites it.
  • Only string values are written; non-string values in the config are ignored.
  • Edges attached to the record are passed through unchanged.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Attributes map[string]any `mapstructure:"attributes" validate:"required"`
}

type Processor

type Processor struct {
	plugins.BasePlugin
	// contains filtered or unexported fields
}

Processor work in a list of data

func New

func New(logger log.Logger) *Processor

New create a new processor

func (*Processor) Init

func (p *Processor) Init(ctx context.Context, config plugins.Config) (err error)

Process processes the data

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, src models.Record) (dst models.Record, err error)

Process processes the data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL