I have filename and filestream saved in the SQL Server database. I want to upload this filestream as a file on AWS S3 Bucket using Apache NIFI.
Currently I am following below processors in the same sequence:
- ExcecuteSQL (Here I wrote SQL query: select filename, filestream from table)
- ConvertAvroToJson (because ExecuteSQL returns Avro format data)
- EvaluateJsonPath (To read filestream column)
- Base64EncodeContent
- PutS3Object
Now problem is, This approach doesn't convert file stream to file on S3 Bucket. It just uploads a file on s3 bucket having filestream column data. It should work like if filestream is of "png" image type then it should upload png image to s3 bucket. and If filestream is of "xlsx" type then it should upload xlsx file on s3 bucket.