nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Herssens <chris.herss...@gmail.com>
Subject Re: JoltTransformJSON with array of jsons
Date Thu, 12 Oct 2017 09:51:28 GMT
Hello Pierre,

I want to flatten the json content.  How to I do this ?
Now  I use the chain DSL with jolt spec

[
  {
    "operation" : "shift",
    "spec": {
      "timestamp_start" : "timestamp_start",
      "timestamp_end" : "timestamp_end",
      "custom_primitives" : {
          "*": "&" }
    }
  }
]

this doesn't work with an array of json only with a single json

Regards,

Chris



On Thu, Oct 12, 2017 at 11:26 AM, Pierre Villard <
pierre.villard.fr@gmail.com> wrote:

> Hi Chris,
>
> Yes it is.
>
> For example, if I want to add a field in all JSON of my array - I can do
> (with default DSL) :
>
> {
>   "*": {
>     "mynewfield":"mynewvalue"
>   }
> }
>
> I'm clearly not a Jolt expert, but others can help you if you're trying to
> do something more complex.
>
> Pierre
>
>
>
> 2017-10-12 11:04 GMT+02:00 Chris Herssens <chris.herssens@gmail.com>:
>
>> Hello,
>>
>> Is it possible to use the JoltTransformJson processor with an array of
>> jsons as input
>>
>> Regards,
>>
>> Chris
>>
>
>

Mime
View raw message