<?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: How to generate a variable under conditions for another processor? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222396#M184268</link>
    <description>&lt;P&gt;Hello shu, as usual your answer is very clear and well worked.
In fact what you say is effective, but unfortunately it would not be practical for my particular case. While it is true that using this method you describe, only one publkafka processor is required. It will generate as many updateattribute processors as there are kafka topics. Please excuse me if my way of expressing myself in the question was not the most appropriate. finally the goal I'm looking for is not to have dozens of processors.
Thank you for your help, I always learn something from your answers.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2017 17:10:19 GMT</pubDate>
    <dc:creator>xavwebmaster</dc:creator>
    <dc:date>2017-10-16T17:10:19Z</dc:date>
    <item>
      <title>How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222394#M184266</link>
      <description>&lt;P&gt;Hello, everybody.&lt;/P&gt;&lt;P&gt;
I hope you guys will please help me.
I have to store data in many different kafka topics in order to not have dozens of publishkafta processors. &lt;/P&gt;&lt;P&gt;I thought I could use a variable in the topic name property.
My question is as follows, if the log lines I receive have to meet various conditions to be assigned to a topic or other topic. How it could generate the attribute that will serve as a variable to the publkafka processor. &lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;- adult,dog,bulldog,9,23,male,brown,4,etc&lt;/P&gt;&lt;P&gt;
If my log line contains two terms, let's say 'cat' and 'adult' will have to generate the variable 'CAT1' for publishkafka. &lt;/P&gt;&lt;P&gt;If my log line contains the term 'adult' or 'puppy' and also the term 'dog' will have to generate the variable' DOGALL' for publkafka. &lt;/P&gt;&lt;P&gt;I understand that I could use the executescript processor.&lt;/P&gt;&lt;P&gt;Someone can help me with the problem, please. &lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 15:35:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222394#M184266</guid>
      <dc:creator>xavwebmaster</dc:creator>
      <dc:date>2017-10-16T15:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222395#M184267</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/45374/xavwebmaster.html" nodeid="45374" target="_blank"&gt;@xav webmaster&lt;/A&gt;&lt;P&gt;We can do that by using RouteonContent processor followed by UpdateAttribute processor.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Routeoncontent:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;change &lt;STRONG&gt;Match Requirement&lt;/STRONG&gt; strategy to &lt;STRONG&gt;content must contain match&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;a&lt;/U&gt;dd the properties&lt;/P&gt;&lt;PRE&gt;adult_dog as (.*adult.*dog.*)
cat_dog as (.*cat.*dog.*)&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Config:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39815-routecontent.png" style="width: 663px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15707i78F58DB273D3C96D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39815-routecontent.png" alt="39815-routecontent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Right now we are checking the contents of flowfile and add new properties for all the cases that you need to publish the data to kafka, then use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;UpdateAttribute processor:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Add your deserved name to &lt;STRONG&gt;kafka_topic&lt;/STRONG&gt; attribute of the flowfile.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;add new property&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;kafka_topic as cat_dog&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39816-update-attr.png" style="width: 626px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15708iF16821B7A17A1118/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39816-update-attr.png" alt="39816-update-attr.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;PublishKafka:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;every flowfile will have only &lt;STRONG&gt;kafka_topic&lt;/STRONG&gt; as the attribute having different topic names in it, make use of&lt;STRONG&gt; kafka_topic&lt;/STRONG&gt; in our&lt;STRONG&gt; publish kafka processor.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Change &lt;STRONG&gt;Topic Name property&lt;/STRONG&gt; to &lt;/P&gt;&lt;PRE&gt;${kafka_topic}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39817-publish-kafka.png" style="width: 689px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15709i165921FAE629DEF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39817-publish-kafka.png" alt="39817-publish-kafka.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flow screenshot:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39818-flow-kafka.png" style="width: 869px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15710i9E122BA74FC021BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39818-flow-kafka.png" alt="39818-flow-kafka.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow Explanation:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Routeoncontent //check the content and transfers flowfile to matching relationships.
UpdataAttribute //adding kafka_topic attribute with some name.
PublishKafka //using kafka_topic attribute and publishing the contents to respective topics dynamically.&lt;/PRE&gt;&lt;P&gt;Like this way we don't have to use any scripts and dynamically publish into kafka topics.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/8066iED6B610EAEEE37DB/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="extract-text.png" title="extract-text.png" /&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:08:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222395#M184267</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T02:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222396#M184268</link>
      <description>&lt;P&gt;Hello shu, as usual your answer is very clear and well worked.
