Re: how to merge attributes?

2018-10-24 Thread l vic
Not sure I understand: "InvokeHttp" offers 5 relationships: "Failure", "No
Retry",  "Original", "Response", "Retry" with incoming FlowFile created for
"matched" relationship...Don't see any "Result" and "Response" flowfile
doesn't seem to contain input attributes. I work with ver. 1.7.0 of nifi
Thank you,
Victor

On Tue, Oct 23, 2018 at 10:16 PM Koji Kawamura 
wrote:

> Hello,
>
> InvokeHttp creates a new FlowFile for "Result" relationship from the
> incoming FlowFile. That means, the FlowFile for "Result" carries all
> attributes copied that the incoming one has. You just need to connect
> the "Result" relationship to ReplaceTest. "Original" can be
> auto-terminated in this case.
>
> Thanks,
> Koji
> On Wed, Oct 24, 2018 at 5:37 AM l vic  wrote:
> >
> > I have to create sql query from results of rest call (InvokeHttp ) and
> original request parameters...
> >
> > Any idea how i can merge attributes from both in single flowfile for
> passing it to "ReplaceText"? If I pass both "Original" and "Result" from
> "InvokeHttp" to "ReplaceText" I end up with one "valid" flowfile using
> attributes from both and one "junk" one with empty placeholders... If I try
> use "MergeContent" to  merge flows I end up only with junk only like the
> following
> >
> >
> > update joint_table set create_date = 1540321085127, filter = '',
> data_start_time =  + 1532016495 - , execute_date = 1532016495 + where id =
> '1749462c-ed2b-4a34-9332-3687a60c1e1c'
> >
> >
> > Thank you
>


Re: how to merge attributes?

2018-10-23 Thread Koji Kawamura
Hello,

InvokeHttp creates a new FlowFile for "Result" relationship from the
incoming FlowFile. That means, the FlowFile for "Result" carries all
attributes copied that the incoming one has. You just need to connect
the "Result" relationship to ReplaceTest. "Original" can be
auto-terminated in this case.

Thanks,
Koji
On Wed, Oct 24, 2018 at 5:37 AM l vic  wrote:
>
> I have to create sql query from results of rest call (InvokeHttp ) and 
> original request parameters...
>
> Any idea how i can merge attributes from both in single flowfile for passing 
> it to "ReplaceText"? If I pass both "Original" and "Result" from "InvokeHttp" 
> to "ReplaceText" I end up with one "valid" flowfile using attributes from 
> both and one "junk" one with empty placeholders... If I try use 
> "MergeContent" to  merge flows I end up only with junk only like the following
>
>
> update joint_table set create_date = 1540321085127, filter = '', 
> data_start_time =  + 1532016495 - , execute_date = 1532016495 + where id = 
> '1749462c-ed2b-4a34-9332-3687a60c1e1c'
>
>
> Thank you


how to merge attributes?

2018-10-23 Thread l vic
I have to create sql query from results of rest call (InvokeHttp ) and
original request parameters...

Any idea how i can merge attributes from both in single flowfile for
passing it to "ReplaceText"? If I pass both "Original" and "Result" from
"InvokeHttp" to "ReplaceText" I end up with one "valid" flowfile using
attributes from both and one "junk" one with empty placeholders... If I try
use "MergeContent" to  merge flows I end up only with junk only like the
following


update joint_table set create_date = 1540321085127, filter = '',
data_start_time =  + 1532016495 - , execute_date = 1532016495 + where id =
'1749462c-ed2b-4a34-9332-3687a60c1e1c'


Thank you