Closed loicmathieu closed 1 year ago
https://github.com/kestra-io/plugin-kafka/pull/38 will fix the issue but note that the message must have the good type which is not the case here as the file transform will generate a string for the folowers_count.
This will do the trick:
- id: fileTransform
type: io.kestra.plugin.scripts.nashorn.FileTransform
from: "{{ outputs.csvReader.uri }}"
script: |
var result = {
"key": row.id,
"value": {
"username": row.username,
"tweet": row.tweet,
"stat": {
"followers_count": row.followers_count
}
},
"timestamp": row.timestamp,
"headers": {
"key": "value"
}
};
row = result
Expected Behavior
Task fail with the following error:
Possible cause:
Support ticket: https://support.kestra.io/a/tickets/38
Actual Behaviour
No response
Steps To Reproduce
No response
Environment Information
Example flow