<?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 Nifi - ExectueSQL - how to force a parameter to be a string in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240117#M201923</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've created a parameterized SQL query in the ExecuteSQL processor, this processor is predecessed by an UpdateAttribute with those parameters:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="97576-capture-param-sql.png" style="width: 506px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/13864iC516CEE08E3DA786/image-size/medium?v=v2&amp;amp;px=400" role="button" title="97576-capture-param-sql.png" alt="97576-capture-param-sql.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is the part of the where clause that uses this parameter : &lt;/P&gt;&lt;P&gt;AND (( ?sql.args.4.value IS NULL AND mm.docno IS NULL  ) OR ( mm.docno  = ?sql.args.4.value))&lt;/P&gt;&lt;P&gt;The issue is that I keep having this error message :&lt;/P&gt;&lt;P&gt;"java.sql.SQLDataException: Value of the sql.args.4.type attribute is 'CHAR', which is not a valid JDBC numeral type"&lt;/P&gt;&lt;P&gt;Any clues ?&lt;/P&gt;</description>
    <pubDate>Sat, 17 Aug 2019 22:30:50 GMT</pubDate>
    <dc:creator>cdeloeul</dc:creator>
    <dc:date>2019-08-17T22:30:50Z</dc:date>
    <item>
      <title>Nifi - ExectueSQL - how to force a parameter to be a string</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240117#M201923</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've created a parameterized SQL query in the ExecuteSQL processor, this processor is predecessed by an UpdateAttribute with those parameters:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="97576-capture-param-sql.png" style="width: 506px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/13864iC516CEE08E3DA786/image-size/medium?v=v2&amp;amp;px=400" role="button" title="97576-capture-param-sql.png" alt="97576-capture-param-sql.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is the part of the where clause that uses this parameter : &lt;/P&gt;&lt;P&gt;AND (( ?sql.args.4.value IS NULL AND mm.docno IS NULL  ) OR ( mm.docno  = ?sql.args.4.value))&lt;/P&gt;&lt;P&gt;The issue is that I keep having this error message :&lt;/P&gt;&lt;P&gt;"java.sql.SQLDataException: Value of the sql.args.4.type attribute is 'CHAR', which is not a valid JDBC numeral type"&lt;/P&gt;&lt;P&gt;Any clues ?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 22:30:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240117#M201923</guid>
      <dc:creator>cdeloeul</dc:creator>
      <dc:date>2019-08-17T22:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi - ExectueSQL - how to force a parameter to be a string</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240118#M201924</link>
      <description>&lt;P&gt;based on : &lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JdbcCommon.java"&gt;Processor's code&lt;/A&gt;, line 714+&lt;/P&gt;&lt;P&gt;Am I'm right to suppose that the way this function works, will prevent any non numeric parameter to work ?&lt;/P&gt;&lt;P&gt;This seems to be an error in the logic itself.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 22:19:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240118#M201924</guid>
      <dc:creator>cdeloeul</dc:creator>
      <dc:date>2019-01-10T22:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi - ExectueSQL - how to force a parameter to be a string</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240119#M201925</link>
      <description>&lt;P&gt;The sql.args.N.type parameters are actually numeric codes indicating the type, not the string name of the type. So instead of setting sql.args.4.type to "CHAR", set it to "1" instead. The mapping of numbers to types is given &lt;A href="https://docs.oracle.com/javase/8/docs/api/constant-values.html#java.sql.Types.BIT" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 22:22:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240119#M201925</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2019-01-10T22:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi - ExectueSQL - how to force a parameter to be a string</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240120#M201926</link>
      <description>&lt;P&gt;Thanks Matt for pointing this out.&lt;/P&gt;&lt;P&gt;Seems I had read the documentation too quickly :&lt;/P&gt;&lt;P&gt;From executeSQL usage : &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;sql.args.N.type&lt;/TD&gt;&lt;TD&gt;Incoming FlowFiles are expected to be parametrized SQL statements. The type of each Parameter is specified &lt;STRONG&gt;as an integer&lt;/STRONG&gt; that represents the JDBC Type of the parameter.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;sorry !&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 23:12:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-ExectueSQL-how-to-force-a-parameter-to-be-a-string/m-p/240120#M201926</guid>
      <dc:creator>cdeloeul</dc:creator>
      <dc:date>2019-01-10T23:12:02Z</dc:date>
    </item>
  </channel>
</rss>

