Forum Discussion

AditiPattnaik's avatar
AditiPattnaik
Icon for Advocate II rankAdvocate II
5 months ago
Solved

OPENROWSET not working with External source in Warehouse

Hi,
So in the warehouse i was trying to get data and create a table from the external source which is open but it seems to be not working with OPENROWSET().


Can anyone help regarding this?

 

Thank You

  • HI AditiPattnaik , I tried and confirm the query works ... 

    CREATE TABLE FabricCommunitySupportTest AS
    SELECT TOP 10 *
    FROM OPENROWSET(
        BULK 'https://fabrictutorialdata.blob.core.windows.net/sampledata/ContosoDW/csv/10k/**',format='csv') as d;

     

    Here's the confirmation but noticed that unlike your example, is missing format='csv'

     

    However, in your case, the issue seems to be related to permisson to the storage account as shown below 

     

    In conclusion, OPENROWSET works in the context of an Fabric Warehouse, but in your case, need to fix to issues:

    #1. Add format='csv'

    #2. Check that your stoage accounts has network acces and neccesary permissions to access your container.  

     

    Additional information in this article https://blog.fabric.microsoft.com/en-US/blog/the-openrowset-function-is-generally-available-in-fabric-data-warehouse/

     

    Hope this two actions solve the issue, thumbs up if you find this information useful and mark as solution! All the best, cheers!

     

2 Replies

  • HI AditiPattnaik , I tried and confirm the query works ... 

    CREATE TABLE FabricCommunitySupportTest AS
    SELECT TOP 10 *
    FROM OPENROWSET(
        BULK 'https://fabrictutorialdata.blob.core.windows.net/sampledata/ContosoDW/csv/10k/**',format='csv') as d;

     

    Here's the confirmation but noticed that unlike your example, is missing format='csv'

     

    However, in your case, the issue seems to be related to permisson to the storage account as shown below 

     

    In conclusion, OPENROWSET works in the context of an Fabric Warehouse, but in your case, need to fix to issues:

    #1. Add format='csv'

    #2. Check that your stoage accounts has network acces and neccesary permissions to access your container.  

     

    Additional information in this article https://blog.fabric.microsoft.com/en-US/blog/the-openrowset-function-is-generally-available-in-fabric-data-warehouse/

     

    Hope this two actions solve the issue, thumbs up if you find this information useful and mark as solution! All the best, cheers!