In fact what you say is effective, but unfortunately it would not be practical for my particular case. While it is true that using this method you describe, only one publkafka processor is required. It will generate as many updateattribute processors as there are kafka topics. Please excuse me if my way of expressing myself in the question was not the most appropriate. finally the goal I'm looking for is not to have dozens of processors.
Thank you for your help, I always learn something from your answers.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 17:10:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222396#M184268</guid>
      <dc:creator>xavwebmaster</dc:creator>
      <dc:date>2017-10-16T17:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222397#M184269</link>
      <description>&lt;P&gt;At the moment with my little knowledge of nifi, I'm trying to generate an attribute from the executescript processor. At the moment I am able to read the content of the flowfile and have generated conditions using' if' and' else'. Unfortunately, at the moment I am not able to generate the dynamic attribute. so that the flowfile that comes out, comes out as it is, but with a dynamic attribute that allows pusblishkafka to derive the content.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 17:16:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222397#M184269</guid>
      <dc:creator>xavwebmaster</dc:creator>
      <dc:date>2017-10-16T17:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222398#M184270</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/45374/xavwebmaster.html" nodeid="45374"&gt;@xav webmaster&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Have you looked to rules feature in the UpdateAttribute processor ? it's available in the advanced configuration section : &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-update-attribute-nar/1.4.0/org.apache.nifi.processors.attributes.UpdateAttribute/additionalDetails.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-update-attribute-nar/1.4.0/org.apache.nifi.processors.attributes.UpdateAttribute/additionalDetails.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can extract information that you want and add them as an attribute (using extract processors). Once you have information that you want as an attribute, you can use UpdateAttribute with rules to add/update a new attribute 'topic' and set the value following you conditions.&lt;/P&gt;&lt;P&gt;Is this helpful ?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:27:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222398#M184270</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2017-10-16T20:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222399#M184271</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/45374/xavwebmaster.html" nodeid="45374"&gt;@xav webmaster&lt;/A&gt; &lt;/P&gt;&lt;P&gt;to have an idea on how this works, look at this answer &lt;A href="https://community.hortonworks.com/questions/140060/nifi-how-to-load-a-value-in-memory-one-time-from-c.html" target="_blank"&gt;https://community.hortonworks.com/questions/140060/nifi-how-to-load-a-value-in-memory-one-time-from-c.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's not the same subject but it can give you an idea on how you can use this feature&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:43:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222399#M184271</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2017-10-16T20:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222400#M184272</link>
      <description>&lt;P&gt;Hi Abdelkrim Hadjidj, thanks for the help. Unfortunately, it's not a solution to the problem I have. Since as a target I want to reduce the number of processors to use. Having many kafta topics, I think the solution may be to use the executescript processor. Since if I generate attributes in another way, I will end up having only one publisher, but many updateattribute. Greetings&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:52:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222400#M184272</guid>
      <dc:creator>xavwebmaster</dc:creator>
      <dc:date>2017-10-16T20:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222401#M184273</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/45374/xavwebmaster.html" nodeid="45374"&gt;@xav webmaster&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You can use one UpdateAttribute with several rules. if x then topic = 'A', if y then topic = 'B' etc&lt;/P&gt;&lt;P&gt;You can add rules and define an action for each rule which set the correct topic value&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:57:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222401#M184273</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2017-10-16T20:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a variable under conditions for another processor?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222402#M184274</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/45374/xavwebmaster.html" nodeid="45374" target="_blank"&gt;@xav webmaster&lt;/A&gt;, i think this answer will help you for sure,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Sample Flow :-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;GenerateFlowFile--&amp;gt; ExtractText--&amp;gt;UpdateAttribute--&amp;gt;PublishKafka&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;GenerateFlowFile:-&lt;/U&gt;&lt;/STRONG&gt; As for testing purpose i'm using this but in your case you are having some other processors&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;ExtractText Processor:- &lt;/U&gt;&lt;/STRONG&gt;in this processor i'm extracting the contents of flowfile as attribute.&lt;/P&gt;&lt;PRE&gt;Ex:- adult,dog,bulldog,9,23,male,brown,4,etc &lt;/PRE&gt;&lt;P&gt;The above content of flowfile by adding new property to ExtractText i'm going to extract the content and keeping that as attribute of the flowfile&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cnt_attr as&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt; (.*) //capture everything and add to ff as cnt_attr&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39826-extract-text.png" style="width: 570px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15703iA8295E039340934D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39826-extract-text.png" alt="39826-extract-text.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Output of this processor:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Every flowfile will associated with the attribute called &lt;STRONG&gt;cnt_attr &lt;/STRONG&gt;to it, we can use this attribute in&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;UpdateAttribute Processor:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To &lt;STRONG&gt;dynamically&lt;/STRONG&gt; change the &lt;STRONG&gt;topic names&lt;/STRONG&gt; based on the &lt;STRONG&gt;cnt_attr attribute&lt;/STRONG&gt;, for this case we need to use &lt;STRONG&gt;Advanced Usage&lt;/STRONG&gt; of Update Attribute processor.&lt;/P&gt;&lt;P&gt;Right Click on &lt;STRONG&gt;UpdateAttribute&lt;/STRONG&gt; processor and click on &lt;STRONG&gt;Advanced Button&lt;/STRONG&gt; in the &lt;STRONG&gt;lower right corner&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Steps:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39824-update-attr-adult-dog.png" style="width: 1534px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15704i235A01BF46427D67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39824-update-attr-adult-dog.png" alt="39824-update-attr-adult-dog.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;open above screenshot in new tab to see 1,2,3,4 steps and refer them with below steps&lt;/P&gt;&lt;P&gt;1. As mentioned in the above screenshot click on &lt;STRONG&gt;FlowFile Policy&lt;/STRONG&gt; change to &lt;/P&gt;&lt;PRE&gt;UseOriginal&lt;/PRE&gt;&lt;P&gt;2. Click on + sign at &lt;STRONG&gt;Rules&lt;/STRONG&gt; and give name as &lt;STRONG&gt;adult_dog&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3. Click on + sign at &lt;STRONG&gt;Conditions&lt;/STRONG&gt; and give our &lt;STRONG&gt;check condition&lt;/STRONG&gt; in it&lt;/P&gt;&lt;PRE&gt;${cnt_attrt:matches('.*adult.*dog.*')}&lt;/PRE&gt;&lt;P&gt;4. Click on + sign at Actions and give the &lt;STRONG&gt;attribute name&lt;/STRONG&gt; as &lt;/P&gt;&lt;PRE&gt;kafka_topic&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt; for the &lt;STRONG&gt;kafka_topic&lt;/STRONG&gt; attribute as&lt;/P&gt;&lt;PRE&gt;adult_dog&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;New Rule:-&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for cat_dog&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; conditions check is ${cnt_attr:matches('.*cat.*dog.*')} and Actions add attribute name as kafka_topic and value is cat_dog same as 2,3,4 steps above.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;summarize all the steps:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;step 1 we are using original flowfile and 
