Support for pattern matching across fields
- Dominant language
- Java
- Stars
- 615
- Forks
- 82
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 7
Description
## What is your idea?
This has come up in several user discussions, especially around change data capture (CDC) that is often used with EventBridge Pipes and EventBridge Kafka Sink Connector, so posting here as a feature request.
Currently it is not possible to pattern match across fields in a JSON object e.g., a DynamoDB stream event (snippet) where I want to filter events that have a common (or different) value across fields, such as the value of `"S"` in `"NewImage"` and `"OldImage"` below.
```json
{
"NewImage" : {
"Status" : {
"S" : "OK"
}
},
"OldImage": {
"Status": {
"S": "ERROR"
}
}
}
```
Another (non-CDC) example:
```json
{
"detail": {
"brand": "Ford",
"model": "Focus",
"colour": "Blue",
"interior-colour": "Black"
}
}
```
Suggested pattern:
```json
{
"detail": {
"interior-colour": [ { "anything-but": "$.detail.colour" } ]
}
}
```
## Would you be willing to make the change?
No
## Additional context
Add any other context (such as images, docs, posts) about the idea here.
Contributor guide
Research direction
The issue provides JSON examples and a suggested pattern, but names no implementation files, tests, or entry points. Start by locating the rule parsing and event-matching areas, then establish the supported semantics and tests needed to show that values from separate fields can be compared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100