<?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 Re: Datatype mismatch while reading data from sql server to databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6272#M2458</link>
    <description>&lt;P&gt;Hi @Mani Teja G​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your question! To assist you better, please take a moment to review the answer and let me know if it best fits your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help us select the best solution by clicking on "Select As Best" if it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your feedback will help us ensure that we are providing the best possible service to you. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Apr 2023 06:39:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-04-08T06:39:23Z</dc:date>
    <item>
      <title>Datatype mismatch while reading data from sql server to databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6270#M2456</link>
      <description>&lt;P&gt;Data from Azure sql server was read into databricks through JDBC connection (spark version 2.x) and stored into Gen1. Now the client wants to migrate the data from Gen1 to Gen2. When we ran the same jobs that read data from Azure Sql Server to Databricks through JDBC( spark version upgraded from 2.x to 3.2) source side DATE type columns are populating as STRING. Except the spark version updation there is no techincal or functional change or no schema change in the source. Unable to find the root cause. Can someone help me find the exact issue?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 06:32:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6270#M2456</guid>
      <dc:creator>Teja07</dc:creator>
      <dc:date>2023-04-07T06:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Datatype mismatch while reading data from sql server to databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6271#M2457</link>
      <description>&lt;P&gt;Spark 2.x and Spark 3.x handle dates differently.&lt;/P&gt;&lt;P&gt;Running spark 2.x scripts on spark 3.x will very likely have issues.&lt;/P&gt;&lt;P&gt;Please check the spark 3 migration guide:&lt;/P&gt;&lt;P&gt;&lt;A href="https://spark.apache.org/docs/3.0.2/sql-migration-guide.html#upgrading-from-spark-sql-24-to-30" target="test_blank"&gt;https://spark.apache.org/docs/3.0.2/sql-migration-guide.html#upgrading-from-spark-sql-24-to-30&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 06:55:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6271#M2457</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2023-04-07T06:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Datatype mismatch while reading data from sql server to databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6272#M2458</link>
      <description>&lt;P&gt;Hi @Mani Teja G​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your question! To assist you better, please take a moment to review the answer and let me know if it best fits your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help us select the best solution by clicking on "Select As Best" if it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your feedback will help us ensure that we are providing the best possible service to you. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 06:39:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6272#M2458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-08T06:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Datatype mismatch while reading data from sql server to databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6273#M2459</link>
      <description>&lt;P&gt;@Werner Stinckens​&amp;nbsp;, Above link was extensive and very helpful, however i didn't get the exact details from it. Could you be more specific.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 05:18:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6273#M2459</guid>
      <dc:creator>Teja07</dc:creator>
      <dc:date>2023-04-12T05:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Datatype mismatch while reading data from sql server to databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6274#M2460</link>
      <description>&lt;P&gt;f.e. there is a spark option to enable the 'old' date handling.&lt;/P&gt;&lt;P&gt;You can set spark.sql.legacy.timeParserPolicy to LEGACY to restore the behavior before Spark 3.0.&lt;/P&gt;&lt;P&gt;Frankly I am not a fan of that approach as Spark 3 gives you a lot of interesting date functions.&lt;/P&gt;&lt;P&gt;So what you could do is to first identify where you have date columns, and explicitly cast them to dates with the to_date function.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 06:35:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/datatype-mismatch-while-reading-data-from-sql-server-to/m-p/6274#M2460</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2023-04-12T06:35:45Z</dc:date>
    </item>
  </channel>
</rss>

