Skip to content

Commit

Permalink
latest paramgen
Browse files Browse the repository at this point in the history
  • Loading branch information
maha-hajja committed Mar 5, 2024
1 parent bfbbf3b commit d0232ad
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugin/processor/builtin/jsonDecode_paramgen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions pkg/plugin/processor/builtin/processors.json
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,96 @@
}
]
},
{
"specification": {
"Name": "json.decode",
"Summary": "Decodes a specific field from raw data (string) to JSON structured data.",
"Description": "The processor takes raw data (string) from the target field, parses it as JSON and stores the decoded\nstructured data in the target field.\nThis processor is only applicable to .Key, .Payload.Before and .Payload.After, as they accept structured data format.\n",
"Version": "v0.1.0",
"Author": "Meroxa, Inc.",
"Parameters": {
"field": {
"default": "",
"description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After`).\nApplicable values are `.Key`, `.Payload.Before` and `.Payload.After`, as they accept structured data format.",
"type": "string",
"validations": [
{
"type": "required",
"value": ""
},
{
"type": "inclusion",
"value": ".Key,.Payload.Before,.Payload.After"
}
]
}
}
},
"examples": [
{
"description": "Decode the raw data .Key into structured data.",
"config": {
"field": ".Key"
},
"have": {
"position": null,
"operation": "create",
"metadata": null,
"key": "{\"after\":{\"data\":4,\"id\":3}}",
"payload": {
"before": null,
"after": null
}
},
"want": {
"position": null,
"operation": "create",
"metadata": null,
"key": {
"after": {
"data": 4,
"id": 3
}
},
"payload": {
"before": null,
"after": null
}
}
},
{
"description": "Decode the raw data .Payload.Before into structured data.",
"config": {
"field": ".Payload.Before"
},
"have": {
"position": null,
"operation": "snapshot",
"metadata": null,
"key": null,
"payload": {
"before": "{\"before\":{\"data\":4},\"foo\":\"bar\"}",
"after": null
}
},
"want": {
"position": null,
"operation": "snapshot",
"metadata": null,
"key": null,
"payload": {
"before": {
"before": {
"data": 4
},
"foo": "bar"
},
"after": null
}
}
}
]
},
{
"specification": {
"Name": "unwrap.debezium",
Expand Down

0 comments on commit d0232ad

Please sign in to comment.