Is there a way of looking up my DB with multiple tables, extracting the rows in a JSON and compare them to another JSON that I generated in another flow? The generated JSON has pretty much the same name for keys as the database column-names. The only difference is that my self-generated JSON is nested and therefore contains a lot arrays. How can I compare matching names(key- and columnames) from the nested and flat-Json I am having?
I am currently using the Execute SQL-Processor which gives me AVRO-formatted Data that I transformed with ConvertAvrotoJSON to a JSON file that is flat.
My second problem is that I would like to update the self-generated JSON with missing values from the DB and put it again into the DB/update the existing values in the DB. I tried using the ConvertJSON-Processor which is unfortunately designed for only one table, when I do have like 50 tables. Is there an easy yet efficient way of doing the desired things?
The DB data is pretty much the same, but flat and contains sometimes more information that are missing in the self-generated JSON. This information has to be added to the self generated JSON. The updated JSON should update the current DB-entry.
As first step I looked up the DB and with ExecuteSQL and converted the Avro-File I got to a Json-File using the ConvertAvroToJson processor. Now I am having two Json-Files that have a lot of same and a lot of different keys. The self-generated Json - as presented above - is nested and the Json-File from the DB is flat, as I am extracting the relevant DB-Information step-by-step.