<?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: Unable to read a table with invalid dates using SQL endpoint in Data Warehouse</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3931924#M970</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;At this time, we are reaching out to the internal team to get some help on this .&lt;BR /&gt;We will update you once we hear back from them.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2024 09:14:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-20T09:14:32Z</dc:date>
    <item>
      <title>Unable to read a table with invalid dates using SQL endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3931192#M968</link>
      <description>&lt;P&gt;Hi There,&lt;BR /&gt;We have some source system which treat NULL values as '0001-01-01' and some dates are before '1900-01-01'. When we try to read such data written using lakehouse notebook via SQL endpoint, we are getting unable to run query error. Has anyone faced this issue and overcome it.&lt;/P&gt;&lt;P&gt;I have attached a sample notebook which reproduces the issue.&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;LI-CODE lang="python"&gt;from pyspark.sql.functions import *
from pyspark.sql.types import DateType

spark.conf.set("spark.sql.parquet.int96RebaseModeInRead", "LEGACY")
spark.conf.set("spark.sql.parquet.int96RebaseModeInWrite", "LEGACY")
spark.conf.set("spark.sql.parquet.datetimeRebaseModeInRead", "LEGACY")
spark.conf.set("spark.sql.parquet.datetimeRebaseModeInWrite", "LEGACY")

new_df = spark.createDataFrame([('0065-04-01',),('0001-01-01',),('1993-03-11',)], ['COVER_END_DATE'])
new_df.select(col('COVER_END_DATE')).show()

spark.sql(f"CREATE TABLE IF NOT EXISTS test_date_issue2(COVER_END_DATE DATE) using DELTA LOCATION 'Tables/test_date_issue2'")

new_df.createOrReplaceTempView("TARGET_VIEW")

spark.sql(f"INSERT INTO test_date_issue2 SELECT * FROM TARGET_VIEW")&lt;/LI-CODE&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;Thanks,&lt;/P&gt;&lt;P&gt;Chetna&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 04:48:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3931192#M968</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-20T04:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read a table with invalid dates using SQL endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3931924#M970</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;At this time, we are reaching out to the internal team to get some help on this .&lt;BR /&gt;We will update you once we hear back from them.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 09:14:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3931924#M970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-20T09:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read a table with invalid dates using SQL endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3934240#M976</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Apologize for the issue you are facing. We can confirm that we are also observing the same issue at our end.&lt;BR /&gt;&lt;BR /&gt;The best course of action is to open a support ticket and have our support team take a closer look at it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please reach out to our support team so they can do a more thorough investigation on why this it is happening:&amp;nbsp;&lt;A href="https://support.fabric.microsoft.com/en-IN/support/" target="_blank" rel="noopener"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After creating a Support ticket please provide the ticket number as it would help us to track for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please let us know if you have any other queries.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 06:07:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3934240#M976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-21T06:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read a table with invalid dates using SQL endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3938939#M983</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you got a chance to open a support ticket.&lt;BR /&gt;&lt;SPAN&gt;After creating a Support ticket please provide the ticket number as it would help us to track for more information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 09:17:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/3938939#M983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-22T09:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read a table with invalid dates using SQL endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/4167509#M1690</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you manage to get this resolved?&lt;/P&gt;&lt;P&gt;I'm having the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 14:20:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/Unable-to-read-a-table-with-invalid-dates-using-SQL-endpoint/m-p/4167509#M1690</guid>
      <dc:creator>Cosmic_Panda</dc:creator>
      <dc:date>2024-09-23T14:20:24Z</dc:date>
    </item>
  </channel>
</rss>

