redpanda-data / redpanda-data/connect
Bloblang: variables and mappings
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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