<?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 ExecuteSQL - UnresolvedUnionException in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100275#M13215</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting below Exception while using ExecuteSQL processor to get data from mysql, looks like auto increment field is creating issue. anyone faced this issue or am I missing something?&lt;/P&gt;&lt;PRE&gt;11:46:44 ESTERRORe7cc632a-4d8f-4362-b5e0-68faefd01c23
ExecuteSQL[id=e7cc632a-4d8f-4362-b5e0-68faefd01c23] ExecuteSQL[id=e7cc632a-4d8f-4362-b5e0-68faefd01c23] failed to process session due to org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.UnresolvedUnionException: Not in union ["null","int"]: 1: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.UnresolvedUnionException: Not in union ["null","int"]: 1
11:46:44 ESTWARNINGe7cc632a-4d8f-4362-b5e0-68faefd01c23
ExecuteSQL[id=e7cc632a-4d8f-4362-b5e0-68faefd01c23] Processor Administratively Yielded for 1 sec due to processing failure&lt;/PRE&gt;&lt;P&gt;It used to work in 0.3.x version, when tested in 0.4.0 I am getting above error. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select * from SALARIES; --&amp;gt; gives error&lt;/P&gt;&lt;P&gt;SELECT ID from SALARIES; --&amp;gt; gives error&lt;/P&gt;&lt;P&gt;Select GENDER,AGE,SALARY,ZIPCODE from SALARIES; --&amp;gt; works fine&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="982-screen-shot-2015-12-21-at-85706-am.png" style="width: 1204px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23811iE65EE1353C888C8C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="982-screen-shot-2015-12-21-at-85706-am.png" alt="982-screen-shot-2015-12-21-at-85706-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks In Advance,&lt;/P&gt;&lt;P&gt;Jobin George&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 12:33:51 GMT</pubDate>
    <dc:creator>jgeorge</dc:creator>
    <dc:date>2026-04-21T12:33:51Z</dc:date>
    <item>
      <title>ExecuteSQL - UnresolvedUnionException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100275#M13215</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting below Exception while using ExecuteSQL processor to get data from mysql, looks like auto increment field is creating issue. anyone faced this issue or am I missing something?&lt;/P&gt;&lt;PRE&gt;11:46:44 ESTERRORe7cc632a-4d8f-4362-b5e0-68faefd01c23
