Replacing Custom NiFi Processor for Converting JSON Content to Attributes
Hi Team,
I'm currently using a custom NiFi processor to convert JSON file content into flow file attributes, and I'm looking to replace it with a standard NiFi processor if possible.
Sample JSON Input:
The JSON files look like this (keys may vary per file):
{
"SourceFilePath": "/root/rdw/SrcFiles",
"SourceFilePattern": "Sales_data",
"SourceFile": "Sales_data_20241211.csv"
}
Current Setup:
I'm using a custom processor of type CreateFlatJSON (Bundle: NestedJSONToFlatJSON) to extract the key-value pairs from the JSON and assign them to attributes.
After processing, the flow file attributes look like:
SourceFilePath = /root/rdw/SrcFiles
SourceFile = Sales_data_20231111164536.csv
SourceFilePattern = Sales_data
These attributes are then used in downstream processors like so:
${SourceFilePath}/${SourceFile}
Current Flow:
FetchSFTP → ExtractText → CreateFlatJSON (Custom) → Downstream Processors
FetchSFTP: Retrieves the JSON file.
ExtractText: Reads the content into the flow file.
CreateFlatJSON: Parses JSON and converts key-value pairs to attributes.
Question
Is there a standard NiFi processor that can replace the custom CreateFlatJSON processor and achieve the same functionality — i.e., convert JSON content in the flow file into flow file attributes (with dynamic keys/values)?

