You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Yuri Krysko <Yu...@mcdean.com> on 2017/07/05 20:02:06 UTC

evaluateJsonPath processor

Hello Everyone,

Could anyone please advise why $. expression is considered invalid in EvaluateJsonPath processor. The idea is to copy the entire content of a JSON-formatted flowfile into its attribute.

Thanks,
Yuri

________________________________

LEGAL DISCLAIMER: M.C. Dean, Inc. and its subsidiaries considers this e-mail and any files transmitted with it to be protected, proprietary or privileged information intended solely for the use of the named recipient(s). Any disclosure of this material or the information contained herein, in whole or in part, to anyone outside of the intended recipient or affiliates is strictly prohibited. M. C. Dean, Inc. accepts no liability for the content of this e-mail or for the consequences of any actions taken on the basis of the information contained in it, unless that information is subsequently confirmed in writing. Employees of M.C. Dean, Inc. are instructed not to infringe on any rights of the recipient; any such communication violates company policy. If you are not the intended recipient, any disclosure, copying, distribution, or action taken or omitted in reliance on this information is strictly prohibited by M.C. Dean, Inc.; please notify the sender immediately by return e-mail, delete this communication and destroy all copies.

Re: evaluateJsonPath processor

Posted by Yuri Krysko <Yu...@mcdean.com>.
Hi Matt,

Thanks. ³$" works well.

On 7/5/17, 4:09 PM, "Matt Burgess" <ma...@apache.org> wrote:

>Yuri,
>
>If your Return Type is set to "json" then you should be able to use
>"$" as the JSON Path rather than "$."
>
>Also to put the entire content into an attribute you could use
>ExtractText to match the entire body, this works whether the file is
>JSON or not.
>
>Regards,
>Matt
>
>On Wed, Jul 5, 2017 at 4:02 PM, Yuri Krysko <Yu...@mcdean.com>
>wrote:
>> Hello Everyone,
>>
>> Could anyone please advise why $. expression is considered invalid in
>>EvaluateJsonPath processor. The idea is to copy the entire content of a
>>JSON-formatted flowfile into its attribute.
>>
>> Thanks,
>> Yuri
>>
>> ________________________________
>>
>> LEGAL DISCLAIMER: M.C. Dean, Inc. and its subsidiaries considers this
>>e-mail and any files transmitted with it to be protected, proprietary or
>>privileged information intended solely for the use of the named
>>recipient(s). Any disclosure of this material or the information
>>contained herein, in whole or in part, to anyone outside of the intended
>>recipient or affiliates is strictly prohibited. M. C. Dean, Inc. accepts
>>no liability for the content of this e-mail or for the consequences of
>>any actions taken on the basis of the information contained in it,
>>unless that information is subsequently confirmed in writing. Employees
>>of M.C. Dean, Inc. are instructed not to infringe on any rights of the
>>recipient; any such communication violates company policy. If you are
>>not the intended recipient, any disclosure, copying, distribution, or
>>action taken or omitted in reliance on this information is strictly
>>prohibited by M.C. Dean, Inc.; please notify the sender immediately by
>>return e-mail, delete this communication and destroy all copies.


________________________________

LEGAL DISCLAIMER: M.C. Dean, Inc. and its subsidiaries considers this e-mail and any files transmitted with it to be protected, proprietary or privileged information intended solely for the use of the named recipient(s). Any disclosure of this material or the information contained herein, in whole or in part, to anyone outside of the intended recipient or affiliates is strictly prohibited. M. C. Dean, Inc. accepts no liability for the content of this e-mail or for the consequences of any actions taken on the basis of the information contained in it, unless that information is subsequently confirmed in writing. Employees of M.C. Dean, Inc. are instructed not to infringe on any rights of the recipient; any such communication violates company policy. If you are not the intended recipient, any disclosure, copying, distribution, or action taken or omitted in reliance on this information is strictly prohibited by M.C. Dean, Inc.; please notify the sender immediately by return e-mail, delete this communication and destroy all copies.

Re: evaluateJsonPath processor

Posted by Matt Burgess <ma...@apache.org>.
Yuri,

If your Return Type is set to "json" then you should be able to use
"$" as the JSON Path rather than "$."

Also to put the entire content into an attribute you could use
ExtractText to match the entire body, this works whether the file is
JSON or not.

Regards,
Matt

On Wed, Jul 5, 2017 at 4:02 PM, Yuri Krysko <Yu...@mcdean.com> wrote:
> Hello Everyone,
>
> Could anyone please advise why $. expression is considered invalid in EvaluateJsonPath processor. The idea is to copy the entire content of a JSON-formatted flowfile into its attribute.
>
> Thanks,
> Yuri
>
> ________________________________
>
> LEGAL DISCLAIMER: M.C. Dean, Inc. and its subsidiaries considers this e-mail and any files transmitted with it to be protected, proprietary or privileged information intended solely for the use of the named recipient(s). Any disclosure of this material or the information contained herein, in whole or in part, to anyone outside of the intended recipient or affiliates is strictly prohibited. M. C. Dean, Inc. accepts no liability for the content of this e-mail or for the consequences of any actions taken on the basis of the information contained in it, unless that information is subsequently confirmed in writing. Employees of M.C. Dean, Inc. are instructed not to infringe on any rights of the recipient; any such communication violates company policy. If you are not the intended recipient, any disclosure, copying, distribution, or action taken or omitted in reliance on this information is strictly prohibited by M.C. Dean, Inc.; please notify the sender immediately by return e-mail, delete this communication and destroy all copies.