redpanda-data / redpanda-data/connect

Bloblang: variables and mappings

Open
#1,061 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bloblang enhancement
Dominant language
Go
Stars
8.8k
Forks
969
Avg merge
1d 13h
Merged PRs (30d)
64

Description

Is there a way to pass variables to mappings?

Trying something like this says the variable is not defined:

let value = some.value
let hashedValue = $value.hash("hmac_sha1", $secret)
map mask {
    root = this
    messyField = messyField.replace($value, $hashedValue)
}
objects = objects.map_each(o -> o.apply("mask"))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the provided Bloblang mapping as the reproduction and trace the mapping and variable-evaluation entry points in the repository. The issue names no files or tests; done should be demonstrated by resolving the variable access in the example or clearly establishing the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
stream-processing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.