<?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 Merge didn't fail while inserting wrong data type values in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/merge-didn-t-fail-while-inserting-wrong-data-type-values/m-p/25533#M17772</link>
    <description>&lt;P&gt;Hello. During some example cases we were running, in order to identify how Databricks treats possible wrong actions we could make, we noticed that merge doesn't fail while inserting different data type values from the ones in the corresponding table. Please find the example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Target table schema &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Target table schema"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1298iDDE65D2FD3B75971/image-size/large?v=v2&amp;amp;px=999" role="button" title="Target table schema" alt="Target table schema" /&gt;&lt;/span&gt;&lt;B&gt;View used to update target table&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Here you can see that we accidentally inserted the Status values in the Eff_Dt column (Date data type)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="merge_failure"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1304i06FAFD930AC51314/image-size/large?v=v2&amp;amp;px=999" role="button" title="merge_failure" alt="merge_failure" /&gt;&lt;/span&gt;&lt;B&gt;Merge along with the success result&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1310iE71E7097A7D7A096/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;B&gt;Target table after the result&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="merge_failure3"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1308i4C512CE0D2CD06C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="merge_failure3" alt="merge_failure3" /&gt;&lt;/span&gt;You can see that rows 10 &amp;amp; 11 inserted in the table without failing but with null value in EFF_DT (date type while we tried to insert string values). We would expect the merge to fail and not complete any of the DML actions. Moreover, we noticed that in this case in the identity column, id #9 was skipped. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this behavior expected? Could you please provide any insight? Thank you in advance&lt;/P&gt;</description>
    <pubDate>Thu, 27 Oct 2022 08:43:39 GMT</pubDate>
    <dc:creator>elgeo</dc:creator>
    <dc:date>2022-10-27T08:43:39Z</dc:date>
    <item>
      <title>Merge didn't fail while inserting wrong data type values</title>
      <link>https://community.databricks.com/t5/data-engineering/merge-didn-t-fail-while-inserting-wrong-data-type-values/m-p/25533#M17772</link>
      <description>&lt;P&gt;Hello. During some example cases we were running, in order to identify how Databricks treats possible wrong actions we could make, we noticed that merge doesn't fail while inserting different data type values from the ones in the corresponding table. Please find the example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Target table schema &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Target table schema"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1298iDDE65D2FD3B75971/image-size/large?v=v2&amp;amp;px=999" role="button" title="Target table schema" alt="Target table schema" /&gt;&lt;/span&gt;&lt;B&gt;View used to update target table&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Here you can see that we accidentally inserted the Status values in the Eff_Dt column (Date data type)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="merge_failure"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1304i06FAFD930AC51314/image-size/large?v=v2&amp;amp;px=999" role="button" title="merge_failure" alt="merge_failure" /&gt;&lt;/span&gt;&lt;B&gt;Merge along with the success result&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1310iE71E7097A7D7A096/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;B&gt;Target table after the result&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="merge_failure3"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1308i4C512CE0D2CD06C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="merge_failure3" alt="merge_failure3" /&gt;&lt;/span&gt;You can see that rows 10 &amp;amp; 11 inserted in the table without failing but with null value in EFF_DT (date type while we tried to insert string values). We would expect the merge to fail and not complete any of the DML actions. Moreover, we noticed that in this case in the identity column, id #9 was skipped. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this behavior expected? Could you please provide any insight? Thank you in advance&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 08:43:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/merge-didn-t-fail-while-inserting-wrong-data-type-values/m-p/25533#M17772</guid>
      <dc:creator>elgeo</dc:creator>
      <dc:date>2022-10-27T08:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Merge didn't fail while inserting wrong data type values</title>
      <link>https://community.databricks.com/t5/data-engineering/merge-didn-t-fail-while-inserting-wrong-data-type-values/m-p/25534#M17773</link>
      <description>&lt;P&gt;Hello. Any update on this please? Thank you in advance&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 07:40:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/merge-didn-t-fail-while-inserting-wrong-data-type-values/m-p/25534#M17773</guid>
      <dc:creator>elgeo</dc:creator>
      <dc:date>2022-11-01T07:40:30Z</dc:date>
    </item>
  </channel>
</rss>

