Forum Discussion

smpa01's avatar
smpa01
Community Champion
1 year ago

openrowset compatibility

Is OPENROWSET compatible with lakehouse files?

 

E.g. the following does not work

select * 
from openrowset(
	BULK 'https://onelake.dfs.fabric.microsoft.com/ws/lakehouse_testing.Lakehouse/Files/read_test/2025-07-24T13:45:36.864628.parquet') as t

 

12 Replies

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hello smpa01,
    Thank you for reaching out to the Microsoft Fabric Community Forum.

    I have reproduced your scenario in Microsoft Fabric by uploading a .parquet file to the Lakehouse and querying it using the OPENROWSET function via the Lakehouse SQL endpoint.

    OPENROWSET now supports Lakehouse files using the OneLake DFS path, provided the query is executed from within Fabric (i.e., through the Lakehouse’s SQL Endpoint).

    Example Tested:

    SELECT *
    
    FROM OPENROWSET(
    
        BULK ' https://msit-onelake.dfs.fabric.microsoft.com/297d2e15-e2ba-43af-b6c2-572ce32c262f/f4fd0d9a-231f-4e3b-970a-7848479bf0a8/Files/iris.parquet,
    
        FORMAT = 'PARQUET'
    
    ) AS t


    Output was successfully returned from the Parquet file stored in Lakehouse:

     

    If you're encountering errors, please ensure:

    • You're running the query inside the SQL endpoint of the same Lakehouse in Fabric.
    • The file path is correct (use Copy Path from the Lakehouse UI).
    • You have appropriate permissions in that workspace.
    • You're specifying the correct file format (e.g: 'PARQUET', 'CSV', etc.).

     

    Best Regards,
    Ganesh singamshetty.

  • v-ssriganesh 

    Though the feature is in GA, still unable to query , can you let me know what could be the issue. 

     

     

    • v-ssriganesh's avatar
      v-ssriganesh
      Community Support

      Hello BalajiL,
      Thank you for your response and for providing the error details.

      Based on the information and the screenshot you shared, the OPENROWSET function support with Lakehouse Parquet files in Microsoft Fabric is indicated to be in General Availability (GA) as of Q2 2025. This suggests that the feature should be supported across Fabric workspaces, including the ability to query files from the OneLake DFS path via the Lakehouse SQL endpoint.

      The error message you encountered indicates a specific issue with the file path or its format. Here are some potential reasons and steps to resolve the issue:

      • The error suggests that the URL contains a suffix that is not allowed. This could be due to the file being part of a partitioned dataset or having a naming convention that OPENROWSET does not yet fully support. Try querying a simpler file name to see if the issue persists.
      • Verify the path is copied correctly from the Lakehouse UI using the "Copy Path" option. The path should match the format used in the successful example (e.g: https://msit-onelake.dfs.fabric.microsoft.com/<workspace-id>/<lakehouse-id>/Files/<filename>.parquet). Avoid manual edits that might introduce invalid characters or suffixes.
      • Confirm you have the necessary permissions to access the file and execute queries in the Lakehouse SQL endpoint. Lack of permissions can sometimes manifest as unexpected errors.

      Although the feature is marked as GA in Q2 2025, rollouts can sometimes be gradual across regions or workspaces. If the issue persists, it’s possible your region or workspace hasn’t yet received the full update. You can raise Microsoft Fabric support ticket to resolve the issue.

      You can create a Microsoft support ticket with the help of the link below:
      https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket

       

      Best Regards,
      Ganesh singamshetty.

      • BalajiL's avatar
        BalajiL
        Resolver I

        HI v-ssriganesh 

         

        Thanks for your reply, just want to give an update on the issue. The issue is not related to any syntax/URL issue, the feature rolled out by MSFT in phased manner. It was available only for few regions initially and not available regions like Central India and etc. and it was confirmed by MSFT. Now the feature is available in Central India region as well.  Now I can able to query parquet files resides in onelake in sql end point using OPENROWSET.  Thanks for your reply. 

         

    • v-ssriganesh's avatar
      v-ssriganesh
      Community Support

      Hello smpa01,

      Could you please confirm whether your issue was resolved through the Microsoft support ticket?

      If so, we would appreciate it if you could share the solution or any key takeaways here, as it may benefit others in the community.

      Thank you.

  • Hi smpa01 

     
    You should convert parquet to delta file. This is the script.
    sdf= spark.read.parquet("Crime-Data-Boston-2016.parquet")
    sdf.write.mode("overwrite").format("delta").saveAsTable("DimXYZ")
    • BalajiL's avatar
      BalajiL
      Resolver I

      BhaveshPatel : There is a new feature in GA Openrowset to read the lakehouse files in sql endpoint.  No need to convert parquet to delta etc. We are discussion why Openrowset is not yet working.