<?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 join three csv files like sql on condition in Apache Nifi? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410924#M252940</link>
    <description>&lt;P&gt;If you know where the CSV files are on the filesystem and the condition is simple, you may be able to start with CSV file 1 then use 2 &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.LookupRecord/index.html" target="_self"&gt;LookupRecord&lt;/A&gt; processors in sequence with 2 &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-lookup-services-nar/1.28.0/org.apache.nifi.lookup.CSVRecordLookupService/index.html" target="_self"&gt;CSVRecordLookupService&lt;/A&gt; controller services (each pointing at CSV file 2 and 3 respectively). If that doesn't suit your needs, check out the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.ForkEnrichment/index.html" target="_self"&gt;ForkEnrichment&lt;/A&gt; and &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.JoinEnrichment/index.html" target="_self"&gt;JoinEnrichment&lt;/A&gt; processors, they may be able to do what you need.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jun 2025 20:21:47 GMT</pubDate>
    <dc:creator>mburgess</dc:creator>
    <dc:date>2025-06-26T20:21:47Z</dc:date>
    <item>
      <title>how to join three csv files like sql on condition in Apache Nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410751#M252913</link>
      <description>&lt;P&gt;&lt;A href="https://medium.com/@surajnagendra/merge-csv-files-apache-nifi-21ba44e1b719" target="_blank"&gt;https://medium.com/@surajnagendra/merge-csv-files-apache-nifi-21ba44e1b719&lt;/A&gt;&lt;BR /&gt;I tried this approach but it didn't worked well&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 17:02:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410751#M252913</guid>
      <dc:creator>Bhar</dc:creator>
      <dc:date>2025-06-23T17:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to join three csv files like sql on condition in Apache Nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410752#M252914</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/128087"&gt;@Bhar&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38301"&gt;@mburgess&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 23:56:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410752#M252914</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2025-06-23T23:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to join three csv files like sql on condition in Apache Nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410852#M252928</link>
      <description>&lt;P&gt;If you are having all files in same format, then mergecontent is only option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;One simple example that may give you hint to solve your problem.&lt;/P&gt;&lt;P&gt;Use the RouteonAttribute processor and connect to merger record processor&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saquibsk_0-1750850767991.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/46143iA70B8451753C5FED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saquibsk_0-1750850767991.png" alt="saquibsk_0-1750850767991.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;On the&amp;nbsp; RouteonAttribute&amp;nbsp; processor use the configuration ${merge.count:equals(1)}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saquibsk_2-1750850817694.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/46144i57082B6925FD096E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saquibsk_2-1750850817694.png" alt="saquibsk_2-1750850817694.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;let say if single file then it will end. else it will go to mergecontent processor and merge all files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 11:29:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410852#M252928</guid>
      <dc:creator>saquibsk</dc:creator>
      <dc:date>2025-06-25T11:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to join three csv files like sql on condition in Apache Nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410861#M252929</link>
      <description>&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;I'm using the QueryRecord processor in Apache NiFi to perform a LEFT JOIN between two sets of records within a single FlowFile. The records are distinguished by a field m, where m = 'a' represents one dataset and m = 'b' represents the other.&lt;/P&gt;&lt;PRE&gt;Here is the SQL query I'm using:&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM (&lt;BR /&gt;SELECT * FROM FLOWFILE WHERE m = 'a'&lt;BR /&gt;) file1&lt;BR /&gt;LEFT JOIN (&lt;BR /&gt;SELECT * FROM FLOWFILE WHERE m = 'b'&lt;BR /&gt;) file2&lt;BR /&gt;ON file1.ID = file2.rapid_id&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;!--  StartFragment   --&gt;&lt;/PRE&gt;&lt;P&gt;However, the result only includes records from the m = 'a' side. When I switch the inner queries (i.e., use m = 'b' as the left side), I only get records from that side instead. It seems the LEFT JOIN is not functioning as expected — it behaves more like an INNER JOIN.&lt;/P&gt;&lt;P&gt;Has anyone encountered this behavior with QueryRecord? Is there a limitation in how it handles subqueries or joins within a single FlowFile? Any guidance or workaround would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 13:01:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410861#M252929</guid>
      <dc:creator>Bhar</dc:creator>
      <dc:date>2025-06-25T13:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to join three csv files like sql on condition in Apache Nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410924#M252940</link>
      <description>&lt;P&gt;If you know where the CSV files are on the filesystem and the condition is simple, you may be able to start with CSV file 1 then use 2 &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.LookupRecord/index.html" target="_self"&gt;LookupRecord&lt;/A&gt; processors in sequence with 2 &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-lookup-services-nar/1.28.0/org.apache.nifi.lookup.CSVRecordLookupService/index.html" target="_self"&gt;CSVRecordLookupService&lt;/A&gt; controller services (each pointing at CSV file 2 and 3 respectively). If that doesn't suit your needs, check out the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.ForkEnrichment/index.html" target="_self"&gt;ForkEnrichment&lt;/A&gt; and &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.JoinEnrichment/index.html" target="_self"&gt;JoinEnrichment&lt;/A&gt; processors, they may be able to do what you need.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 20:21:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-join-three-csv-files-like-sql-on-condition-in-Apache/m-p/410924#M252940</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2025-06-26T20:21:47Z</dc:date>
    </item>
  </channel>
</rss>

