<?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 Re: nifi toolkit merge-param-context help in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406956#M252598</link>
    <description>&lt;P&gt;Thanks for the reminder regarding the semantic of merge-param-context.&lt;BR /&gt;I overlooked the contents of the help and my initial posting.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
    <pubDate>Fri, 25 Apr 2025 13:45:13 GMT</pubDate>
    <dc:creator>Alf015</dc:creator>
    <dc:date>2025-04-25T13:45:13Z</dc:date>
    <item>
      <title>nifi toolkit merge-param-context help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406862#M252575</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm investigating Nifi toolkit (1.16 if it matters)&lt;BR /&gt;to add key/value pairs to a param-context programmatically&lt;BR /&gt;( I can't use existing PC providers )&lt;BR /&gt;&lt;BR /&gt;Nifi toolkit documents the following action:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;#&amp;gt; nifi merge-param-context -help&lt;/P&gt;&lt;P&gt;Adds any parameters that exist in the exported context that don't exist in the&lt;BR /&gt;existing context. Overwrites any existing inherited parameter contexts with the&lt;BR /&gt;provided list.&lt;BR /&gt;...&lt;BR /&gt;-i,--input &amp;lt;arg&amp;gt; A local file to read as input contents, or a&lt;BR /&gt;public URL to fetch&lt;BR /&gt;&lt;BR /&gt;I would like to know if the key/value pairs to add to the PC ( -pcid argument )&lt;BR /&gt;can come from the contents of the -i file&lt;BR /&gt;&lt;BR /&gt;If yes, what is expected format of this file please ?&lt;BR /&gt;( random testing and error messages didn't help much)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 14:40:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406862#M252575</guid>
      <dc:creator>Alf015</dc:creator>
      <dc:date>2025-04-23T14:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: nifi toolkit merge-param-context help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406899#M252583</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/102022"&gt;@Alf015&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The merge-param-context command will merge an exported parameter context's parameters into another existing parameter context.&lt;BR /&gt;&lt;BR /&gt;As simple exported parameter context with three parameters defined in it looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "name" : "test-param",
  "description" : "",
  "parameters" : [ {
    "parameter" : {
      "name" : "test1",
      "description" : "",
      "sensitive" : false,
      "value" : "test1",
      "provided" : false,
      "inherited" : false
    }
  }, {
    "parameter" : {
      "name" : "test2",
      "description" : "",
      "sensitive" : false,
      "value" : "test2",
      "provided" : false,
      "inherited" : false
    }
  }, {
    "parameter" : {
      "name" : "test3",
      "description" : "",
      "sensitive" : false,
      "value" : "test3",
      "provided" : false,
      "inherited" : false
    }
  } ],
  "inheritedParameterContexts" : [ ]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;You can then use the merge-param-context command to merge the exported parameter context with another parameter context that already exists in the target NiFi:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;./cli.sh nifi merge-param-context -i /tmp/test-param.json -p /opt/nifi-toolkit/conf/mytarget.properties -pcid b47a13ab-0195-1000-cc06-dc7779729310 --verbose&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;"test-param.json" contains above shared json&lt;/LI&gt;&lt;LI&gt;"mytarget.properties" contains the connection info for target NiFi.&lt;/LI&gt;&lt;LI&gt;"b47a13ab-0195-1000-cc06-dc7779729310" is the id for the destination parameter context in which I am merging the input parameters&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;There is a sample .properties file (../conf/cli.properties.example) in the toolkit conf directory.&lt;/P&gt;&lt;P&gt;Contents of mine looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;baseUrl=https://nifihostname:8443
