- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NiFi - Extract content from AVRO FlowFile to attributes
- Labels:
-
Apache NiFi
Created ‎04-27-2023 04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have flow file with an Avro record. Is there any chance to extract one field value from this record to attribute without converting record to Json format and without using the groovy script.
I need to extract field value from content to attribute for using it as a part of cache identifier in the further processor.
Thank you.
Created ‎04-27-2023 10:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AntonBV,
You could give it a try with PartitionRecord, which will place the results of a RecordPath directly into a FlowFile Attribute. I am using it already on AVRO data so it should work for you as well.
PartitionRecord: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.20.0/org.apach...
Record Path: https://nifi.apache.org/docs/nifi-docs/html/record-path-guide.html
Created ‎04-27-2023 10:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AntonBV,
You could give it a try with PartitionRecord, which will place the results of a RecordPath directly into a FlowFile Attribute. I am using it already on AVRO data so it should work for you as well.
PartitionRecord: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.20.0/org.apach...
Record Path: https://nifi.apache.org/docs/nifi-docs/html/record-path-guide.html
Created ‎04-27-2023 12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
