<?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>topic Issue with MERGE INTO for first batch in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/issue-with-merge-into-for-first-batch/m-p/49959#M28664</link>
    <description>&lt;P&gt;I have source data with multiple rows and columns, 1 of column is city.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get unique city into other table by stream data from source table. So I trying to use merge into and foreachBatch with my merge function.&amp;nbsp;&amp;nbsp;My merge condition is : On source.city = target.city. But then I realized that, in first batch, I will always get duplicated data becauce there is no data on target and duplicated city on first batch of source.&lt;/P&gt;&lt;P&gt;How can I resolve this ? thank you for supporting&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 01:33:56 GMT</pubDate>
    <dc:creator>Joe1912</dc:creator>
    <dc:date>2023-10-27T01:33:56Z</dc:date>
    <item>
      <title>Issue with MERGE INTO for first batch</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-merge-into-for-first-batch/m-p/49959#M28664</link>
      <description>&lt;P&gt;I have source data with multiple rows and columns, 1 of column is city.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get unique city into other table by stream data from source table. So I trying to use merge into and foreachBatch with my merge function.&amp;nbsp;&amp;nbsp;My merge condition is : On source.city = target.city. But then I realized that, in first batch, I will always get duplicated data becauce there is no data on target and duplicated city on first batch of source.&lt;/P&gt;&lt;P&gt;How can I resolve this ? thank you for supporting&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 01:33:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-merge-into-for-first-batch/m-p/49959#M28664</guid>
      <dc:creator>Joe1912</dc:creator>
      <dc:date>2023-10-27T01:33:56Z</dc:date>
    </item>
  </channel>
</rss>

