<?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 Can I use dynamic variable in NiFi expression language? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206553#M78926</link>
    <description>&lt;P&gt;I am trying to write NiFi expression for routeonattribute processor as below:&lt;/P&gt;&lt;P&gt;${db.table.schema:toLower():in(${IncludeSchemaList}):and(${db.table.name:toLower():in(${ExcludeTableList}):not()})}&lt;/P&gt;&lt;P&gt;IncludeSchemaList and ExcludeTableList are provided in variables and added onto the flowfile as an attribute with updateattribute processor. The above In clause is treating the variables as literals and not working.&lt;/P&gt;&lt;P&gt;If I hard code the variables it looks like this:&lt;/P&gt;&lt;P&gt;${db.table.schema:toLower():in("dbo","hilton","archive","audit", "util"):and(${db.table.name:toLower():in("couponcodes","batch_job_execution_context","batch_step_execution"):not()})}&lt;/P&gt;&lt;P&gt;I hope someone knows how to solve for this. I would like to parameterize the schemanames to include and tables names to exclude in variables.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 30 May 2018 21:23:04 GMT</pubDate>
    <dc:creator>prachisharma432</dc:creator>
    <dc:date>2018-05-30T21:23:04Z</dc:date>
    <item>
      <title>Can I use dynamic variable in NiFi expression language?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206553#M78926</link>
      <description>&lt;P&gt;I am trying to write NiFi expression for routeonattribute processor as below:&lt;/P&gt;&lt;P&gt;${db.table.schema:toLower():in(${IncludeSchemaList}):and(${db.table.name:toLower():in(${ExcludeTableList}):not()})}&lt;/P&gt;&lt;P&gt;IncludeSchemaList and ExcludeTableList are provided in variables and added onto the flowfile as an attribute with updateattribute processor. The above In clause is treating the variables as literals and not working.&lt;/P&gt;&lt;P&gt;If I hard code the variables it looks like this:&lt;/P&gt;&lt;P&gt;${db.table.schema:toLower():in("dbo","hilton","archive","audit", "util"):and(${db.table.name:toLower():in("couponcodes","batch_job_execution_context","batch_step_execution"):not()})}&lt;/P&gt;&lt;P&gt;I hope someone knows how to solve for this. I would like to parameterize the schemanames to include and tables names to exclude in variables.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 21:23:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206553#M78926</guid>
      <dc:creator>prachisharma432</dc:creator>
      <dc:date>2018-05-30T21:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use dynamic variable in NiFi expression language?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206554#M78927</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/53264/prachisharma4326.html" nodeid="53264"&gt;@Prachi Sharma&lt;/A&gt; I think you should try something like this:&lt;/P&gt;&lt;PRE&gt;${anyDelineatedValue("${IncludeSchemaList}", ","):equals("${db.table.schema}"):and(anyDelineatedValue("${ExcludeTableList}", ","):equals("${db.table.schema}"):not())}&lt;/PRE&gt;&lt;P&gt;while having &lt;/P&gt;&lt;PRE&gt;IncludeSchemaList=dbo,hilton,archive,audit,util
ExcludeTableList=couponcodes,batch_job_execution_context,batch_step_execution
&lt;/PRE&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 01:03:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206554#M78927</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-05-31T01:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use dynamic variable in NiFi expression language?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206555#M78928</link>
      <description>&lt;P&gt;Thanks, I appreciate the quick response. I had to tweak the approach a bit, but this worked great!&lt;/P&gt;&lt;P&gt;I used two routeonattribute processor as the not() was posing issues. &lt;/P&gt;&lt;P&gt;First apply schema filter allows matches to flow through using below:&lt;/P&gt;&lt;PRE&gt;${anyDelineatedValue("${IncludeSchemaList}", ","):equalsIgnoreCase("${db.table.schema}")}&lt;/PRE&gt;&lt;P&gt;Then I apply table filter and only allow unmatched to flow through, using below:&lt;/P&gt;&lt;PRE&gt;${anyDelineatedValue("${ExcludeTableList}", ","):equalsIgnoreCase("${db.table.name}")}&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 03:35:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-I-use-dynamic-variable-in-NiFi-expression-language/m-p/206555#M78928</guid>
      <dc:creator>prachisharma432</dc:creator>
      <dc:date>2018-05-31T03:35:03Z</dc:date>
    </item>
  </channel>
</rss>

