Hi Venu, If I'm not wrong, you're using MS SQL Server and nvarchar / varbinary are the database column types. nvarchar can be used for storing character data (strings) but it is not suitable for binary data (like pdf).
I think NiFi tries to handle the bytes of the pdf file as Unicode characters. It could be debugged but my short answer is that nvarchar should not be used for binary data. Regards, Peter On Mon, Apr 15, 2019 at 10:05 PM Venugopal Iyengar <[email protected]> wrote: > Hello there, > I am using Execute SQL, Split AVro and put file processors to read some > pdf documents stored in SQL database and store that in the file system. > > When I use varbinary(max) I was able to pull and view the pdf without any > issues. > > When the datatype is nvarchar(max) I am unable to open the pdf file. > > I appreciate if some body can shed some light on this. How can I debug > this? > > Thanks > Venu > > > [image: image.png] >
