Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Kanika123
New Contributor

Data Type Conversion

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

2 REPLIES 2
tharunkumarRTK
Valued Contributor III

@Kanika123 

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?

Are you able run a T-SQL query on this table from sql analytics end point?

 

if the answer for the above two questions is yes then I am guessing its a type conversion problem. Please checkout this blog 

https://www.databricks.com/blog/2020/07/22/a-comprehensive-look-at-dates-and-timestamps-in-apache-sp...

 

was there any unsual datetime value like '31-12-9999' ? 

I would suggest you to performing manual type casting in the spark sql

BTW, in Fabric lakehouse timestamp datatype is datetime2.

https://learn.microsoft.com/en-us/fabric/data-warehouse/data-types 

 

Need a Power BI Consultation? Hire me on Upwork

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png
Anonymous
Not applicable

Hi @Kanika123 

 

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!

 

Best Regards,
Jing

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (8,737)