ExecuteSQL[id=e7cc632a-4d8f-4362-b5e0-68faefd01c23] ExecuteSQL[id=e7cc632a-4d8f-4362-b5e0-68faefd01c23] failed to process session due to org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.UnresolvedUnionException: Not in union ["null","int"]: 1: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.UnresolvedUnionException: Not in union ["null","int"]: 1
11:46:44 ESTWARNINGe7cc632a-4d8f-4362-b5e0-68faefd01c23
ExecuteSQL[id=e7cc632a-4d8f-4362-b5e0-68faefd01c23] Processor Administratively Yielded for 1 sec due to processing failure&lt;/PRE&gt;&lt;P&gt;It used to work in 0.3.x version, when tested in 0.4.0 I am getting above error. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select * from SALARIES; --&amp;gt; gives error&lt;/P&gt;&lt;P&gt;SELECT ID from SALARIES; --&amp;gt; gives error&lt;/P&gt;&lt;P&gt;Select GENDER,AGE,SALARY,ZIPCODE from SALARIES; --&amp;gt; works fine&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="982-screen-shot-2015-12-21-at-85706-am.png" style="width: 1204px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23811iE65EE1353C888C8C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="982-screen-shot-2015-12-21-at-85706-am.png" alt="982-screen-shot-2015-12-21-at-85706-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks In Advance,&lt;/P&gt;&lt;P&gt;Jobin George&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 12:33:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100275#M13215</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2026-04-21T12:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteSQL - UnresolvedUnionException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100276#M13216</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.hortonworks.com/questions/7508/executesql-unresolvedunionexception.html#"&gt;@Jobin George&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I was trying to recreate this error... I have NiFi 0.4.0, MySQL 5.6.26, mysql-connector-java-5.1.38-bin.jar.&lt;/P&gt;&lt;P&gt;Created the same table as you and inserted three rows:&lt;/P&gt;&lt;P&gt;CREATE TABLE SALARIES ( ID int NOT NULL AUTO_INCREMENT, ZIPCODE int, SALARY double, AGE int, GENDER varchar(255), PRIMARY KEY (ID) );&lt;/P&gt;&lt;P&gt;INSERT INTO SALARIES (ZIPCODE, SALARY, AGE, GENDER) VALUES (12345, 100, 30, 'MALE'); &lt;/P&gt;&lt;P&gt;INSERT INTO SALARIES (ZIPCODE, SALARY, AGE, GENDER) VALUES (12345, 200, 31, 'MALE'); &lt;/P&gt;&lt;P&gt;INSERT INTO SALARIES (SALARY, AGE, GENDER) VALUES (10, 20, 'MALE');
&lt;/P&gt;&lt;P&gt;In NiFi I have ExecuteSQL with "select * from salaries;" -&amp;gt; ConvertAvroToJson -&amp;gt; LogAttribute and I see this in the logs:&lt;/P&gt;&lt;P&gt;[{"ID": 1, "ZIPCODE": 12345, "SALARY": 100.0, "AGE": 30, "GENDER": "MALE"},{"ID": 2, "ZIPCODE": 12345, "SALARY": 200.0, "AGE": 31, "GENDER": "MALE"},{"ID": 3, "ZIPCODE": null, "SALARY": 10.0, "AGE": 20, "GENDER": "MALE"}]
&lt;/P&gt;&lt;P&gt;If I change the query to "select id from salaries;" I see:&lt;/P&gt;&lt;P&gt;[{"ID": 1},{"ID": 2},{"ID": 3}]&lt;/P&gt;&lt;P&gt;Is there anything that jumps out at you as being different between your setup and mine? different versions of mysql? something specific in your data?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 02:57:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100276#M13216</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2015-12-22T02:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteSQL - UnresolvedUnionException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100277#M13217</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363"&gt;@bbende&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;Below are the  DDLs i used, Not sure if that could be an issue. I had the same setup for HDF lab i created to push data from mysql to phoenix in 0.3.0 which works perfectly.&lt;/P&gt;&lt;PRE&gt;create table SALARIES (GENDER varchar(1), AGE int, SALARY double, ZIPCODE int);
load data infile '/tmp/salaries.txt' into table SALARIES fields terminated by ','; 
alter table SALARIES add column `ID` int(10) unsigned primary KEY AUTO_INCREMENT;&lt;/PRE&gt;&lt;P&gt;Also, Mysql version i have is: MySQL 5.1.73  [these 2 are the differences i can think of] &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jobin &lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 03:26:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100277#M13217</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2015-12-22T03:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteSQL - UnresolvedUnionException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100278#M13218</link>
      <description>&lt;P&gt;Ok thanks, with your DDL I can recreate. Looking into it now...&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 03:53:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100278#M13218</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2015-12-22T03:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteSQL - UnresolvedUnionException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100279#M13219</link>
      <description>&lt;P&gt;This turns out to be specific to using "unsigned int" which is essentially a Long, but we are generating an Avro schema that expects an "int". Some changes in 0.4.0 that fixed other issues with ExecuteSQL appear to have introduced this. I captured the issue with this JIRA: &lt;A href="https://issues.apache.org/jira/browse/NIFI-1319" target="_blank"&gt;https://issues.apache.org/jira/browse/NIFI-1319&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 04:47:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100279#M13219</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2015-12-22T04:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteSQL - UnresolvedUnionException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100280#M13220</link>
      <description>&lt;P&gt;Thanks Bryan. For now I will recreate the table with out 'unsigned' for labs we have.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jobin George&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 05:00:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ExecuteSQL-UnresolvedUnionException/m-p/100280#M13220</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2015-12-22T05:00:42Z</dc:date>
    </item>
  </channel>
</rss>