step2 we are creating a rule and 
step3 adding conditions to check if the cnt_attr attribute satisfies or not 
step4 if it satisfies then adding kafka_topic attribute with desired name to it.&lt;/PRE&gt;&lt;P&gt;like this way we can add as many rules as we want in same &lt;STRONG&gt;UpdateAttribute Processor&lt;/STRONG&gt; as you can see in my screenshot i have added 2 Rules(adult_dog,cat_dog).&lt;/P&gt;&lt;P&gt;This processor&lt;STRONG&gt; checks&lt;/STRONG&gt; which &lt;STRONG&gt;Rule&lt;/STRONG&gt; has &lt;STRONG&gt;satisfied&lt;/STRONG&gt; and updates &lt;STRONG&gt;kafka_topic&lt;/STRONG&gt; attribute with the &lt;STRONG&gt;mentioned name&lt;/STRONG&gt; in it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt; PublishKafka:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;use the kafka_topic attribute in Topic Name property of processor&lt;/P&gt;&lt;PRE&gt;${kafka_topic}&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39825-publish-kafka.png" style="width: 689px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15705i7D46C386601AE107/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39825-publish-kafka.png" alt="39825-publish-kafka.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow Screenshot:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39827-flow-kafka.png" style="width: 780px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15706i99EC2056B252B380/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39827-flow-kafka.png" alt="39827-flow-kafka.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this way we can use only one &lt;STRONG&gt;UpdateAttribute&lt;/STRONG&gt; to &lt;STRONG&gt;dynamically&lt;/STRONG&gt; change the value of&lt;STRONG&gt; kafka_topic&lt;/STRONG&gt; based on update attribute processor and use same&lt;STRONG&gt; kafka_topic&lt;/STRONG&gt; attribute to&lt;STRONG&gt; publish messages&lt;/STRONG&gt; to respective topics.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:07:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-generate-a-variable-under-conditions-for-another/m-p/222402#M184274</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T02:07:37Z</dc:date>
    </item>
  </channel>
</rss>

