I have a set of files for which I need to send its filename and another
property in a JSON format (shown below) to Kafka.
/{
filename=${filename},
property=${property}
}
/
I tried to replace the entire content with the above JSON content and send
it to Kafka. But instead of obtaining values of $filename and $property, I
obtained the entire JSON content as it was.. (with duplication)
Then I tried replacing only ${filename} as the replacement text (shown
below) , for which I obtained the values but the duplication was still
present.
/Property used in replaceText:
Regular ExpressionInfo = [\S\s]*
Replacement ValueInfo = ${filename}
Character SetInfo =UTF-8
Maximum Buffer SizeInfo = 1 MB
Evaluation ModeInfo = Entire text/
@Kafka consumer
file_21.txtfile_21.txt
file_15.txtfile_15.txt
file_19.txtfile_19.txt
file.txtfile.txt
*So how do I
- avoid repetition?
- send it as a JSON string?*
<http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/file/n1624/putKafka.png>
--
View this message in context:
http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/send-JSON-format-to-kafka-and-avoid-duplication-tp1624.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at
Nabble.com.