Hello.

I would flatten the records with jolt, with a kind of flag to know if it’s 
“root” data or not. Then I would extract the flag in an attribute with 
evaluatejson path, and at the end route with RouteOnAttribute.

Aurélien

From: l vic [mailto:lvic4...@gmail.com]
Sent: samedi 1 septembre 2018 01:34
To: users@nifi.apache.org
Subject: saving record into different tables?

Hi,
I have a json record that contains array "mylst":
{
    "id": 0,
    "name": "Root",
     "mylist": [{
      "id": 10,
      "info": "2am-3am"
    },
    {
        "id": 11,
        "info": "3AM-4AM"
    },
    {
        "id": 12,
            "info": "4am-5am"
    }]

}
I have to save root data into one db table and array into another... Can 
someone recommend an approach to "splitting" of record for 2 different database 
writers?
Thank you,
V

This electronic transmission (and any attachments thereto) is intended solely 
for the use of the addressee(s). It may contain confidential or legally 
privileged information. If you are not the intended recipient of this message, 
you must delete it immediately and notify the sender. Any unauthorized use or 
disclosure of this message is strictly prohibited.  Faurecia does not guarantee 
the integrity of this transmission and shall therefore never be liable if the 
message is altered or falsified nor for any virus, interception or damage to 
your system.

Reply via email to