Navigation

3-4 Decrypt Input CSVs

How to use Nifi to decrypt csv files encrypted with openssl aes-256-cbc and import to MarkLogic.

On a Mac, Encrypt your csv file with:

openssl enc -aes-256-cbc -e -in MOCK_DATA.csv -out MOCK_DATA.enc -k thisIsABadPassword -p

Download Template

In your NiFi page, upload the template.

Use the template

Select the uploaded template:

Click on the Get Input processor:

Then, configure the location and file types to watch.

Configure the Decrypt processor:

Then set the password.

Configure the Split Record Processor

Click on the right arrow

Enable the two services:

Configure the MarkLogic processor.

Configure the required fields then click on the arrow.

Make sure the service is disabled and click on the gear icon to configure it.

Set the credentials for your MarkLogic server and then enable the service.

You should have no errors and ready to click the Start button. So click it!

Now, copy your encrypted file to the configured watched folder. It should disappear and in a few seconds you should have those documents inserted into your MarkLogic server.

Make sure to have a backup as the Get File processor does not move the input file to a different folder.