Re: How to decrypt one field in a Json and return the original JSON with that field decrypted

2019-04-16 Thread Andy LoPresto
Here are two Stack Overflow answers [1][2] which should give you a good model to build from (the scripts probably do 90% of what you want right now, and Matt Burgess’ blog [3] on scripting in NiFi should be helpful to modify it as necessary). [1] https://stackoverflow.com/questions/40294945/n

Re: How to decrypt one field in a Json and return the original JSON with that field decrypted

2019-04-16 Thread Andy LoPresto
Hi JP, I do plan to implement an EncryptAttribute and EncryptRecord processor in the near future; other deliverables have taken priority recently. My suggestion for this with the least amount of complexity (but some custom code generation) would be to use ExecuteScript with simple Groovy code t

Re: How to decrypt one field in a Json and return the original JSON with that field decrypted

2019-04-16 Thread Otto Fowler
DecryptRecord ( with record path setting ) sounds like it could be something that could do this if it existed. On April 16, 2019 at 08:49:41, Peter Turcsanyi ( turcsa...@cloudera.com.invalid) wrote: Hi JP, If I understand correctly, your scenario would be: 1. extract the encrypted data item fro

Re: How to decrypt one field in a Json and return the original JSON with that field decrypted

2019-04-16 Thread Peter Turcsanyi
Hi JP, If I understand correctly, your scenario would be: 1. extract the encrypted data item from json (into a flowfile attribute) 2. decrypt the data 3. replace the encrypted data item with the decrypted one in json Unfortunately, there is no EncryptAttribute processor at the moment which would

Re: Execute SQL support for nvarchar(max) datatype

2019-04-16 Thread Peter Turcsanyi
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.