Andy5
Andy5

Reputation: 2405

Apache NiFi JSON to SQL with pre processing

I am completely new NiFi but I understand from people it is good.

However, I am going to be sent a JSON, where there be an embedded array which can contain hex, byte, an ASCII characters. These values will nee converting to string values before inserting into Oracle.

Searching the internet, there are no proper examples to follow which converts JSON to SQL and converts data from hex to string, etc. Are there any examples to follow? Has anyone done something similar and advise?

Upvotes: 0

Views: 606

Answers (1)

Rishi Pandey
Rishi Pandey

Reputation: 45

there are two ways as I know of to convert JSON to SQL:

The first one is by using Jolt Transformation, which is not very efficient with large data comparatively.

The second one is which I prefer by using a series of processors to convert JSON to SQL: EvaluateJsonPath --> AttributesToJson --> ConvertJSONToSQL -->PutSQL.

There is a processor known as EncodeContent or EncodeAttribute for the conversion of hex to different formats.

enter image description here

Upvotes: 1

Related Questions