Forum Discussion

sharp1FL's avatar
sharp1FL
Icon for Helper I rankHelper I
8 months ago
Solved

Fabric SQL table lake house shortcut query inconsistency

I created a lake house shortcut to a fabric table. When I perform a count(*) query in SQL and the notebook, I get different values with a much smaller count from the notebook. Can anyone help explain...
  • V-yubandi-msft's avatar
    V-yubandi-msft
    8 months ago

    Hi sharp1FL ,

    Thank you for for sharing your observations. From your investigation, it appears this is expected behavior in Fabric when using Lakehouse shortcuts. In certain cases, Spark notebooks may continue to use cached shortcut metadata from when the shortcut was first created, and restarting the Spark session or refreshing the table might not always update to the latest Delta state.

     

    Since this was a one time process and the table is only updated during off hours, materializing the data into a native Lakehouse table is the most reliable and supported way to ensure consistent results across SQL and Spark.

     

    Thanks for confirming the results and sharing your workaround, as it may help others facing similar issues.