Ad

How To Encrypt A Column Using Nifi

- 1 answer

For security reasons I need to encrypt a column before putting the data in the repository. How can I do this using python or some processor. I tried to use the cryptography library but without success. If you can guide me which is the best way I would be very grateful.

Ad

Answer

Take a look at ScriptedTransformRecord, it should allow you to do arbitrary operations on whichever field/columns you like. If you're using a Python library, remember that the script engine is Jython and cannot import modules that aren't pure Python (CPython modules for example). Java has crypto libraries so you could achieve this with Groovy instead.

There is a Jira to cover an EncryptAttributes processor, but perhaps there should be one for Expression Language and/or RecordPath functions as well.

Ad
source: stackoverflow.com
Ad