<?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: Select query on ExecuteSQL processor throws out EROOR  duplicate filed  on joining two tables in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294592#M217336</link>
    <description>&lt;P&gt;maybe you should set for all or just for t1/t2.. fields an Alias like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;t1.CODE_CLOCK_ID as CODE_CLOCK_ID_s26,
t1.COMPANY_CD as COMPANY_CD_s26,
t1.GROUP_SEGMENT_L1 as GROUP_SEGMENT_L1_s26,
t1.GROUP_SEGMENT_CD as GROUP_SEGMENT_CD_s26,
t2.CODE_CLOCK_ID asCODE_CLOCK_ID_s27,
t2.COMPANY_CD as COMPANY_CD_s27,
t2.GROUP_SEGMENT_L1 as GROUP_SEGMENT_L1_s27,
t2.GROUP_SEGMENT_CD as GROUP_SEGMENT_CD_s27&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 07:43:57 GMT</pubDate>
    <dc:creator>Faerballert</dc:creator>
    <dc:date>2020-04-23T07:43:57Z</dc:date>
    <item>
      <title>Select query on ExecuteSQL processor throws out ERROR  duplicate filed  on joining two tables</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294549#M217318</link>
      <description>&lt;P&gt;I have a situation, where I have to get the combined data from two tables&amp;nbsp; from Mysql database, ExecuteSql processor throwing out bellow error,&amp;nbsp; where as the same query is working fine from Mysql Workbench.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2020-04-22 14:55:06,597 ERROR [Timer-Driven Process Thread-8] o.a.nifi.processors.standard.ExecuteSQL ExecuteSQL[id=9d81c7ae-0171-1000-f638-2f1e60bfe48e] Unable to execute SQL select query select&lt;BR /&gt;t1.CODE_CLOCK_ID,&lt;BR /&gt;t1.COMPANY_CD,&lt;BR /&gt;t1.GROUP_SEGMENT_L1,&lt;BR /&gt;t1.GROUP_SEGMENT_CD,&lt;BR /&gt;t2.CODE_CLOCK_ID,&lt;BR /&gt;t2.COMPANY_CD,&lt;BR /&gt;t2.GROUP_SEGMENT_L1,&lt;BR /&gt;t2.GROUP_SEGMENT_CD&lt;BR /&gt;from&lt;BR /&gt;sheet26 t1&lt;BR /&gt;INNER JOIN sheet27 t2&lt;BR /&gt;on t1.CODE_CLOCK_ID = t2.CODE_CLOCK_ID and t1.COMPANY_CD = t2.COMPANY_CD LIMIT 0, 1000; due to org.apache.nifi.processor.exception.ProcessException: org.apache.avro.AvroRuntimeException: Duplicate field CODE_CLOCK_ID in record any.data.sheet26: CODE_CLOCK_ID type:UNION pos:4 and CODE_CLOCK_ID type:UNION pos:0.. No FlowFile to route to failure: org.apache.nifi.processor.exception.ProcessException: org.apache.avro.AvroRuntimeException: Duplicate field CODE_CLOCK_ID in record any.data.sheet26: CODE_CLOCK_ID type:UNION pos:4 and CODE_CLOCK_ID type:UNION pos:0.&lt;BR /&gt;org.apache.nifi.processor.exception.ProcessException: org.apache.avro.AvroRuntimeException: Duplicate field CODE_CLOCK_ID in record any.data.sheet26: CODE_CLOCK_ID type:UNION pos:4 and CODE_CLOCK_ID type:UNION pos:0.&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractExecuteSQL.lambda$onTrigger$1(AbstractExecuteSQL.java:301)&lt;BR /&gt;at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2746)&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractExecuteSQL.onTrigger(AbstractExecuteSQL.java:297)&lt;BR /&gt;at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)&lt;BR /&gt;at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)&lt;BR /&gt;at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)&lt;BR /&gt;at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)&lt;BR /&gt;at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)&lt;BR /&gt;at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)&lt;BR /&gt;at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)&lt;BR /&gt;at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)&lt;BR /&gt;at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)&lt;BR /&gt;at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)&lt;BR /&gt;at java.base/java.lang.Thread.run(Thread.java:830)&lt;BR /&gt;Caused by: org.apache.avro.AvroRuntimeException: Duplicate field CODE_CLOCK_ID in record any.data.sheet26: CODE_CLOCK_ID type:UNION pos:4 and CODE_CLOCK_ID type:UNION pos:0.&lt;BR /&gt;at org.apache.avro.Schema$RecordSchema.setFields(Schema.java:651)&lt;BR /&gt;at org.apache.avro.SchemaBuilder$FieldAssembler.endRecord(SchemaBuilder.java:2013)&lt;BR /&gt;at org.apache.nifi.util.db.JdbcCommon.createSchema(JdbcCommon.java:636)&lt;BR /&gt;at org.apache.nifi.util.db.JdbcCommon.convertToAvroStream(JdbcCommon.java:239)&lt;BR /&gt;at org.apache.nifi.processors.standard.sql.DefaultAvroSqlWriter.writeResultSet(DefaultAvroSqlWriter.java:49)&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractExecuteSQL.lambda$onTrigger$1(AbstractExecuteSQL.java:299)&lt;BR /&gt;... 13 common frames omitted&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what could be issue and what I have to change in query to get the record set from database?&lt;/P&gt;
&lt;P&gt;I am using Nifi 1.11.4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue happens even excluding INNER or even&amp;nbsp; replacing INNER JOIN with "where" in the select query.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 10:19:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294549#M217318</guid>
      <dc:creator>murali2425</dc:creator>
      <dc:date>2020-04-23T10:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select query on ExecuteSQL processor throws out EROOR  duplicate filed  on joining two tables</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294592#M217336</link>
      <description>&lt;P&gt;maybe you should set for all or just for t1/t2.. fields an Alias like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;t1.CODE_CLOCK_ID as CODE_CLOCK_ID_s26,
t1.COMPANY_CD as COMPANY_CD_s26,
t1.GROUP_SEGMENT_L1 as GROUP_SEGMENT_L1_s26,
t1.GROUP_SEGMENT_CD as GROUP_SEGMENT_CD_s26,
t2.CODE_CLOCK_ID asCODE_CLOCK_ID_s27,
t2.COMPANY_CD as COMPANY_CD_s27,
t2.GROUP_SEGMENT_L1 as GROUP_SEGMENT_L1_s27,
t2.GROUP_SEGMENT_CD as GROUP_SEGMENT_CD_s27&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 07:43:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294592#M217336</guid>
      <dc:creator>Faerballert</dc:creator>
      <dc:date>2020-04-23T07:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select query on ExecuteSQL processor throws out EROOR  duplicate filed  on joining two tables</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294644#M217369</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, Faerballert,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Really it did work, thank you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 19:20:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/294644#M217369</guid>
      <dc:creator>murali2425</dc:creator>
      <dc:date>2020-04-23T19:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select query on ExecuteSQL processor throws out EROOR  duplicate filed  on joining two tables</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/361297#M238554</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I want to extract a CSV file from SQL query&lt;/P&gt;&lt;P&gt;one of the columns should be present in the CSV twice, diffirent position.&lt;/P&gt;&lt;P&gt;I had the same error&lt;/P&gt;&lt;P&gt;is there a workaround ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 15:39:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Select-query-on-ExecuteSQL-processor-throws-out-ERROR/m-p/361297#M238554</guid>
      <dc:creator>yamaga</dc:creator>
      <dc:date>2023-01-13T15:39:22Z</dc:date>
    </item>
  </channel>
</rss>

