<?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 Data Type Conversion in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4239887#M4576</link>
    <description>&lt;P&gt;I have a pipeline in fabric and source has 2-3 fields that has datetime as datattype and in pipeline I am using copy activity to copy data from source to lakehouse table. Now lakehouse table has fields datatype as timestamp.pipeline is executing successfully but when I am trying to run select query through spark sql on notbook it is returning error datetime inconsistency. Please help me how I can fix this issue&lt;/P&gt;</description>
    <pubDate>Sun, 13 Oct 2024 06:20:13 GMT</pubDate>
    <dc:creator>Kanika123</dc:creator>
    <dc:date>2024-10-13T06:20:13Z</dc:date>
    <item>
      <title>Data Type Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4239887#M4576</link>
      <description>&lt;P&gt;I have a pipeline in fabric and source has 2-3 fields that has datetime as datattype and in pipeline I am using copy activity to copy data from source to lakehouse table. Now lakehouse table has fields datatype as timestamp.pipeline is executing successfully but when I am trying to run select query through spark sql on notbook it is returning error datetime inconsistency. Please help me how I can fix this issue&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2024 06:20:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4239887#M4576</guid>
      <dc:creator>Kanika123</dc:creator>
      <dc:date>2024-10-13T06:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data Type Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4240104#M4578</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/824327"&gt;@Kanika123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am assuming you are able to view the data from lakehosue explorer and you are facing this error when ran the query in spark sql, is it?&lt;/P&gt;
&lt;P&gt;Are you able run a T-SQL query on this table from sql analytics end point?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if the answer for the above two questions is yes then I am guessing its a type conversion problem. Please checkout this blog&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.databricks.com/blog/2020/07/22/a-comprehensive-look-at-dates-and-timestamps-in-apache-spark-3-0.html" target="_blank"&gt;https://www.databricks.com/blog/2020/07/22/a-comprehensive-look-at-dates-and-timestamps-in-apache-spark-3-0.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;was there any unsual datetime value like '31-12-9999' ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest you to performing manual type casting in the spark sql&lt;/P&gt;
&lt;P&gt;BTW, in Fabric lakehouse timestamp datatype is datetime2.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/data-types" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-warehouse/data-types&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need a Power BI Consultation? Hire me on &lt;A href="https://bit.ly/4d3oy4s" target="_blank" rel="noopener"&gt;Upwork&lt;/A&gt;&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;Connect on &lt;A href="https://www.linkedin.com/in/tharun-kumar-ravikrindhi/" target="_blank" rel="noopener"&gt;LinkedIn&lt;/A&gt;&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;DIV class=""&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV class=""&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV style="border-radius: 1px; padding: 10px; border: solid #cccccc 1px; background: #fafafa no-repeat right 10px center;"&gt;&lt;BR /&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG style="margin-right: 3px;"&gt;&lt;STRONG style="margin-right: 3px;"&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG style="margin-right: 3px;"&gt;&lt;STRONG style="margin-right: 3px;"&gt;If I helped you, click on the Thumbs Up to give Kudos.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;
&lt;P style="padding: 0; margin: 5px 50px 0 0;"&gt;Proud to be a Super User!&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PBI_SuperUser_Rank@2x.png" style="width: 70px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1107700iD5193F780866AA58/image-size/large?v=v2&amp;amp;px=999" width="70" role="button" title="PBI_SuperUser_Rank@2x.png" alt="PBI_SuperUser_Rank@2x.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 13 Oct 2024 14:15:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4240104#M4578</guid>
      <dc:creator>tharunkumarRTK</dc:creator>
      <dc:date>2024-10-13T14:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Data Type Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4256078#M4777</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/824327"&gt;@Kanika123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any update? Have you resolved this issue? If any of the answers provided were helpful, please consider accepting them as a solution. If you have found other solutions, we would greatly appreciate it if you could share them with us. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 09:23:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Data-Type-Conversion/m-p/4256078#M4777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-24T09:23:41Z</dc:date>
    </item>
  </channel>
</rss>

