<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to use FlowFile attributes from one flow in the another flow in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-FlowFile-attributes-from-one-flow-in-the-another/m-p/328126#M230197</link>
    <description>&lt;P&gt;I have a requirement of loading Data from MySQL to Salesforce (using Salesforce BLUK API) using Nifi. For that I am first calling a Salesforce SOAP API to get session_id(accessToken), then I am passing this session_id to another REST API to create a BULK Load job on Salesforce and I am extracting the job_id and adding both the session_id and job_id into the attribute of the flow file.&lt;/P&gt;&lt;P&gt;Till now everything was fine, but now I need to extract the data from MySQL Table using QueryDatabaseTable processor which doesn't accepts any upstream link, but I need to use the session_id and job_id to pass it along with the MySQL Data to Salesforce BULK API REST call using InvokeHTTP, so now I have two disconnected flows, one has the job_id and session_id to be passed to Salesforce REST API and the other flow has the Data from MySQL DB, but I am unable to use both of these in the InvokeHTTP. Its a very tricky situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way, that I can store the session_id and job_id from the 1st flow inside the flowfile attributes into some variable and use them while calling the REST API when invoking the REST API along with the Data extracted from MySQL ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AA24&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NifiIssue1.JPG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/32693iD630C75D286842C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="NifiIssue1.JPG" alt="NifiIssue1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 15:12:39 GMT</pubDate>
    <dc:creator>AA24</dc:creator>
    <dc:date>2021-10-19T15:12:39Z</dc:date>
    <item>
      <title>How to use FlowFile attributes from one flow in the another flow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-FlowFile-attributes-from-one-flow-in-the-another/m-p/328126#M230197</link>
      <description>&lt;P&gt;I have a requirement of loading Data from MySQL to Salesforce (using Salesforce BLUK API) using Nifi. For that I am first calling a Salesforce SOAP API to get session_id(accessToken), then I am passing this session_id to another REST API to create a BULK Load job on Salesforce and I am extracting the job_id and adding both the session_id and job_id into the attribute of the flow file.&lt;/P&gt;&lt;P&gt;Till now everything was fine, but now I need to extract the data from MySQL Table using QueryDatabaseTable processor which doesn't accepts any upstream link, but I need to use the session_id and job_id to pass it along with the MySQL Data to Salesforce BULK API REST call using InvokeHTTP, so now I have two disconnected flows, one has the job_id and session_id to be passed to Salesforce REST API and the other flow has the Data from MySQL DB, but I am unable to use both of these in the InvokeHTTP. Its a very tricky situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way, that I can store the session_id and job_id from the 1st flow inside the flowfile attributes into some variable and use them while calling the REST API when invoking the REST API along with the Data extracted from MySQL ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AA24&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NifiIssue1.JPG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/32693iD630C75D286842C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="NifiIssue1.JPG" alt="NifiIssue1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 15:12:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-use-FlowFile-attributes-from-one-flow-in-the-another/m-p/328126#M230197</guid>
      <dc:creator>AA24</dc:creator>
      <dc:date>2021-10-19T15:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FlowFile attributes from one flow in the another flow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-FlowFile-attributes-from-one-flow-in-the-another/m-p/328166#M230208</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92882"&gt;@AA24&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The easiest way to accomplish this is to use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.14.0/org.apache.nifi.processors.standard.PutDistributedMapCache/index.html" target="_self"&gt;PutDistributedMapCache&lt;/A&gt; processor in one flow to write the attributes values you want to share to a cache server and on your other flow use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.14.0/org.apache.nifi.processors.standard.FetchDistributedMapCache/index.html" target="_self"&gt;FetchDistributedMapCache&lt;/A&gt; processor to retrieve those cached attributes and add them to your other FlowFiles that need them.&lt;BR /&gt;&lt;BR /&gt;Another option is to use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.14.0/org.apache.nifi.processors.standard.MergeContent/index.html" target="_self"&gt;MergeContent&lt;/A&gt; processor. On flow one where it looks like you are extracting your&amp;nbsp;&lt;SPAN&gt;session_id and job_id you would use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.14.0/org.apache.nifi.processors.standard.ModifyBytes/index.html" target="_self"&gt;ModfiyBytes&lt;/A&gt; processor to zero out the content leaving you with a FlowFile that only has attributes and then use MergeContent to combine this FlowFile with the FlowFile in your second flow. In the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.14.0/org.apache.nifi.processors.standard.MergeContent/index.html" target="_self"&gt;MergeContent&lt;/A&gt; processor you would configure "&lt;STRONG&gt;Attribute Strategy&lt;/STRONG&gt;" to use "&lt;STRONG&gt;Keep All Unique Attributes&lt;/STRONG&gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found this response assisted with your query, please take a moment to login and click on "&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;" below this post.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 21:04:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-use-FlowFile-attributes-from-one-flow-in-the-another/m-p/328166#M230208</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-10-19T21:04:57Z</dc:date>
    </item>
  </channel>
</rss>

