enrich

package
v0.12.0 Latest Latest
Warning

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

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

README

Enrich

enrich processor appends custom attributes to each asset emitted by the extractor. Use it to add metadata that is not available in the source system, such as team ownership tags, environment labels, or domain identifiers.

Usage

processors:
  - name: enrich
    config:
      attributes:
        fieldA: valueA
        fieldB: valueB

Config

Key Value Example Description
attributes map[string]interface{} {team: platform} Key-value pairs to append to each asset's attributes required

Behavior

  • The attributes map is merged into the asset's data.attributes field.
  • If a key already exists in the asset's attributes, the value from the enrich config will overwrite it.
  • Values can be strings, numbers, booleans, or nested objects.

Examples

Adding team and environment tags
processors:
  - name: enrich
    config:
      attributes:
        team: data-platform
        environment: production
        tier: "1"
Combining with other processors
processors:
  - name: enrich
    config:
      attributes:
        domain: payments
  - name: labels
    config:
      labels:
        source: meteor

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]interface{} `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