keystore=/opt/nifi/conf/keystore.p12
keystoreType=PKCS12
keystorePasswd=&amp;lt;password&amp;gt;
keyPasswd=&amp;lt;password&amp;gt;
truststore=/opt/nifi/conf/truststore.p12
truststoreType=PKCS12
truststorePasswd=&amp;lt;password&amp;gt;
proxiedEntity=&amp;lt;nifiadmin&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;You can get the values for above from your nifi.properties file of the target/destination NiFi.&amp;nbsp; The proxiedEntity is my NiFi user identity that has permissions to edit the destination parameter context I am importing the new parameters into.&amp;nbsp; NOTE:&amp;nbsp; Your NiFi node must be authorized to /proxy user requests with Access Policies in destination NiFi.&amp;nbsp; If you choose not to use a proxiedEntity, your NiFi node will need to be directly authorized to edit the target parameter context.&lt;/P&gt;&lt;P&gt;Please help our community grow. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 14:38:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406899#M252583</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-04-24T14:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: nifi toolkit merge-param-context help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406945#M252591</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Thanks for the quick and detailed answer.&lt;BR /&gt;&lt;BR /&gt;I've tested the solution and managed to use it&lt;BR /&gt;to insert new key / value pairs int he PC if the key is not already present&lt;BR /&gt;&lt;BR /&gt;But I could not update the value of a key already existing in the PC.&lt;BR /&gt;&lt;BR /&gt;Is this expected behaviour ?&lt;BR /&gt;Or is there a way to just update the value of an existing key that I would have missed ?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 10:08:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406945#M252591</guid>
      <dc:creator>Alf015</dc:creator>
      <dc:date>2025-04-25T10:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: nifi toolkit merge-param-context help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406946#M252592</link>
      <description>&lt;P&gt;A quick series of command I used to test the above scenario&lt;BR /&gt;outlined in my reply just above&lt;BR /&gt;where an existing key did not get its corresponding value updated&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;#&amp;gt; nifi get-param-context -pcid 5d3d3ac8-0196-1000-ffff-ffffaf0565d4&lt;/P&gt;&lt;P&gt;# Name Value Sensitive Description&lt;BR /&gt;- ---------- ------------ --------- -----------&lt;BR /&gt;1 test-key-1 test-value-1 false&lt;BR /&gt;2 test-key-2 test-value-2 false&lt;/P&gt;&lt;P&gt;#&amp;gt; nifi merge-param-context -pcid 5d3d3ac8-0196-1000-ffff-ffffaf0565d4 -i sample-pc.json&lt;BR /&gt;Found parameter to add - 'test-key-3'&lt;BR /&gt;Waiting for update request to complete...&lt;BR /&gt;Waiting for update request to complete...&lt;BR /&gt;Waiting for update request to complete...&lt;BR /&gt;Waiting for update request to complete...&lt;/P&gt;&lt;P&gt;#&amp;gt; nifi get-param-context -pcid 5d3d3ac8-0196-1000-ffff-ffffaf0565d4&lt;/P&gt;&lt;P&gt;# Name Value Sensitive Description&lt;BR /&gt;- ---------- ------------------ --------- -----------&lt;BR /&gt;1 test-key-1 test-value-1 false&lt;BR /&gt;2 test-key-2 test-value-2 false&lt;BR /&gt;3 test-key-3 test-added-value-3 false&lt;BR /&gt;&lt;BR /&gt;The new key test-key-3 is added with its value to the PC.&lt;BR /&gt;But the value corresponding to test-key-1 is left unchanged&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--- The sample json contents used below&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"name" : "test-param-ctx",&lt;BR /&gt;"description" : "",&lt;BR /&gt;"parameters" : [ {&lt;BR /&gt;"parameter" : {&lt;BR /&gt;"name" : "test-key-1",&lt;BR /&gt;"description" : "",&lt;BR /&gt;"sensitive" : false,&lt;BR /&gt;"value" : "test-modified-value-1",&lt;BR /&gt;"provided" : true,&lt;BR /&gt;"inherited" : false&lt;BR /&gt;}&lt;BR /&gt;}, {&lt;BR /&gt;"parameter" : {&lt;BR /&gt;"name" : "test-key-3",&lt;BR /&gt;"description" : "",&lt;BR /&gt;"sensitive" : false,&lt;BR /&gt;"value" : "test-added-value-3",&lt;BR /&gt;"provided" : false,&lt;BR /&gt;"inherited" : false&lt;BR /&gt;}&lt;BR /&gt;} ],&lt;BR /&gt;"inheritedParameterContexts" : [ ]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 11:50:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406946#M252592</guid>
      <dc:creator>Alf015</dc:creator>
      <dc:date>2025-04-25T11:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: nifi toolkit merge-param-context help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406949#M252593</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/102022"&gt;@Alf015&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The&amp;nbsp; "merge-param-context" cli.sh NiFi command does the following when merging one parameter context into another:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Adds any parameters that exist in the exported context that don't exist in the
existing context.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;So your observations align with the documented behavior of this command.&amp;nbsp; It will not modify value of any already existing parameter in the destination parameter context.&lt;BR /&gt;&lt;BR /&gt;It sounds like what you want to be using in the "set-param" command instead:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Creates or updates a parameter in the given parameter context.&lt;/LI-CODE&gt;&lt;P&gt;Above will allow you to modify an existing parameter within the target parameter context.&lt;/P&gt;&lt;P&gt;Please help our community grow. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 12:44:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406949#M252593</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-04-25T12:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: nifi toolkit merge-param-context help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406956#M252598</link>
      <description>&lt;P&gt;Thanks for the reminder regarding the semantic of merge-param-context.&lt;BR /&gt;I overlooked the contents of the help and my initial posting.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 13:45:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-toolkit-merge-param-context-help/m-p/406956#M252598</guid>
      <dc:creator>Alf015</dc:creator>
      <dc:date>2025-04-25T13:45:13Z</dc:date>
    </item>
  </channel>
</rss>

