-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
Redpanda Connect versions: 4.57.1 and 4.65.0
I'm trying to create a processor template that includes multiple custom steps (processors).
Here is my config:
The template file
type: processor
name: custom_sub_pipeline
fields:
- name: mapping
type: bloblang
mapping: |
root = {
"processors": [
{ "resource": "pre_custom_mapping" },
{ "mapping": "" + this.mapping },
{ "resource": "post_custom_mapping" }
]
}
tests:
- name: the basic processor template
config:
mapping: |
this.blah = blah.blah
expected:
processors:
- resource: pre_custom_mapping
- mapping: "this.blah = blah.blah\n"
- resource: post_custom_mapping
How I'm trying to use template:
input:
label: input_kafka_template
kafka:
topic: ${USER}.test.raw
output:
label: output_kafka_template
kafka_out:
topic: ${USER}.test.trans
pipeline:
processors:
- custom_sub_pipeline:
mapping: |
import "./transformations/test.blobl"
let data = this.apply("test_mapping")
root = {
"data": $data
}
Running test with:
redpanda-connect test --templates './templates/*.yaml' --resources './resources/*.yaml' './tests/test.yaml'
With the mentioned config, the lint is passing successfully, but redpanda-connect test is failing with failed to initialise processor index '0': processor type of 'custom_sub_pipeline' was not recognised
Note: Might be duplicate with #194
Metadata
Metadata
Assignees
Labels
No labels